aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorDong, Eddie <eddie.dong@intel.com>2009-03-30 04:21:08 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:35 -0400
commit82725b20e22fb85377f61a16f6d0d5cfc28b45d3 (patch)
tree16049e38be3262efa60f0d39a85cdf97006550cf /arch/x86/kvm/x86.c
parent362c1055e58ecd25a9393c520ab263c80b147497 (diff)
KVM: MMU: Emulate #PF error code of reserved bits violation
Detect, indicate, and propagate page faults where reserved bits are set. Take care to handle the different paging modes, each of which has different sets of reserved bits. [avi: fix pte reserved bits for efer.nxe=0] Signed-off-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c10
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
3020int 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
3020void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) 3030void kvm_emulate_cpuid(struct kvm_vcpu *vcpu)
3021{ 3031{
3022 u32 function, index; 3032 u32 function, index;