lkml.org 
[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: VMX: Enable Notify VM exit
From
Date
On 11/3/2020 2:08 PM, Tao Xu wrote:
>
>
> On 11/3/20 12:43 AM, Andy Lutomirski wrote:
>> On Sun, Nov 1, 2020 at 10:14 PM Tao Xu <tao3.xu@intel.com> wrote:
>>>
...
>>
>>> +static int handle_notify(struct kvm_vcpu *vcpu)
>>> +{
>>> +       unsigned long exit_qualification =
>>> vmcs_readl(EXIT_QUALIFICATION);
>>> +
>>> +       /*
>>> +        * Notify VM exit happened while executing iret from NMI,
>>> +        * "blocked by NMI" bit has to be set before next VM entry.
>>> +        */
>>> +       if (exit_qualification & NOTIFY_VM_CONTEXT_VALID) {
>>> +               if (enable_vnmi &&
>>> +                   (exit_qualification & INTR_INFO_UNBLOCK_NMI))
>>> +                       vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO,
>>> +                                     GUEST_INTR_STATE_NMI);
>>
>> This needs actual documentation in the SDM or at least ISE please.
>>

Hi Andy,

Do you mean SDM or ISE should call out it needs to restore "blocked by
NMI" if bit 12 of exit qualification is set and VMM decides to re-enter
the guest?

you can refer to SDM 27.2.3 "Information about NMI unblocking Due to
IRET" in latest SDM 325462-072US

> Notify VM-Exit is defined in ISE, chapter 9.2:
> https://software.intel.com/content/dam/develop/external/us/en/documents/architecture-instruction-set-extensions-programming-reference.pdf
>
>
> I will add this information into commit message. Thank you for reminding
> me.

\
 
 \ /
  Last update: 2020-11-03 08:31    [W:0.138 / U:9.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site