All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Oleksii Kurochko <oleksii.kurochko@gmail.com>,
	Jason Andryuk <jason.andryuk@amd.com>,
	Jan Beulich <jbeulich@suse.com>,
	Teddy Astie <teddy.astie@vates.tech>,
	Oleksii Kurochko <oleskii.kurochko@gmail.com>
Subject: Re: [PATCH for-4.22 v3] xen/x86: Change stub page allocation/free
Date: Fri, 12 Jun 2026 11:51:34 +0200	[thread overview]
Message-ID: <aivWpmFsbr9QwXca@macbook.local> (raw)
In-Reply-To: <cda71bb2-9318-4a63-ac0b-95b88e6c5660@citrix.com>

On Fri, Jun 12, 2026 at 10:35:59AM +0100, Andrew Cooper wrote:
> On 12/06/2026 9:22 am, Roger Pau Monne wrote:
> > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> > index 4192edf635b6..0253d22c349d 100644
> > --- a/xen/arch/x86/setup.c
> > +++ b/xen/arch/x86/setup.c
> > @@ -2089,9 +2089,7 @@ void asmlinkage __init noreturn __start_xen(void)
> >  
> >      init_idle_domain();
> >  
> > -    this_cpu(stubs.addr) = alloc_stub_page(smp_processor_id(),
> > -                                           &this_cpu(stubs).mfn);
> > -    BUG_ON(!this_cpu(stubs.addr));
> > +    init_stub();
> 
> While I hate to nitpick further, "stubs".  There are 4 per CPU, and I'm
> reasonably sure we're consistently plural elsewhere.

Funny you ask - I had it as "stubs" initially, but then realized the
existing function is named alloc_stub_page(), and hence switched back
to use "stub" as that seemed more inline with the existing usage.

I will adjust on commit.

> Otherwise (and with Jan's grammar note in the commit message too),
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thanks, yes, that's been adjusted in the commit message.

> One further thought, which would be for a followup patch if we decide to
> do it.
> 
> We do now use UDB for bugframes.  It's also marginally better than INT3
> because if we do ever end up finding ourselves executing it, because
> we'll #UD on the first one, rather than try to brute force our way
> through the #BPs printing a log message per instruction.
> 
> One thing I didn't check and I really need to is whether UDB has the
> same speculation-halting properties that UD2 has.  It's not a guarantee,
> given that the encoding is valid in other modes.

Hm, yes, let's see if I find some time to change it, or whether
someone else beats me to it :).

Roger.


      reply	other threads:[~2026-06-12  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12  8:22 [PATCH for-4.22 v3] xen/x86: Change stub page allocation/free Roger Pau Monne
2026-06-12  9:27 ` Jan Beulich
2026-06-12  9:32   ` Roger Pau Monné
2026-06-12  9:35 ` Andrew Cooper
2026-06-12  9:51   ` Roger Pau Monné [this message]

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=aivWpmFsbr9QwXca@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jason.andryuk@amd.com \
    --cc=jbeulich@suse.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=oleskii.kurochko@gmail.com \
    --cc=teddy.astie@vates.tech \
    --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.