Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2661572rwi; Tue, 11 Oct 2022 11:32:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5AMPRtdXCQ7Ljov/fiABIAck2u6QJW3ejO7S+Tpbw/cxpis/Wr7eN+EogusBQm5gNEpMhq X-Received: by 2002:a17:907:daa:b0:78d:9bc9:7d7a with SMTP id go42-20020a1709070daa00b0078d9bc97d7amr13000149ejc.567.1665513150090; Tue, 11 Oct 2022 11:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665513150; cv=none; d=google.com; s=arc-20160816; b=b+P8Sbab9oa0EPZczCmsxaOt+mPAtoNpuFt77NZfZRMShYmsV2I70sLmel4JeVqMi6 xJbMnIPckBNDDKiVP0768ybtjDFvsqG4luXIYpAzPcI//5S6m0xNtTegA1NMzMWM08Ot PCdyDQqGgZxmoE8JMmgYkovNZ2h9oKx2oROd0j4Yk0Cck1akZJCSJHoWXfoQpXdqnu+w i53qgbbqchICkqVRt6OlyWbZuJlgb5VFvLivclfl+F0L7EK9kBULZiFyASfMiaf1+4TP FvTCdJp85O0UiBrVzw/iDQU1Q3LKd66FyWyfhop27dwzOiUkvht5+Qjcv/nEGcgT23ss Cv+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lVDxe058kpxlrzykwvqrfZwiu60slAKOvao+6Jtrv3w=; b=mLZ3MM1LUHNfIyubA2h3Mexg3NZO39gmsSi8y3CnbHG/h4AIxurIDVl+zRTdajdnVn h1PgVuOq6hv1W8TP9q3dKK3pR6S2yKs2PQMqPOXzWe7+CktiPWnKQEsLHfZAII5DDuiV KnVH00P89QnlYSBiRLDo8VBFG7/27cJiGLBuUiKhPZbOyQuNR711MD2iP5TOgXvcbv1/ GNC7g1VRyWee4hvBZsZK9qWrKgEnH9AqYkXW7+Wd3zwJMF1w13QjXdhMySi95mpFFdoo S81eGxuYmTET2wrR3DQkjg1K4mxlDbo19Ro+c8zjZjVGueNyjp0lfkq4Bcf3lcrgVK2d ATWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Cg31XfBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a056402274e00b00459ee392e46si18164423edd.7.2022.10.11.11.32.04; Tue, 11 Oct 2022 11:32:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Cg31XfBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbiJKRxK (ORCPT + 99 others); Tue, 11 Oct 2022 13:53:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbiJKRxH (ORCPT ); Tue, 11 Oct 2022 13:53:07 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E762750732 for ; Tue, 11 Oct 2022 10:53:04 -0700 (PDT) Received: from zn.tnic (p200300ea9733e717329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e717:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 90C1A1EC058B; Tue, 11 Oct 2022 19:52:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1665510777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=lVDxe058kpxlrzykwvqrfZwiu60slAKOvao+6Jtrv3w=; b=Cg31XfBP7KgZQjI/zLOwmgr61/9zIOeP4fqTlOz/Z2Rre2n7qcq3MTaj7aNtYavh+CcBn4 e8F7b3ob5U+6bEmS4Mh4ldYCHbte7FQRSxqwgqWt3ZL+XlIGxic/wgMnR4QlDhSZv6XBv8 g5QwYIOZ4ic9nRRVjtwCI99FhayA/VY= Date: Tue, 11 Oct 2022 19:52:53 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: Daniel Verkamp , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Andrew Cooper Subject: Re: [PATCH] x86: also disable FSRM if ERMS is disabled Message-ID: References: <20220923005827.1533380-1-dverkamp@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 11, 2022 at 05:09:19PM +0000, Luck, Tony wrote: > >> The Intel SDM says: "Software can disable fast-string operation by > >> clearing the fast-string-enable bit (bit 0) of IA32_MISC_ENABLE MSR", > >> so it's not an invalid configuration for this bit to be unset. > > > > Dunno, did Intel folks think about clearing the respective CPUID bits > > when exposing IA32_MISC_ENABLE[0] to software? Tony? > > I don't know if it was thought about. Experimentally clearing bit > 0 of IA32_MISC_ENABLE does not affect the CPUID bit settings > for either ERMS or FSRM (on the one system I tried that supports > both of these bits). Confirms my observation on a Coffeelake here too. Oh well, probably not that important. I mean, I bet luserspace is looking at those CPUID bits - glibc probably - and then probably selects the proper memcpy or so routine, based on what's there. If something clears MSR_IA32_MISC_ENABLE_FAST_STRING_BIT and we go and clear our feature flags and luserspace still queries CPUID then oh well, it'll be fun. It all depends on why something has cleared them tho. It could be some performance thing or something a lot more funky. I guess if stuff starts exploding left and right, there will soon be a microcode patch after that. :-) Might be prudent to check with hw folks just in case... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette