All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/stubs: Consolidate the stubs infrastructure in asm/stubs.h
Date: Fri, 16 May 2025 14:49:53 +0100	[thread overview]
Message-ID: <87a0546d-d2e4-4042-b34a-e35e2605123b@citrix.com> (raw)
In-Reply-To: <4a1a8582-7503-49ca-8d34-bce3e101734a@suse.com>

On 16/05/2025 2:41 pm, Jan Beulich wrote:
> On 16.05.2025 15:33, Andrew Cooper wrote:
>> Very few files need the stubs.  Move the infrastructure out of
>> processor.h and config.h into a new stubs.h, and adjust the includes
>> accordingly.
>>
>> Make the per-cpu struct stubs be read mostly; they're unmodified
>> during the uptime of the CPU, and move them into smpboot.c seeing as
>> that's where they're allocated and freed.
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Thanks.

> with one possible suggestion:
>
>> --- /dev/null
>> +++ b/xen/arch/x86/include/asm/stubs.h
>> @@ -0,0 +1,37 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +#ifndef X86_ASM_STUBS_H
>> +#define X86_ASM_STUBS_H
>> +
>> +/*
>> + * Xen has several per-cpu executable stubs which are written dynamically.
> This puts it pretty well. Yet in principle there may be further, perhaps
> entirely different stubs in the future. Hence stubs.h feels a little
> generic. What about exec-stubs.h?

stubs is quite generic; in fact, that was my feedback for struct stubs.

There is something to be said for the header file to be the same as the
struct you want from it.

What did you have in mind for "different stubs"?  The only thing that
makes these special (i.e. not regular per-cpu data) is that we need an
executable mapping of them.  So, while I think it's reasonably likely
that we'll gain other uses (although, we're losing LSTAR/CSTAR when FRED
is enabled), I'm less certain what non-executable stubs would look like.

~Andrew


  reply	other threads:[~2025-05-16 13:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16 13:33 [PATCH] x86/stubs: Consolidate the stubs infrastructure in asm/stubs.h Andrew Cooper
2025-05-16 13:41 ` Jan Beulich
2025-05-16 13:49   ` Andrew Cooper [this message]
2025-05-18  8:21     ` Jan Beulich

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=87a0546d-d2e4-4042-b34a-e35e2605123b@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.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.