All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] x86/MTRR: constrain AP sync and BSP restore
Date: Thu, 27 Mar 2025 11:53:15 +0100	[thread overview]
Message-ID: <Z-UuG2QW56iSfeFj@macbook.local> (raw)
In-Reply-To: <56fbfae0-aac7-4841-ab3c-a7e00dda3744@suse.com>

On Thu, Mar 27, 2025 at 10:54:23AM +0100, Jan Beulich wrote:
> mtrr_set_all() has quite a bit of overhead, which is entirely useless
> when set_mtrr_state() really does nothing. Furthermore, with
> mtrr_state.def_type never initialized from hardware, post_set()'s
> unconditional writing of the MSR means would leave us running in UC
> mode after the sync.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/x86/cpu/mtrr/main.c
> +++ b/xen/arch/x86/cpu/mtrr/main.c
> @@ -605,13 +605,15 @@ void mtrr_aps_sync_begin(void)
>  
>  void mtrr_aps_sync_end(void)
>  {
> -	set_mtrr(~0U, 0, 0, 0);
> +	if (mtrr_if)
> +		set_mtrr(~0U, 0, 0, 0);
>  	hold_mtrr_updates_on_aps = 0;
>  }
>  
>  void mtrr_bp_restore(void)

Maybe I'm blind, but I cannot find any caller to mtrr_bp_restore()?
Am I missing something obvious?

Thanks, Roger.


  reply	other threads:[~2025-03-27 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27  9:54 [PATCH] x86/MTRR: constrain AP sync and BSP restore Jan Beulich
2025-03-27 10:53 ` Roger Pau Monné [this message]
2025-03-27 11:03   ` Jan Beulich
2025-03-27 15:05     ` Andrew Cooper
2025-03-27 16:31 ` Roger Pau Monné

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=Z-UuG2QW56iSfeFj@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xenproject.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.