diff mbox series

[2/3] KVM: x86: a vCPU with a pending triple fault is runnable

Message ID 20220427173758.517087-3-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: never write to memory from kvm_vcpu_check_block | expand

Commit Message

Paolo Bonzini April 27, 2022, 5:37 p.m. UTC
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/x86.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Maxim Levitsky April 27, 2022, 8:41 p.m. UTC | #1
On Wed, 2022-04-27 at 13:37 -0400, Paolo Bonzini wrote:
> Cc: stable@vger.kernel.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  arch/x86/kvm/x86.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 0e73607b02bd..d563812ca229 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -12187,6 +12187,9 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
>  	    kvm_x86_ops.nested_ops->has_events(vcpu))
>  		return true;
>  
> +	if (kvm_test_request(KVM_REQ_TRIPLE_FAULT, vcpu))
> +		return true;
> +
>  	return false;
>  }
>  

True.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>

Best regards,
	Maxim Levitsky
diff mbox series

Patch

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 0e73607b02bd..d563812ca229 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -12187,6 +12187,9 @@  static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
 	    kvm_x86_ops.nested_ops->has_events(vcpu))
 		return true;
 
+	if (kvm_test_request(KVM_REQ_TRIPLE_FAULT, vcpu))
+		return true;
+
 	return false;
 }