summaryrefslogtreecommitdiffstats
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorJason Andryuk <jason.andryuk@amd.com>2025-04-10 15:31:05 -0400
committerIngo Molnar <mingo@kernel.org>2025-04-11 11:39:50 +0200
commit164a9f712fa53e4c92b2a435bb071a5be0c31dbc (patch)
treeed4fdebaa39de8b026a155facb8a85def30fba62 /rust/helpers/task.c
parent0c7cae12f67c4c5fd232cffb27023deb409e1e20 (diff)
downloadlinux-164a9f712fa53e4c92b2a435bb071a5be0c31dbc.tar.gz
linux-164a9f712fa53e4c92b2a435bb071a5be0c31dbc.tar.bz2
linux-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 <jgross@suse.com> Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Juergen Gross <jgross@suse.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Xin Li (Intel)" <xin@zytor.com> Link: https://lore.kernel.org/r/20250410193106.16353-1-jason.andryuk@amd.com
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions