mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
target/arm/kvm: Let kvm_arm_vgic_probe() return a bitmap
Convert kvm_arm_vgic_probe() so that it returns a bitmap of supported in-kernel emulation VGIC versions instead of the max version: at the moment values can be v2 and v3. This allows to expose the case where the host GICv3 also supports GICv2 emulation. This will be useful to choose the default version in KVM accelerated mode. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200311131618.7187-5-eric.auger@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
36bf4ec8c8
commit
d45efe4782
3 changed files with 20 additions and 8 deletions
|
@ -1554,11 +1554,18 @@ static void finalize_gic_version(VirtMachineState *vms)
|
|||
vms->gic_version = VIRT_GIC_VERSION_3;
|
||||
}
|
||||
} else {
|
||||
vms->gic_version = kvm_arm_vgic_probe();
|
||||
if (!vms->gic_version) {
|
||||
int probe_bitmap = kvm_arm_vgic_probe();
|
||||
|
||||
if (!probe_bitmap) {
|
||||
error_report(
|
||||
"Unable to determine GIC version supported by host");
|
||||
exit(1);
|
||||
} else {
|
||||
if (probe_bitmap & KVM_ARM_VGIC_V3) {
|
||||
vms->gic_version = VIRT_GIC_VERSION_3;
|
||||
} else {
|
||||
vms->gic_version = VIRT_GIC_VERSION_2;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (vms->gic_version == VIRT_GIC_VERSION_NOSEL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue