All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
	linux-kernel@vger.kernel.org,
	Thadeu Lima de Souza Cascardo <cascardo@canonical.com>,
	Mark Gross <mgross@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	John Johansen <john.johansen@canonical.com>,
	Steve Beattie <sbeattie@ubuntu.com>,
	kernel@collabora.com
Subject: Re: [PATCH v2] x86/speculation/srbds: do not try to turn mitigation off when not supported
Date: Thu, 31 Mar 2022 15:18:42 +0200	[thread overview]
Message-ID: <87lewqz2dp.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20220331084536.y4sl7qcfzltsnnew@guptapa-desk>

Pawan Gupta <pawan.kumar.gupta@linux.intel.com> writes:

Hi Pawan,

>   void update_srbds_msr(void)
>   {
>   	u64 mcu_ctrl;
>   
> -	if (!boot_cpu_has_bug(X86_BUG_SRBDS))
> -		return;
> -
> -	if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
> -		return;
> -
> -	if (srbds_mitigation == SRBDS_MITIGATION_UCODE_NEEDED)
> +	if (!boot_cpu_has_bug(X86_BUG_SRBDS) ||
> +	    !boot_cpu_has(X86_FEATURE_SRBDS_CTRL))
>   		return;

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?

Ricardo

  reply	other threads:[~2022-03-31 13:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30  8:20 [PATCH v2] x86/speculation/srbds: do not try to turn mitigation off when not supported Ricardo Cañuelo
2022-03-30 20:02 ` Borislav Petkov
2022-03-31  7:48   ` Ricardo Cañuelo
2022-03-31  8:35     ` Borislav Petkov
2022-03-31  8:46     ` Pawan Gupta
2022-03-31 13:18       ` Ricardo Cañuelo [this message]
2022-03-31 15:25         ` Borislav Petkov
2022-03-31 16:25           ` Pawan Gupta
2022-03-31  6:53 ` Pawan Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lewqz2dp.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me \
    --to=ricardo.canuelo@collabora.com \
    --cc=bp@alien8.de \
    --cc=cascardo@canonical.com \
    --cc=hpa@zytor.com \
    --cc=john.johansen@canonical.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=sbeattie@ubuntu.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.