[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <119b9a64-b071-41e3-f690-89f4ac52bd7b@redhat.com>
Date: Thu, 23 Apr 2020 20:32:32 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>
Cc: Cathy Avery <cavery@...hat.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, vkuznets@...hat.com, wei.huang2@....com
Subject: Re: [PATCH 2/2] KVM: x86: check_nested_events if there is an
injectable NMI
On 23/04/20 17:43, Paolo Bonzini wrote:
>>
> Ah no, it's a bug in Cathy's patch and it's a weird one.
>
> The problem is that on AMD you exit guest mode with the NMI latched and
> GIF=0. So check_nested_events should enable the NMI window in addition
> to causing a vmexit.
>
> So why does it work? Because on AMD we don't have (yet)
> nested_run_pending, so we just check if we already have a vmexit
> scheduled and if so return -EBUSY. The second call causes
> inject_pending_event to return -EBUSY and thus go through KVM_REQ_EVENT
> again, which enables the NMI window.
... and this means that suddenly your event handling series has become
twice as large so I'm taking it over.
Paolo
Powered by blists - more mailing lists