diff options
-rw-r--r-- | arch/x86/kvm/svm/sev.c | 1 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 1 | ||||
-rw-r--r-- | arch/x86/kvm/x86.h | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 87d2840da6af..8bc62e994138 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -3883,7 +3883,6 @@ static int __sev_snp_update_protected_guest_state(struct kvm_vcpu *vcpu) svm->vmcb->control.vmsa_pa = pfn_to_hpa(pfn); /* Mark the vCPU as runnable */ - vcpu->arch.pv.pv_unhalted = false; kvm_set_mp_state(vcpu, KVM_MP_STATE_RUNNABLE); svm->sev_es.snp_vmsa_gpa = INVALID_PAGE; diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3041b8d8b59f..0aca2a5dac7e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -11215,7 +11215,6 @@ static inline int vcpu_block(struct kvm_vcpu *vcpu) switch(vcpu->arch.mp_state) { case KVM_MP_STATE_HALTED: case KVM_MP_STATE_AP_RESET_HOLD: - vcpu->arch.pv.pv_unhalted = false; kvm_set_mp_state(vcpu, KVM_MP_STATE_RUNNABLE); fallthrough; case KVM_MP_STATE_RUNNABLE: diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index 34ca87049845..5c1fd5230cee 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -124,6 +124,8 @@ static inline bool kvm_vcpu_has_run(struct kvm_vcpu *vcpu) static inline void kvm_set_mp_state(struct kvm_vcpu *vcpu, int mp_state) { vcpu->arch.mp_state = mp_state; + if (mp_state == KVM_MP_STATE_RUNNABLE) + vcpu->arch.pv.pv_unhalted = false; } static inline bool kvm_is_exception_pending(struct kvm_vcpu *vcpu) |