From: kernel test robot <lkp@intel.com>
To: Roman Kisel <romank@linux.microsoft.com>,
ardb@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com,
decui@microsoft.com, dimitri.sivanich@hpe.com,
haiyangz@microsoft.com, hpa@zytor.com, imran.f.khan@oracle.com,
jacob.jun.pan@linux.intel.com, jgross@suse.com,
justin.ernst@hpe.com, kprateek.nayak@amd.com, kyle.meyer@hpe.com,
kys@microsoft.com, lenb@kernel.org, mingo@redhat.com,
nikunj@amd.com, papaluri@amd.com, perry.yuan@amd.com,
rafael@kernel.org, russ.anderson@hpe.com, steve.wahl@hpe.com,
tglx@linutronix.de, thomas.lendacky@amd.com,
tim.c.chen@linux.intel.com, tony.luck@intel.com,
wei.liu@kernel.org, xin@zytor.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH hyperv-next] arch/x86: Provide the CPU number in the wakeup AP callback
Date: Wed, 30 Apr 2025 09:48:23 +0800 [thread overview]
Message-ID: <202504300914.IDPnAX2v-lkp@intel.com> (raw)
In-Reply-To: <20250428225948.810147-1-romank@linux.microsoft.com>
Hi Roman,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 628cc040b3a2980df6032766e8ef0688e981ab95]
url: https://github.com/intel-lab-lkp/linux/commits/Roman-Kisel/arch-x86-Provide-the-CPU-number-in-the-wakeup-AP-callback/20250429-070238
base: 628cc040b3a2980df6032766e8ef0688e981ab95
patch link: https://lore.kernel.org/r/20250428225948.810147-1-romank%40linux.microsoft.com
patch subject: [PATCH hyperv-next] arch/x86: Provide the CPU number in the wakeup AP callback
config: x86_64-buildonly-randconfig-006-20250430 (https://download.01.org/0day-ci/archive/20250430/202504300914.IDPnAX2v-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250430/202504300914.IDPnAX2v-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504300914.IDPnAX2v-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/x86/hyperv/ivm.c:300:16: warning: variable 'start_ip' set but not used [-Wunused-but-set-variable]
300 | unsigned long start_ip;
| ^
1 warning generated.
vim +/start_ip +300 arch/x86/hyperv/ivm.c
291
292 int hv_snp_boot_ap(struct wakeup_secondary_cpu_data *wakeup)
293 {
294 struct sev_es_save_area *vmsa = (struct sev_es_save_area *)
295 __get_free_page(GFP_KERNEL | __GFP_ZERO);
296 struct sev_es_save_area *cur_vmsa;
297 struct desc_ptr gdtr;
298 u64 ret, retry = 5;
299 struct hv_enable_vp_vtl *start_vp_input;
> 300 unsigned long start_ip;
301 unsigned long flags;
302 u32 cpu;
303
304 if (!vmsa)
305 return -ENOMEM;
306
307 cpu = wakeup->cpu;
308 start_ip = wakeup->apicid;
309
310 native_store_gdt(&gdtr);
311
312 vmsa->gdtr.base = gdtr.address;
313 vmsa->gdtr.limit = gdtr.size;
314
315 asm volatile("movl %%es, %%eax;" : "=a" (vmsa->es.selector));
316 hv_populate_vmcb_seg(vmsa->es, vmsa->gdtr.base);
317
318 asm volatile("movl %%cs, %%eax;" : "=a" (vmsa->cs.selector));
319 hv_populate_vmcb_seg(vmsa->cs, vmsa->gdtr.base);
320
321 asm volatile("movl %%ss, %%eax;" : "=a" (vmsa->ss.selector));
322 hv_populate_vmcb_seg(vmsa->ss, vmsa->gdtr.base);
323
324 asm volatile("movl %%ds, %%eax;" : "=a" (vmsa->ds.selector));
325 hv_populate_vmcb_seg(vmsa->ds, vmsa->gdtr.base);
326
327 vmsa->efer = native_read_msr(MSR_EFER);
328
329 vmsa->cr4 = native_read_cr4();
330 vmsa->cr3 = __native_read_cr3();
331 vmsa->cr0 = native_read_cr0();
332
333 vmsa->xcr0 = 1;
334 vmsa->g_pat = HV_AP_INIT_GPAT_DEFAULT;
335 vmsa->rip = (u64)secondary_startup_64_no_verify;
336 vmsa->rsp = (u64)&ap_start_stack[PAGE_SIZE];
337
338 /*
339 * Set the SNP-specific fields for this VMSA:
340 * VMPL level
341 * SEV_FEATURES (matches the SEV STATUS MSR right shifted 2 bits)
342 */
343 vmsa->vmpl = 0;
344 vmsa->sev_features = sev_status >> 2;
345
346 ret = snp_set_vmsa(vmsa, true);
347 if (ret) {
348 pr_err("RMPADJUST(%llx) failed: %llx\n", (u64)vmsa, ret);
349 free_page((u64)vmsa);
350 return ret;
351 }
352
353 local_irq_save(flags);
354 start_vp_input = (struct hv_enable_vp_vtl *)ap_start_input_arg;
355 memset(start_vp_input, 0, sizeof(*start_vp_input));
356 start_vp_input->partition_id = -1;
357 start_vp_input->vp_index = cpu;
358 start_vp_input->target_vtl.target_vtl = ms_hyperv.vtl;
359 *(u64 *)&start_vp_input->vp_context = __pa(vmsa) | 1;
360
361 do {
362 ret = hv_do_hypercall(HVCALL_START_VP,
363 start_vp_input, NULL);
364 } while (hv_result(ret) == HV_STATUS_TIME_OUT && retry--);
365
366 local_irq_restore(flags);
367
368 if (!hv_result_success(ret)) {
369 pr_err("HvCallStartVirtualProcessor failed: %llx\n", ret);
370 snp_cleanup_vmsa(vmsa);
371 vmsa = NULL;
372 }
373
374 cur_vmsa = per_cpu(hv_sev_vmsa, cpu);
375 /* Free up any previous VMSA page */
376 if (cur_vmsa)
377 snp_cleanup_vmsa(cur_vmsa);
378
379 /* Record the current VMSA page */
380 per_cpu(hv_sev_vmsa, cpu) = vmsa;
381
382 return ret;
383 }
384
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-04-30 1:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 22:59 [PATCH hyperv-next] arch/x86: Provide the CPU number in the wakeup AP callback Roman Kisel
2025-04-30 1:48 ` kernel test robot [this message]
2025-04-30 4:05 ` Michael Kelley
2025-04-30 15:18 ` Roman Kisel
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=202504300914.IDPnAX2v-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=dimitri.sivanich@hpe.com \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=imran.f.khan@oracle.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=jgross@suse.com \
--cc=justin.ernst@hpe.com \
--cc=kprateek.nayak@amd.com \
--cc=kyle.meyer@hpe.com \
--cc=kys@microsoft.com \
--cc=lenb@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=papaluri@amd.com \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=romank@linux.microsoft.com \
--cc=russ.anderson@hpe.com \
--cc=steve.wahl@hpe.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tim.c.chen@linux.intel.com \
--cc=tony.luck@intel.com \
--cc=wei.liu@kernel.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 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.