From: Xiao Guangrong Subject: Re: [PATCH] kvm: vmx: Properly handle machine check during VM-entry Date: Tue, 23 May 2017 10:20:16 +0800 Message-ID: References: <20170518230239.86518-1-jmattson@google.com> <61f6cb5f-9912-c95d-4a45-04691a970ddd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm list To: Jim Mattson Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:35601 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757403AbdEWCUM (ORCPT ); Mon, 22 May 2017 22:20:12 -0400 Received: by mail-pf0-f193.google.com with SMTP id u26so23914518pfd.2 for ; Mon, 22 May 2017 19:20:12 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: 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 > 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"? >>