Re: [PATCH] KVM: x86: avoid clearing pending exception event twice

From: Paolo Bonzini
Date: Sat Jan 18 2020 - 16:27:05 EST


On 18/01/20 03:41, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@xxxxxxxxxx>
>
> The exception pending event is cleared by kvm_clear_exception_queue(). We
> shouldn't clear it again.
>
> Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
> ---
> 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