diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5bbcad345376..df866684bad1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3017,6 +3017,16 @@ struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu, | |||
3017 | return best; | 3017 | return best; |
3018 | } | 3018 | } |
3019 | 3019 | ||
3020 | int cpuid_maxphyaddr(struct kvm_vcpu *vcpu) | ||
3021 | { | ||
3022 | struct kvm_cpuid_entry2 *best; | ||
3023 | |||
3024 | best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0); | ||
3025 | if (best) | ||
3026 | return best->eax & 0xff; | ||
3027 | return 36; | ||
3028 | } | ||
3029 | |||
3020 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) | 3030 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) |
3021 | { | 3031 | { |
3022 | u32 function, index; | 3032 | u32 function, index; |