Commit bd279629 authored by Paolo Bonzini's avatar Paolo Bonzini

KVM: nSVM: remove exit_required

All events now inject vmexits before vmentry rather than after vmexit.  Therefore,
exit_required is not set anymore and we can remove it.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7c86663b
...@@ -792,8 +792,7 @@ static int svm_check_nested_events(struct kvm_vcpu *vcpu) ...@@ -792,8 +792,7 @@ static int svm_check_nested_events(struct kvm_vcpu *vcpu)
{ {
struct vcpu_svm *svm = to_svm(vcpu); struct vcpu_svm *svm = to_svm(vcpu);
bool block_nested_events = bool block_nested_events =
kvm_event_needs_reinjection(vcpu) || svm->nested.exit_required || kvm_event_needs_reinjection(vcpu) || svm->nested.nested_run_pending;
svm->nested.nested_run_pending;
if (vcpu->arch.exception.pending) { if (vcpu->arch.exception.pending) {
if (block_nested_events) if (block_nested_events)
......
...@@ -2889,13 +2889,6 @@ static int handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) ...@@ -2889,13 +2889,6 @@ static int handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
if (npt_enabled) if (npt_enabled)
vcpu->arch.cr3 = svm->vmcb->save.cr3; vcpu->arch.cr3 = svm->vmcb->save.cr3;
if (unlikely(svm->nested.exit_required)) {
nested_svm_vmexit(svm);
svm->nested.exit_required = false;
return 1;
}
if (is_guest_mode(vcpu)) { if (is_guest_mode(vcpu)) {
int vmexit; int vmexit;
...@@ -3327,13 +3320,6 @@ static fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu) ...@@ -3327,13 +3320,6 @@ static fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)
svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP]; svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP];
svm->vmcb->save.rip = vcpu->arch.regs[VCPU_REGS_RIP]; svm->vmcb->save.rip = vcpu->arch.regs[VCPU_REGS_RIP];
/*
* A vmexit emulation is required before the vcpu can be executed
* again.
*/
if (unlikely(svm->nested.exit_required))
return EXIT_FASTPATH_NONE;
/* /*
* Disable singlestep if we're injecting an interrupt/exception. * Disable singlestep if we're injecting an interrupt/exception.
* We don't want our modified rflags to be pushed on the stack where * We don't want our modified rflags to be pushed on the stack where
......
...@@ -95,9 +95,6 @@ struct nested_state { ...@@ -95,9 +95,6 @@ struct nested_state {
u64 vmcb_msrpm; u64 vmcb_msrpm;
u64 vmcb_iopm; u64 vmcb_iopm;
/* A VMEXIT is required but not yet emulated */
bool exit_required;
/* A VMRUN has started but has not yet been performed, so /* A VMRUN has started but has not yet been performed, so
* we cannot inject a nested vmexit yet. */ * we cannot inject a nested vmexit yet. */
bool nested_run_pending; bool nested_run_pending;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment