From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (193.142.43.55:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 01 Nov 2019 18:51:38 -0000 Received: from youngberry.canonical.com ([91.189.89.112]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1iQc1J-0004BS-5M for speck@linutronix.de; Fri, 01 Nov 2019 19:51:38 +0100 Received: from 162-237-133-238.lightspeed.rcsntx.sbcglobal.net ([162.237.133.238] helo=elm) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iQc1C-00005N-8K for speck@linutronix.de; Fri, 01 Nov 2019 18:51:30 +0000 Date: Fri, 1 Nov 2019 13:51:27 -0500 From: Tyler Hicks Subject: [MODERATED] Re: [PATCH v8 3/5] NX 3 Message-ID: <20191101185126.GA12673@elm> References: <1572564827-26288-1-git-send-email-pbonzini@redhat.com> <1572564827-26288-4-git-send-email-pbonzini@redhat.com> <20191101002350.GA26083@guptapadev.amr> <91ff125b-068d-9f4a-fa3c-ca0bfec38c17@redhat.com> <20191101183815.GA6582@u1904> MIME-Version: 1.0 In-Reply-To: <20191101183815.GA6582@u1904> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On 2019-11-01 11:38:15, speck for mark gross wrote: > On Fri, Nov 01, 2019 at 08:07:27AM +0100, speck for Paolo Bonzini wrote: > > On 01/11/19 01:24, speck for Pawan Gupta wrote: > > > On Fri, Nov 01, 2019 at 12:33:45AM +0100, speck for Paolo Bonzini wrote: > > >> From: Paolo Bonzini > > >> Subject: [PATCH v8 3/5] kvm: mmu: ITLB_MULTIHIT mitigation > > >> > > >> + kvm.nx_huge_pages= > > >> + [KVM] Controls the sw workaround for bug > > >> + X86_BUG_ITLB_MULTIHIT. > > >> + force : Always deploy workaround. > > >> + off : Default. Never deploy workaround. > > > > > > off is not the default in the code, so the default should be "auto" here. > > > > > >> + auto : Deploy workaround based on presence of > > >> + X86_BUG_ITLB_MULTIHIT. > > > > > > Also mitigations=off is not disabling this mitigation. Below patch does > > > that when mitigations=off and kvm.nx_huge_pages=auto. > > > > > > --- > > > From: Pawan Gupta > > > Date: Wed, 30 Oct 2019 21:28:24 -0700 > > > Subject: [PATCH] kvm: x86: mmu: Apply global mitigations knob to ITLB_MULTIHIT > > > > > > Problem: The global mitigation knob mitigations=off does not turn off > > > X86_BUG_ITLB_MULTIHIT mitigation. > > > > > > Fix: Turn off the mitigation when ITLB_MULTIHIT mitigation mode is > > > "auto" and mitigations are turned off globally via cmdline > > > mitigations=off. > > > > > > Signed-off-by: Pawan Gupta > > > > Thanks, I'll post v9 soon. Are you going to post backports as bundles > > on top of Thomas's? > > > > Paolo > We (I) have attempted the backports of this and quicly hit issues with the page > zapping changes do to code flux in the upstream. My troubles started with with > 5.2 and 4.19. Is this due to the lack of kvm_mmu_zap_all_fast()? I believe that Paolo and others said in an older thread that kvm_mmu_invalidate_zap_all_pages() could be used instead. That's what I've been planning to do in Ubuntu but I haven't had a chance to test it yet. Tyler > I have reached out to an internal resource who is more knowledgable > with KVM mm files to assist with that aspect of the backport. The > engineer was at a confrence this week and we hope to make more > progress next week once he is back. > > --mark >