KVM: Always report x2apic as supported feature
authorGleb Natapov <gleb@redhat.com>
Sun, 12 Jul 2009 13:10:55 +0000 (16:10 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:33:11 +0000 (08:33 +0300)
We emulate x2apic in software, so host support is not required.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c

index e3d9040f2156eeb0d82150783b2674a54e35fc7f..dfb0e37b3c65f6f6e553db1b8fd3fc8ecf3812aa 100644 (file)
@@ -1504,6 +1504,9 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
        case 1:
                entry->edx &= kvm_supported_word0_x86_features;
                entry->ecx &= kvm_supported_word4_x86_features;
+               /* we support x2apic emulation even if host does not support
+                * it since we emulate x2apic in software */
+               entry->ecx |= F(X2APIC);
                break;
        /* function 2 entries are STATEFUL. That is, repeated cpuid commands
         * may return different values. This forces us to get_cpu() before