diff options
| author | Jason Andryuk <[email protected]> | 2025-04-10 19:31:05 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2025-04-11 09:39:50 +0000 |
| commit | 164a9f712fa53e4c92b2a435bb071a5be0c31dbc (patch) | |
| tree | ed4fdebaa39de8b026a155facb8a85def30fba62 /rust/helpers/bug.c | |
| parent | Merge tag 'irq-urgent-2025-04-10' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
| download | kernel-164a9f712fa53e4c92b2a435bb071a5be0c31dbc.tar.gz kernel-164a9f712fa53e4c92b2a435bb071a5be0c31dbc.zip | |
x86/xen: Fix __xen_hypercall_setfunc()
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 <[email protected]>
Signed-off-by: Jason Andryuk <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: "Xin Li (Intel)" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'rust/helpers/bug.c')
0 files changed, 0 insertions, 0 deletions
