OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
KVM: nVMX: handle page fault in vmread
[android-x86/kernel.git]
/
arch
/
x86
/
kvm
/
vmx
/
nested.c
diff --git
a/arch/x86/kvm/vmx/nested.c
b/arch/x86/kvm/vmx/nested.c
index
ced9fba
..
a3cba32
100644
(file)
--- a/
arch/x86/kvm/vmx/nested.c
+++ b/
arch/x86/kvm/vmx/nested.c
@@
-4540,6
+4540,7
@@
static int handle_vmread(struct kvm_vcpu *vcpu)
int len;
gva_t gva = 0;
struct vmcs12 *vmcs12;
int len;
gva_t gva = 0;
struct vmcs12 *vmcs12;
+ struct x86_exception e;
short offset;
if (!nested_vmx_check_permission(vcpu))
short offset;
if (!nested_vmx_check_permission(vcpu))
@@
-4588,7
+4589,8
@@
static int handle_vmread(struct kvm_vcpu *vcpu)
vmx_instruction_info, true, len, &gva))
return 1;
/* _system ok, nested_vmx_check_permission has verified cpl=0 */
vmx_instruction_info, true, len, &gva))
return 1;
/* _system ok, nested_vmx_check_permission has verified cpl=0 */
- kvm_write_guest_virt_system(vcpu, gva, &field_value, len, NULL);
+ if (kvm_write_guest_virt_system(vcpu, gva, &field_value, len, &e))
+ kvm_inject_page_fault(vcpu, &e);
}
return nested_vmx_succeed(vcpu);
}
return nested_vmx_succeed(vcpu);