aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2012-06-20 03:58:04 -0400
committerAvi Kivity <avi@redhat.com>2012-07-11 09:51:17 -0400
commit4f5982a56a70a4a8b7966ef458d3fcdd27aa16cf (patch)
tree38fd4d80fccb21b6556370341610126e7f2bc81a /arch/x86/kvm
parent8e22f955fb65c5930cc4c5a863cce4e27d0e4a3c (diff)
KVM: VMX: export PFEC.P bit on ept
Export the present bit of page fault error code, the later patch will use it Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/vmx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index a2b9dd9af620..5c52a6d29908 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4838,6 +4838,7 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu)
4838{ 4838{
4839 unsigned long exit_qualification; 4839 unsigned long exit_qualification;
4840 gpa_t gpa; 4840 gpa_t gpa;
4841 u32 error_code;
4841 int gla_validity; 4842 int gla_validity;
4842 4843
4843 exit_qualification = vmcs_readl(EXIT_QUALIFICATION); 4844 exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
@@ -4862,7 +4863,13 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu)
4862 4863
4863 gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); 4864 gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);
4864 trace_kvm_page_fault(gpa, exit_qualification); 4865 trace_kvm_page_fault(gpa, exit_qualification);
4865 return kvm_mmu_page_fault(vcpu, gpa, exit_qualification & 0x3, NULL, 0); 4866
4867 /* It is a write fault? */
4868 error_code = exit_qualification & (1U << 1);
4869 /* ept page table is present? */
4870 error_code |= (exit_qualification >> 3) & 0x1;
4871
4872 return kvm_mmu_page_fault(vcpu, gpa, error_code, NULL, 0);
4866} 4873}
4867 4874
4868static u64 ept_rsvd_mask(u64 spte, int level) 4875static u64 ept_rsvd_mask(u64 spte, int level)