[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/15] i386: kvm: x2apic is not supported without in
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 10/15] i386: kvm: x2apic is not supported without in-kernel irqchip |
Date: |
Thu, 4 Oct 2012 17:49:02 -0300 |
This is necessary so that x2apic is not improperly enabled when the
in-kernel irqchip is disabled.
This won't generate a warning with "-cpu ...,check" because the current
check/enforce code is broken (it checks the host CPU data directly,
instead of using kvm_arch_get_supported_cpuid()), but it will be
eventually fixed to properly report the missing x2apic flag.
Signed-off-by: Eduardo Habkost <address@hidden>
---
target-i386/kvm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 704ad33..590f4d5 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -209,6 +209,13 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s,
uint32_t function,
kvm_check_extension(s, KVM_CAP_TSC_DEADLINE_TIMER)) {
ret |= CPUID_EXT_TSC_DEADLINE_TIMER;
}
+
+ /* x2apic is reported by GET_SUPPORTED_CPUID, but it can't be enabled
+ * without the in-kernel irqchip
+ */
+ if (!kvm_irqchip_in_kernel()) {
+ ret &= ~CPUID_EXT_X2APIC;
+ }
} else if (function == 0x80000001 && reg == R_EDX) {
/* On Intel, kvm returns cpuid according to the Intel spec,
* so add missing bits according to the AMD spec:
--
1.7.11.4
- [Qemu-devel] [PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 01/15] i386: kvm: kvm_arch_get_supported_cpuid: move R_EDX hack outside of for loop, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 06/15] i386: kvm: extract try_get_cpuid() loop to get_supported_cpuid() function, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 11/15] i386: kvm: mask cpuid_kvm_features earlier, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 07/15] i386: kvm: kvm_arch_get_supported_cpuid: replace if+switch with single 'if', Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 10/15] i386: kvm: x2apic is not supported without in-kernel irqchip,
Eduardo Habkost <=
- [Qemu-devel] [PATCH 08/15] i386: kvm: set CPUID_EXT_HYPERVISOR on kvm_arch_get_supported_cpuid(), Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 14/15] i386: kvm: reformat filter_features_for_kvm() code, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 04/15] i386: kvm: extract register switch to cpuid_entry_get_reg() function, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 02/15] i386: kvm: kvm_arch_get_supported_cpuid: clean up has_kvm_features check, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 15/15] i386: kvm: filter CPUID leaf 7 based on GET_SUPPORTED_CPUID, too, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 13/15] i386: kvm: filter CPUID feature words earlier, on cpu.c, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 12/15] i386: kvm: mask cpuid_ext4_features bits earlier, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 05/15] i386: kvm: extract CPUID entry lookup to cpuid_find_entry() function, Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 09/15] i386: kvm: set CPUID_EXT_TSC_DEADLINE_TIMER on kvm_arch_get_supported_cpuid(), Eduardo Habkost, 2012/10/04
- [Qemu-devel] [PATCH 03/15] i386: kvm: kvm_arch_get_supported_cpuid: use 'entry' variable, Eduardo Habkost, 2012/10/04