Skip to content

Commit e8af9e9

Browse files
committed
KVM: nSVM: remove nonsensical EXITINFO1 adjustment on nested NPF
The "if" that drops the present bit from the page structure fauls makes no sense. It was added by yours truly in order to be bug-compatible with pre-existing code and in order to make the tests pass; however, the tests are wrong. The behavior after this patch matches bare metal. Reported-by: Nadav Amit <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 3edd683 commit e8af9e9

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

arch/x86/kvm/svm/nested.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ static void nested_svm_inject_npf_exit(struct kvm_vcpu *vcpu,
4848
svm->vmcb->control.exit_info_1 &= ~0xffffffffULL;
4949
svm->vmcb->control.exit_info_1 |= fault->error_code;
5050

51-
/*
52-
* The present bit is always zero for page structure faults on real
53-
* hardware.
54-
*/
55-
if (svm->vmcb->control.exit_info_1 & (2ULL << 32))
56-
svm->vmcb->control.exit_info_1 &= ~1;
57-
5851
nested_svm_vmexit(svm);
5952
}
6053

0 commit comments

Comments
 (0)