]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm__setup_cpuid: use KVM_GET_SUPPORTED_CPUID to simplify cpuid setup
authorAsias He <asias.hejun@gmail.com>
Mon, 12 Jul 2010 12:52:23 +0000 (20:52 +0800)
committerPekka Enberg <penberg@cs.helsinki.fi>
Wed, 14 Jul 2010 09:00:10 +0000 (12:00 +0300)
commit324ede8e59b4625c57287a96336767b52c4d3a67
treea446dc962973f77bc656a00ab3f6f4a9a00dc9b5
parent94ecff6488bdc3c30426d9ae1dd9a8a153824a80
kvm__setup_cpuid: use KVM_GET_SUPPORTED_CPUID to simplify cpuid setup

Let kernel setup "struct kvm_cpuid2" for us!

https://kerneltrap.org/mailarchive/linux-kernel/2010/4/27/4563640
Avi Kivity:
'''
No.  KVM_GET_CPUID2 reads what was set by KVM_SET_CPUID, as modified by
the guest executing the cpuid instruction.  KVM_GET_SUPPORTED_CPUID
tells userspace which bits are supported by the host cpu and kvm.

The API for KVM_GET_SUPPORTED_CPUID returns all cpuid leaves supported
in one go, IIRC.
'''
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
tools/kvm/cpuid.c