i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID
commit66e3dd9282141b5ae75637c9676002cf3ceeb988
authorAvi Kivity <avi@redhat.com>
Wed, 9 Nov 2011 13:44:36 +0000 (9 15:44 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 9 Nov 2011 18:06:20 +0000 (9 12:06 -0600)
tree2969dfbd9358905cc0de86a422e5b3098710fd98
parent4f26f2b6f2fba52b13f4c2ad1790f46c96a0923e
i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID

The fact that a host cpu supports a feature doesn't mean that QEMU and KVM
will also support it, yet -cpuid host brings host features wholesale.

We need to whitelist each feature separately to make sure we support it.
This patch adds KVM whitelisting (by simply using KVM_GET_SUPPORTED_CPUID
instead of the CPUID instruction).

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-i386/cpuid.c