Re: [PATCH v3 10/16] x86/msr: Use the alternatives mechanism for RDMSR
From: kernel test robot
Date: Wed Feb 18 2026 - 10:13:26 EST
Hi Juergen,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.19 next-20260218]
[cannot apply to tip/x86/core kvm/queue kvm/next kvm/linux-next tip/x86/tdx]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Juergen-Gross/x86-alternative-Support-alt_replace_call-with-instructions-after-call/20260218-163031
base: linus/master
patch link: https://lore.kernel.org/r/20260218082133.400602-11-jgross%40suse.com
patch subject: [PATCH v3 10/16] x86/msr: Use the alternatives mechanism for RDMSR
config: x86_64-randconfig-076-20260218 (https://download.01.org/0day-ci/archive/20260218/202602182222.WEBLSQRj-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260218/202602182222.WEBLSQRj-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602182222.WEBLSQRj-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
arch/x86/hyperv/hv_crash.c: In function 'hv_hvcrash_ctxt_save':
>> arch/x86/hyperv/hv_crash.c:216:24: error: too few arguments to function '__rdmsr'
216 | ctxt->gsbase = __rdmsr(MSR_GS_BASE);
| ^~~~~~~
In file included from arch/x86/include/asm/tsc.h:11,
from arch/x86/include/asm/timex.h:6,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/jiffies.h:10,
from include/linux/delay.h:14,
from arch/x86/hyperv/hv_crash.c:40:
arch/x86/include/asm/msr.h:167:29: note: declared here
167 | static __always_inline bool __rdmsr(u32 msr, u64 *val, int type)
| ^~~~~~~
arch/x86/hyperv/hv_crash.c:217:22: error: too few arguments to function '__rdmsr'
217 | ctxt->efer = __rdmsr(MSR_EFER);
| ^~~~~~~
arch/x86/include/asm/msr.h:167:29: note: declared here
167 | static __always_inline bool __rdmsr(u32 msr, u64 *val, int type)
| ^~~~~~~
arch/x86/hyperv/hv_crash.c:218:21: error: too few arguments to function '__rdmsr'
218 | ctxt->pat = __rdmsr(MSR_IA32_CR_PAT);
| ^~~~~~~
arch/x86/include/asm/msr.h:167:29: note: declared here
167 | static __always_inline bool __rdmsr(u32 msr, u64 *val, int type)
| ^~~~~~~
arch/x86/hyperv/hv_crash.c: In function 'crash_nmi_callback':
arch/x86/hyperv/hv_crash.c:282:13: warning: variable 'status' set but not used [-Wunused-but-set-variable]
282 | u64 status;
| ^~~~~~
vim +/__rdmsr +216 arch/x86/hyperv/hv_crash.c
94212d34618c26 Mukesh Rathor 2025-10-06 192
94212d34618c26 Mukesh Rathor 2025-10-06 193 /* Save essential context */
94212d34618c26 Mukesh Rathor 2025-10-06 194 static void hv_hvcrash_ctxt_save(void)
94212d34618c26 Mukesh Rathor 2025-10-06 195 {
94212d34618c26 Mukesh Rathor 2025-10-06 196 struct hv_crash_ctxt *ctxt = &hv_crash_ctxt;
94212d34618c26 Mukesh Rathor 2025-10-06 197
94212d34618c26 Mukesh Rathor 2025-10-06 198 asm volatile("movq %%rsp,%0" : "=m"(ctxt->rsp));
94212d34618c26 Mukesh Rathor 2025-10-06 199
94212d34618c26 Mukesh Rathor 2025-10-06 200 ctxt->cr0 = native_read_cr0();
94212d34618c26 Mukesh Rathor 2025-10-06 201 ctxt->cr4 = native_read_cr4();
94212d34618c26 Mukesh Rathor 2025-10-06 202
94212d34618c26 Mukesh Rathor 2025-10-06 203 asm volatile("movq %%cr2, %0" : "=a"(ctxt->cr2));
94212d34618c26 Mukesh Rathor 2025-10-06 204 asm volatile("movq %%cr8, %0" : "=a"(ctxt->cr8));
94212d34618c26 Mukesh Rathor 2025-10-06 205
94212d34618c26 Mukesh Rathor 2025-10-06 206 asm volatile("movl %%cs, %%eax" : "=a"(ctxt->cs));
94212d34618c26 Mukesh Rathor 2025-10-06 207 asm volatile("movl %%ss, %%eax" : "=a"(ctxt->ss));
94212d34618c26 Mukesh Rathor 2025-10-06 208 asm volatile("movl %%ds, %%eax" : "=a"(ctxt->ds));
94212d34618c26 Mukesh Rathor 2025-10-06 209 asm volatile("movl %%es, %%eax" : "=a"(ctxt->es));
94212d34618c26 Mukesh Rathor 2025-10-06 210 asm volatile("movl %%fs, %%eax" : "=a"(ctxt->fs));
94212d34618c26 Mukesh Rathor 2025-10-06 211 asm volatile("movl %%gs, %%eax" : "=a"(ctxt->gs));
94212d34618c26 Mukesh Rathor 2025-10-06 212
94212d34618c26 Mukesh Rathor 2025-10-06 213 native_store_gdt(&ctxt->gdtr);
94212d34618c26 Mukesh Rathor 2025-10-06 214 store_idt(&ctxt->idtr);
94212d34618c26 Mukesh Rathor 2025-10-06 215
94212d34618c26 Mukesh Rathor 2025-10-06 @216 ctxt->gsbase = __rdmsr(MSR_GS_BASE);
94212d34618c26 Mukesh Rathor 2025-10-06 217 ctxt->efer = __rdmsr(MSR_EFER);
94212d34618c26 Mukesh Rathor 2025-10-06 218 ctxt->pat = __rdmsr(MSR_IA32_CR_PAT);
94212d34618c26 Mukesh Rathor 2025-10-06 219 }
94212d34618c26 Mukesh Rathor 2025-10-06 220
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki