diff options
author | Yu Zhang <yu.c.zhang@linux.intel.com> | 2017-08-24 15:27:52 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-08-24 19:09:15 +0300 |
commit | e911eb3b3414e62cbd9853e0a91c124f4a545c0f (patch) | |
tree | e8ac1e3c35b9d452ef099cd3b04f2c1f40fe5c25 /arch/x86/kvm/cpuid.h | |
parent | 3db134805c69aae16ba6193946aa8deccd393ead (diff) | |
download | linux-e911eb3b3414e62cbd9853e0a91c124f4a545c0f.tar.xz |
KVM: x86: Add return value to kvm_cpuid().
Return false in kvm_cpuid() when it fails to find the cpuid
entry. Also, this routine(and its caller) is optimized with
a new argument - check_limit, so that the check_cpuid_limit()
fall back can be avoided.
Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/cpuid.h')
-rw-r--r-- | arch/x86/kvm/cpuid.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h index ac15193e5e52..1ea3c0e1e3a9 100644 --- a/arch/x86/kvm/cpuid.h +++ b/arch/x86/kvm/cpuid.h @@ -21,7 +21,8 @@ int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu, int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, struct kvm_cpuid_entry2 __user *entries); -void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx); +bool kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, + u32 *ecx, u32 *edx, bool check_limit); int cpuid_query_maxphyaddr(struct kvm_vcpu *vcpu); |