public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: "Jürgen Groß" <jgross@suse.com>
Cc: Jason Andryuk <jason.andryuk@amd.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"Xin Li (Intel)" <xin@zytor.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/xen: Fix __xen_hypercall_setfunc
Date: Fri, 11 Apr 2025 11:44:07 +0200	[thread overview]
Message-ID: <Z_jkZw58Ew5Iwj5K@gmail.com> (raw)
In-Reply-To: <ff39455a-7fa8-48c1-ba43-33ea4992f6e1@suse.com>


* Jürgen Groß <jgross@suse.com> wrote:

> On 11.04.25 11:27, Ingo Molnar wrote:
> > 
> > * Juergen Gross <jgross@suse.com> wrote:
> > 
> > > On 10.04.25 21:31, Jason Andryuk wrote:
> > > > Hypercall detection is failing with xen_hypercall_intel() chosen even on
> > > > an AMD processor.  Looking at the disassembly, the call to
> > > > xen_get_vendor() was removed.
> > > > 
> > > > The check for boot_cpu_has(X86_FEATURE_CPUID) was used as a proxy for
> > > > the x86_vendor having been set.  When
> > > > CONFIG_X86_REQUIRED_FEATURE_CPUID=y (the default value), DCE eliminates
> > > > the call to xen_get_vendor().  An uninitialized value 0 means
> > > > X86_VENDOR_INTEL, so the Intel function is always returned.
> > > > 
> > > > Remove the if and always call xen_get_vendor() to avoid this issue.
> > > > 
> > > > Fixes: 3d37d9396eb3 ("x86/cpufeatures: Add {REQUIRED,DISABLED} feature configs")
> > > > Suggested-by: Juergen Gross <jgross@suse.com>
> > > > Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
> > > 
> > > Reviewed-by: Juergen Gross <jgross@suse.com>
> > 
> > Wanna merge this via the Xen tree, or should it go to x86/urgent?
> > 
> > The bug was *caused* by the x86 tree so we'd be glad to merge,
> > but your call.
> 
> x86/urgent is fine for me.

Applied, thanks!

	Ingo





  reply	other threads:[~2025-04-11  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 19:31 [PATCH] x86/xen: Fix __xen_hypercall_setfunc Jason Andryuk
2025-04-11  7:46 ` Juergen Gross
2025-04-11  9:27   ` Ingo Molnar
2025-04-11  9:29     ` Jürgen Groß
2025-04-11  9:44       ` Ingo Molnar [this message]
2025-04-11 10:01 ` [tip: x86/urgent] x86/xen: Fix __xen_hypercall_setfunc() tip-bot2 for Jason Andryuk

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_jkZw58Ew5Iwj5K@gmail.com \
    --to=mingo@kernel.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jason.andryuk@amd.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xin@zytor.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox