aboutsummaryrefslogtreecommitdiff
path: root/target-i386/kvm.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2015-06-07 11:15:08 +0200
committerEduardo Habkost <ehabkost@redhat.com>2015-07-07 10:47:16 -0300
commit28b8e4d0bf93ba176b4b7be819d537383c5a9060 (patch)
tree00626fe13d21b9400719c5c60ff47bc5bdcb9f94 /target-i386/kvm.c
parent1452673888f6d7f0454276d049846c9bec659233 (diff)
downloadqemu-28b8e4d0bf93ba176b4b7be819d537383c5a9060.zip
qemu-28b8e4d0bf93ba176b4b7be819d537383c5a9060.tar.gz
qemu-28b8e4d0bf93ba176b4b7be819d537383c5a9060.tar.bz2
i386: Introduce ARAT CPU feature
ARAT signals that the APIC timer does not stop in power saving states. As our APICs are emulated, it's fine to expose this feature to guests, at least when asking for KVM host features or with CPU types that include the flag. The exact model number that introduced the feature is not known, but reports can be found that it's at least available since Sandy Bridge. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r--target-i386/kvm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 9038bf7..066d03d 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -238,6 +238,8 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
if (!kvm_irqchip_in_kernel()) {
ret &= ~CPUID_EXT_X2APIC;
}
+ } else if (function == 6 && reg == R_EAX) {
+ ret |= CPUID_6_EAX_ARAT; /* safe to allow because of emulated APIC */
} 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: