Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1063104pxb; Fri, 1 Apr 2022 03:41:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytfc3yrFl3gtXS3QdGlK2ioB/Ser3K/EAip+7CEzZWXgs9aPzlCP/xCfCaSwdxB0E09h2f X-Received: by 2002:a17:907:3e82:b0:6e1:3fe3:9b14 with SMTP id hs2-20020a1709073e8200b006e13fe39b14mr8723738ejc.561.1648809670712; Fri, 01 Apr 2022 03:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648809670; cv=none; d=google.com; s=arc-20160816; b=U2HXgCgZIY64IwNNe9iUY26LFnLILz8N0rcMhxrNqxoXpmYEM6UC6eVI+gHP9PMoN1 BlEf2DirqzBaSmPjGzP5EreVypH0aj6TB8S4xpXfYDK6nmxXMDT/9sWZFNzWE+No5PDY nJidZtmvZ5qJWOB18n2wj89hbreT5IOEuYchCpe9kh7rozqd+wY9Y8oeOeyKkTIUxtAq D3kIFPxTLGxSScveMRtNuTuJRdR51wdXf9BBkNe+902amdXlLf7T4wbz1OUvBZD1fmf0 0QOIG/m1MOK6OpXmrM1YaZDPaYWlWayWTutX0akU3Vsh1q19I0BPUKOQ0nMeYxICn1SX Y8Rw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=K39xzJCzMIfJZm6eIoQb2BiBcAhIWHVyv80OXULZPaI=; b=mNrhPSy5Vp4wihgwxZC11zLroKHkgXxpmIKDtaku08jYswusaTDH6V6EtmHW0MUsT2 QwcA6+M6zHM6xysVYQeI5RMOqFrCgHQ7xhxyaXDKD0od6sKfAU/18XlKud63sXT2G4pl LyfXclHi5HJpS6wEscWUIB7y9oh7l87pNTYdRuYfSvcg5FhVcJzgf/HjXCMVFV5wjmAz UWAyam8K0r3ZgBiBwm/yrjLH11TABMA6UZrTuy2khxiQ/4ToUNs1C+pKnUtt61lZoTnn Vfvt4dBsLHnEUAgGXgEHxEqv1Sd3S9vulZ+k5y/yZaS1LQMKREgT1cuaa5+Bry3rNsDa U/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=I3agSK1W; 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 qh25-20020a170906ecb900b006dfb07cee7fsi1423409ejb.11.2022.04.01.03.40.44; Fri, 01 Apr 2022 03:41:10 -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=I3agSK1W; 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 S238233AbiCaP1U (ORCPT + 99 others); Thu, 31 Mar 2022 11:27:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238219AbiCaP1R (ORCPT ); Thu, 31 Mar 2022 11:27:17 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB3791BBF40 for ; Thu, 31 Mar 2022 08:25:29 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (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 7D6E91EC050F; Thu, 31 Mar 2022 17:25:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1648740323; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K39xzJCzMIfJZm6eIoQb2BiBcAhIWHVyv80OXULZPaI=; b=I3agSK1WyGR8JKtRZPvCMXfaK9HUh7GgMPfYa7uGV8jY2f60AVvq1y2E8rz8csw10uH48N Dk2/vF8paPOChaQOG503eZ5xK6IJOgNayvQK35VgMnaOx0u8rRnXz8j0piwS5vXVkauVlm U3aFoGI+lbM8ltsWRz8pRTpvFA/5nKw= Date: Thu, 31 Mar 2022 17:25:27 +0200 From: Borislav Petkov To: Ricardo =?utf-8?Q?Ca=C3=B1uelo?= Cc: Pawan Gupta , linux-kernel@vger.kernel.org, Thadeu Lima de Souza Cascardo , Mark Gross , x86@kernel.org, "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , John Johansen , Steve Beattie , kernel@collabora.com Subject: Re: [PATCH v2] x86/speculation/srbds: do not try to turn mitigation off when not supported Message-ID: References: <20220330082026.1549073-1-ricardo.canuelo@collabora.com> <87o81mzhoh.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> <20220331084536.y4sl7qcfzltsnnew@guptapa-desk> <87lewqz2dp.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87lewqz2dp.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> 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, T_SCC_BODY_TEXT_LINE 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 Thu, Mar 31, 2022 at 03:18:42PM +0200, Ricardo CaƱuelo wrote: > Just to clarify, this changes the behavior wrt the hypervisor case: > currently it just bails out of update_srbds_msr(), with your patch it'd > clear RNGDS_MITG_DIS from MSR_IA32_MCU_OPT_CTRL. Is that what you > intended? Just do the simple thing I pasted earlier - no need to rewrite the whole function for no good reason. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette