From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751706AbdG0Ref (ORCPT ); Thu, 27 Jul 2017 13:34:35 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:36309 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbdG0Red (ORCPT ); Thu, 27 Jul 2017 13:34:33 -0400 MIME-Version: 1.0 In-Reply-To: <62566e96-4e05-1622-bf3c-bf392506e84b@amd.com> References: <28648b23b9957506069e20bd985e3d7e8af94780.1501092102.git.thomas.lendacky@amd.com> <20170727071717.aydwpzaji6l2o6xs@gmail.com> <62566e96-4e05-1622-bf3c-bf392506e84b@amd.com> From: Linus Torvalds Date: Thu, 27 Jul 2017 10:34:32 -0700 X-Google-Sender-Auth: SxXE1j-SssHyJbSpUycBamB6b5w Message-ID: Subject: Re: [PATCH v1 1/2] x86/mm, kexec: Fix memory corruption with SME on successive kexecs To: Tom Lendacky Cc: Ingo Molnar , "the arch/x86 maintainers" , Linux Kernel Mailing List , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Thomas Gleixner , Dave Young , Brijesh Singh , Kexec Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 27, 2017 at 7:15 AM, Tom Lendacky wrote: > > I can #ifdef the wbinvd based on whether AMD_MEM_ENCRYPT is configured > or not so that the wbinvd is avoided if not configured. I suspect an ifdef will be useless, since things like distro kernels tend to enable everything. So it should probably be disabled dynamically, and only done if the AMD memory encryption thing has actually been active. [ There have also been various actual errata with wbinvd, so there tends to be a non-performance reason to try to avoid it unless strictly required ] Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1damgY-000344-Lk for kexec@lists.infradead.org; Thu, 27 Jul 2017 17:34:56 +0000 Received: by mail-oi0-x241.google.com with SMTP id e124so15214612oig.0 for ; Thu, 27 Jul 2017 10:34:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <62566e96-4e05-1622-bf3c-bf392506e84b@amd.com> References: <28648b23b9957506069e20bd985e3d7e8af94780.1501092102.git.thomas.lendacky@amd.com> <20170727071717.aydwpzaji6l2o6xs@gmail.com> <62566e96-4e05-1622-bf3c-bf392506e84b@amd.com> From: Linus Torvalds Date: Thu, 27 Jul 2017 10:34:32 -0700 Message-ID: Subject: Re: [PATCH v1 1/2] x86/mm, kexec: Fix memory corruption with SME on successive kexecs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Tom Lendacky Cc: Brijesh Singh , the arch/x86 maintainers , Kexec Mailing List , Linux Kernel Mailing List , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Thomas Gleixner , Dave Young , Ingo Molnar On Thu, Jul 27, 2017 at 7:15 AM, Tom Lendacky wrote: > > I can #ifdef the wbinvd based on whether AMD_MEM_ENCRYPT is configured > or not so that the wbinvd is avoided if not configured. I suspect an ifdef will be useless, since things like distro kernels tend to enable everything. So it should probably be disabled dynamically, and only done if the AMD memory encryption thing has actually been active. [ There have also been various actual errata with wbinvd, so there tends to be a non-performance reason to try to avoid it unless strictly required ] Linus _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec