diff mbox series

KVM: x86: avoid clearing pending exception event twice

Message ID 1579315315-6444-1-git-send-email-linmiaohe@huawei.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: avoid clearing pending exception event twice | expand

Commit Message

Miaohe Lin Jan. 18, 2020, 2:41 a.m. UTC
From: Miaohe Lin <linmiaohe@huawei.com>

The exception pending event is cleared by kvm_clear_exception_queue(). We
shouldn't clear it again.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kvm/x86.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Paolo Bonzini Jan. 18, 2020, 9:26 p.m. UTC | #1
On 18/01/20 03:41, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
> 
> The exception pending event is cleared by kvm_clear_exception_queue(). We
> shouldn't clear it again.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  arch/x86/kvm/x86.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 93bbbce67a03..10fa42f627d9 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -9180,7 +9180,6 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
>  	vcpu->arch.nmi_injected = false;
>  	kvm_clear_interrupt_queue(vcpu);
>  	kvm_clear_exception_queue(vcpu);
> -	vcpu->arch.exception.pending = false;
>  
>  	memset(vcpu->arch.db, 0, sizeof(vcpu->arch.db));
>  	kvm_update_dr0123(vcpu);
> 

Queued, thanks.

Paolo
diff mbox series

Patch

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 93bbbce67a03..10fa42f627d9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -9180,7 +9180,6 @@  void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
 	vcpu->arch.nmi_injected = false;
 	kvm_clear_interrupt_queue(vcpu);
 	kvm_clear_exception_queue(vcpu);
-	vcpu->arch.exception.pending = false;
 
 	memset(vcpu->arch.db, 0, sizeof(vcpu->arch.db));
 	kvm_update_dr0123(vcpu);