Skip to content

Commit a4d956b

Browse files
MiaoheLinbonzini
authored andcommitted
KVM: nVMX: vmread should not set rflags to specify success in case of #PF
In case writing to vmread destination operand result in a #PF, vmread should not call nested_vmx_succeed() to set rflags to specify success. Similar to as done in VMPTRST (See handle_vmptrst()). Reviewed-by: Liran Alon <[email protected]> Signed-off-by: Miaohe Lin <[email protected]> Cc: [email protected] Reviewed-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent b5c3c1b commit a4d956b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/kvm/vmx/nested.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4799,8 +4799,10 @@ static int handle_vmread(struct kvm_vcpu *vcpu)
47994799
instr_info, true, len, &gva))
48004800
return 1;
48014801
/* _system ok, nested_vmx_check_permission has verified cpl=0 */
4802-
if (kvm_write_guest_virt_system(vcpu, gva, &value, len, &e))
4802+
if (kvm_write_guest_virt_system(vcpu, gva, &value, len, &e)) {
48034803
kvm_inject_page_fault(vcpu, &e);
4804+
return 1;
4805+
}
48044806
}
48054807

48064808
return nested_vmx_succeed(vcpu);

0 commit comments

Comments
 (0)