All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Mattson <jmattson@google.com>
To: Xiao Guangrong <guangrong.xiao@gmail.com>
Cc: kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH] kvm: vmx: Properly handle machine check during VM-entry
Date: Thu, 25 May 2017 09:17:03 -0700	[thread overview]
Message-ID: <CALMp9eQKxZXDMOZRwhryzBT4x423O3ourNdu0ncCi159iioLbA@mail.gmail.com> (raw)
In-Reply-To: <fd6c008e-0f4c-06a2-14e4-cf59dd74f61f@gmail.com>

There is the added complication that *none* of the VMCS exit
information fields are valid when vmx->fail is true. However, that
oversight affects more than just this function, so I propose to
address it separately.

On Mon, May 22, 2017 at 7:20 PM, Xiao Guangrong
<guangrong.xiao@gmail.com> wrote:
>
> Right, this is exactly what i wanted to say. :)
>
>
> On 05/23/2017 12:04 AM, Jim Mattson wrote:
>>
>> Ah. I had assumed that vmx->exit_reason recorded ony the basic exit
>> reason, since all of the EXIT_REASON macros have bit 31 stripped. The
>> check at the very beginning of vmx_complete_atomic_exit is therefore
>> wrong, since EXIT_REASON_MCE_DURING_VMENTRY (41) will never be seen in
>> the exit reason field of the VMCS. If a machine check occurs during
>> VM-entry, the exit reason is 0x80000029, not 41.
>>
>> On Mon, May 22, 2017 at 1:26 AM, Xiao Guangrong
>> <guangrong.xiao@gmail.com> wrote:
>>>
>>>
>>>
>>> On 05/19/2017 07:02 AM, Jim Mattson wrote:
>>>>
>>>>
>>>> When bit 31 of the exit reason is set to indicate a VM-entry failure,
>>>> only the exit reason and exit qualification fields are set. All other
>>>> VM-exit information fields, including "VM-exit interruption
>>>> information," are unmodified.
>>>
>>>
>>>
>>> This log does not reflects what it is doing. The case that
>>> exit-reason.bit31 = 1 is skipped by the check at the very beginning of
>>> vmx_complete_atomic_exit().
>>>
>>> Maybe what you want to say is just "exit_intr_info is not valid if vmx
>>> exit is caused by EXIT_REASON_MCE_DURING_VMENTRY"?
>>>
>

      reply	other threads:[~2017-05-25 16:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 23:02 [PATCH] kvm: vmx: Properly handle machine check during VM-entry Jim Mattson
2017-05-19 13:39 ` David Hildenbrand
2017-05-19 13:39 ` Radim Krčmář
2017-05-19 15:56   ` [PATCH v2] " Jim Mattson
2017-05-22  8:26 ` [PATCH] " Xiao Guangrong
2017-05-22  9:06   ` Wanpeng Li
2017-05-22 15:14     ` Jim Mattson
2017-05-22 16:04   ` Jim Mattson
2017-05-22 16:48     ` [PATCH v3] " Jim Mattson
2017-05-23  2:20     ` [PATCH] " Xiao Guangrong
2017-05-25 16:17       ` Jim Mattson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALMp9eQKxZXDMOZRwhryzBT4x423O3ourNdu0ncCi159iioLbA@mail.gmail.com \
    --to=jmattson@google.com \
    --cc=guangrong.xiao@gmail.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.