Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3984156ybt; Sun, 5 Jul 2020 12:53:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSiZRjrFH5Y7fjT05xcOsCTkkpZBA9s9D2ZIsJ/DiW/1l/cFWGGvg1QKXxBik1HDogwk9e X-Received: by 2002:a05:6402:1b0e:: with SMTP id by14mr50299452edb.266.1593978819762; Sun, 05 Jul 2020 12:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593978819; cv=none; d=google.com; s=arc-20160816; b=vPihHcJ8M+46EnoIpl2gN49z9h0+wqadMoZrLsZQSW1VlHO4Y9JHEq/JMFiD/BHcgu TGo7sFBQwDiaarJRt79qM4zDZ5Pv61LevTw8zii95a1fMetjJpFlnjIbs4Nxuz7StYo1 kXJEFgD32eirJpgCuUeOeXGU2kLysP0NqceBt4MQTcpOZuZpkNHGljHDt6/zPivDWSvI QJsmrrB7B+uiVUeBp2PFvRvmkaDrfMw24oCh01TbqSLOMTDYOPI7IsNLzaCfialmhMcS Cwdv1BcmkC2fliLtoQjlaFjXS3qAgDBvciHPUIobIR7U4yiSLnxdRlp8oOGBzFkBcn7t /PCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to :importance:content-transfer-encoding:mime-version:cc:to:from :subject:date:dkim-signature; bh=zF7wAOXyUgOSNT4v2T453SNrl5X4QHgqbplJ4/1W1GE=; b=m2e/Z0ct1seI8fMr5r8Yt3vxHKT620VBYMcKDZHVcx4aSLHkWEdKDf+oBv4I1ueJQ5 mYgfu2UFvf2eqi18X6gQsaKWRaeWiBmNC3VGB9OdZGWYNGQCoTf7MDOwsEvf/AZPrZpc YcaS3bOVQq+E9RZsVYhG9SG5+Ui8EgizhVXK7j+cfXtQ5aP9HeA5RoVh5vGC5rwAfa2N XFJMYVotWlO8Ga9Gr2nj96p8t9aCNxPasdSOOjRy1BzsLSpHis7RDavYRjyc4ixDY8vU K9UHe4mruVrWSKjDoGsFa38KcFAAu0G89EmSRbRGQVh2sbFw8A93FaBdV8qMNr8NMCrK L7Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@g001.emailsrvr.com header.s=20190322-9u7zjiwi header.b=uAgZJZqh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si13362011edj.310.2020.07.05.12.53.17; Sun, 05 Jul 2020 12:53:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@g001.emailsrvr.com header.s=20190322-9u7zjiwi header.b=uAgZJZqh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728251AbgGETwK (ORCPT + 99 others); Sun, 5 Jul 2020 15:52:10 -0400 Received: from smtp84.iad3a.emailsrvr.com ([173.203.187.84]:48128 "EHLO smtp84.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728002AbgGETwJ (ORCPT ); Sun, 5 Jul 2020 15:52:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=g001.emailsrvr.com; s=20190322-9u7zjiwi; t=1593978728; bh=ij7EIYjhCd3w9IF306GFbyGJQuU7dUEBuiU+1hkCksM=; h=Date:Subject:From:To:From; b=uAgZJZqhkYvQUjimQy8VTSqQvbxXnL4Z1z9DwQ8KMmH2ZoR+us6kJ++SeJDMpStki 54w+dISo+rmtKfMluxTCKEHHRhJCm9Ave7CFBEoe5dT1zrPez3+cqofVpihm3IWQnk lE0xedafWQdSxsXLLs7WRizpsf3DicpAzz3RIDR4= Received: from app27.wa-webapps.iad3a (relay-webapps.rsapps.net [172.27.255.140]) by smtp19.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 2899737E8; Sun, 5 Jul 2020 15:52:08 -0400 (EDT) Received: from deepplum.com (localhost.localdomain [127.0.0.1]) by app27.wa-webapps.iad3a (Postfix) with ESMTP id 0F66721682; Sun, 5 Jul 2020 15:52:08 -0400 (EDT) Received: by apps.rackspace.com (Authenticated sender: dpreed@deepplum.com, from: dpreed@deepplum.com) with HTTP; Sun, 5 Jul 2020 15:52:08 -0400 (EDT) X-Auth-ID: dpreed@deepplum.com Date: Sun, 5 Jul 2020 15:52:08 -0400 (EDT) Subject: Re: [PATCH v3 2/3] Fix undefined operation fault that can hang a cpu on crash or panic From: "David P. Reed" To: "Andy Lutomirski" Cc: "Sean Christopherson" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "X86 ML" , "H. Peter Anvin" , "Allison Randal" , "Enrico Weigelt" , "Greg Kroah-Hartman" , "Kate Stewart" , "=?utf-8?Q?Peter_Zijlstra_=28Intel=29?=" , "Randy Dunlap" , "Martin Molnar" , "Andy Lutomirski" , "Alexandre Chartre" , "Jann Horn" , "Dave Hansen" , "LKML" MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: quoted-printable Importance: Normal X-Priority: 3 (Normal) X-Type: plain In-Reply-To: References: <20200629214956.GA12962@linux.intel.com> <20200704203809.76391-1-dpreed@deepplum.com> <20200704203809.76391-3-dpreed@deepplum.com> Message-ID: <1593978728.059424180@apps.rackspace.com> X-Mailer: webmail/17.3.12-RC X-Classification-ID: 73f2171e-f80f-4dba-ab50-af6f631ae985-1-1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks, will handle these. 2 questions below.=0A=0AOn Sunday, July 5, 2020 = 2:22pm, "Andy Lutomirski" said:=0A=0A> On Sat, Jul 4, 202= 0 at 1:38 PM David P. Reed wrote:=0A>>=0A>> Fix: Mask= undefined operation fault during emergency VMXOFF that must be=0A>> attemp= ted to force cpu exit from VMX root operation.=0A>> Explanation: When a cpu= may be in VMX root operation (only possible when=0A>> CR4.VMXE is set), cr= ash or panic reboot tries to exit VMX root operation=0A>> using VMXOFF. Thi= s is necessary, because any INIT will be masked while cpu=0A>> is in VMX ro= ot operation, but that state cannot be reliably=0A>> discerned by the state= of the cpu.=0A>> VMXOFF faults if the cpu is not actually in VMX root oper= ation, signalling=0A>> undefined operation.=0A>> Discovered while debugging= an out-of-tree x-visor with a race. Can happen=0A>> due to certain kinds o= f bugs in KVM.=0A> =0A> Can you re-wrap lines to 68 characters? Also, the = Fix: and=0A=0AI used 'scripts/checkpatch.pl' and it had me wrap to 75 chars= :=0A"WARNING: Possible unwrapped commit description (prefer a maximum 75 ch= ars per line)"=0A=0AShould I submit a fix to checkpatch.pl to say 68? =0A= =0A> Explanation: is probably unnecessary. You could say:=0A> =0A> Ignore = a potential #UD failut during emergency VMXOFF ...=0A> =0A> When a cpu may = be in VMX ...=0A> =0A>>=0A>> Fixes: 208067 =0A>> Reported-by: David P. Reed =0A> =0A> It's not really necessary to say that you, the author, reported = the=0A> problem, but I guess it's harmless.=0A> =0A>> Suggested-by: Thomas = Gleixner =0A>> Suggested-by: Sean Christopherson =0A>> Suggested-by: Andy Lutomirski =0A>> Signed-off-by: David P. Reed =0A>> ---=0A>>= arch/x86/include/asm/virtext.h | 20 ++++++++++++++------=0A>> 1 file cha= nged, 14 insertions(+), 6 deletions(-)=0A>>=0A>> diff --git a/arch/x86/incl= ude/asm/virtext.h b/arch/x86/include/asm/virtext.h=0A>> index 0ede8d04535a.= .0e0900eacb9c 100644=0A>> --- a/arch/x86/include/asm/virtext.h=0A>> +++ b/a= rch/x86/include/asm/virtext.h=0A>> @@ -30,11 +30,11 @@ static inline int cp= u_has_vmx(void)=0A>> }=0A>>=0A>>=0A>> -/* Disable VMX on the current CPU= =0A>> +/* Exit VMX root mode and isable VMX on the current CPU.=0A> =0A> s/= isable/disable/=0A> =0A> =0A>> /* Disable VMX if it is supported and enabl= ed on the current CPU=0A>> --=0A>> 2.26.2=0A>>=0A> =0A> Other than that:=0A= > =0A> Reviewed-by: Andy Lutomirski =0A=0AAs a newbie, I h= ave a process question - should I resend the patch with the 'Reviewed-by' l= ine, as well as correcting the other wording? Thanks!=0A=0A> =0A> --Andy=0A= > =0A