All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger@xenproject.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: Grygorii Strashko <grygorii_strashko@epam.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Teddy Astie <teddy.astie@vates.tech>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] x86/domain: restrict context switch hooks for the idle domain
Date: Fri, 2 Oct 2026 15:30:02 +0200	[thread overview]
Message-ID: <ar-x2j5ggSMKUzMN@Mac.lan> (raw)
In-Reply-To: <8e26f887-453b-47cc-aaea-6c6675d9f9a5@suse.com>

On Fri, Oct 02, 2026 at 01:33:42PM +0200, Jan Beulich wrote:
> On 02.10.2026 13:20, Roger Pau Monne wrote:
> > From: Grygorii Strashko <grygorii_strashko@epam.com>
> > 
> > The arch_init_idle_domain() initializes struct arch_csw idle_csw as:
> > 
> >     static const struct arch_csw idle_csw = {
> >         .from = paravirt_ctxt_switch_from,
> >         .to   = paravirt_ctxt_switch_to,
> >         .tail = idle_loop,
> >     };
> > 
> > but only place where d->arch.ctxt_switch->{to,from}() are used is
> > __context_switch() where they are both guarded by !is_idle_domain(pd)
> > which makes the callbacks in idle_csw unreachable.
> > 
> > Introduce a new poison value to be used in unreachable function hooks, and
> > set the from/to fields of idle_csw to it.  Use a different value from the
> > currently defined ones for easy differentiation.
> > 
> > Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
> > Signed-off-by: Roger Pau Monné <roger@xenproject.org>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> provided this doesn't raise new Misra violations, including for rules which
> aren't entirely clean yet, but which are actively being worked on.

I've wondered the same, but since your recent change in:

68c3f7fb3a84 Eclair: relax long <-> function-pointer conversion deviation

I think it should be fine?  I will run a CI loop first anyway.

Thanks, Roger.


      reply	other threads:[~2026-10-02 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 11:20 [PATCH v2] x86/domain: restrict context switch hooks for the idle domain Roger Pau Monne
2026-10-02 11:33 ` Jan Beulich
2026-10-02 13:30   ` 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=ar-x2j5ggSMKUzMN@Mac.lan \
    --to=roger@xenproject.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=grygorii_strashko@epam.com \
    --cc=jbeulich@suse.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.