From: kernel test robot <lkp@intel.com>
To: Dexuan Cui <decui@microsoft.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH] clocksource: hyper-v: Enable the tsc_page for a TDX VM in TD mode
Date: Sat, 25 May 2024 02:46:45 +0800 [thread overview]
Message-ID: <202405250230.M6wftLlV-lkp@intel.com> (raw)
In-Reply-To: <20240523022441.20879-1-decui@microsoft.com>
Hi Dexuan,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/x86/tdx]
[also build test ERROR on tip/x86/mm tip/x86/core linus/master v6.9 next-20240523]
[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/Dexuan-Cui/clocksource-hyper-v-Enable-the-tsc_page-for-a-TDX-VM-in-TD-mode/20240523-102623
base: tip/x86/tdx
patch link: https://lore.kernel.org/r/20240523022441.20879-1-decui%40microsoft.com
patch subject: [RFC PATCH] clocksource: hyper-v: Enable the tsc_page for a TDX VM in TD mode
config: i386-randconfig-016-20240524 (https://download.01.org/0day-ci/archive/20240525/202405250230.M6wftLlV-lkp@intel.com/config)
compiler: gcc-8 (Ubuntu 8.4.0-3ubuntu2) 8.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240525/202405250230.M6wftLlV-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/202405250230.M6wftLlV-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: arch/x86/kernel/cpu/mshyperv.o: in function `ms_hyperv_init_platform':
>> arch/x86/kernel/cpu/mshyperv.c:453:(.init.text+0x445): undefined reference to `__start_bss_decrypted'
>> ld: arch/x86/kernel/cpu/mshyperv.c:454:(.init.text+0x44a): undefined reference to `__end_bss_decrypted'
vim +453 arch/x86/kernel/cpu/mshyperv.c
378
379 /*
380 * Extract the features and hints
381 */
382 ms_hyperv.features = cpuid_eax(HYPERV_CPUID_FEATURES);
383 ms_hyperv.priv_high = cpuid_ebx(HYPERV_CPUID_FEATURES);
384 ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
385 ms_hyperv.hints = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
386
387 hv_max_functions_eax = cpuid_eax(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS);
388
389 pr_info("Hyper-V: privilege flags low 0x%x, high 0x%x, hints 0x%x, misc 0x%x\n",
390 ms_hyperv.features, ms_hyperv.priv_high, ms_hyperv.hints,
391 ms_hyperv.misc_features);
392
393 ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS);
394 ms_hyperv.max_lp_index = cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS);
395
396 pr_debug("Hyper-V: max %u virtual processors, %u logical processors\n",
397 ms_hyperv.max_vp_index, ms_hyperv.max_lp_index);
398
399 /*
400 * Check CPU management privilege.
401 *
402 * To mirror what Windows does we should extract CPU management
403 * features and use the ReservedIdentityBit to detect if Linux is the
404 * root partition. But that requires negotiating CPU management
405 * interface (a process to be finalized). For now, use the privilege
406 * flag as the indicator for running as root.
407 *
408 * Hyper-V should never specify running as root and as a Confidential
409 * VM. But to protect against a compromised/malicious Hyper-V trying
410 * to exploit root behavior to expose Confidential VM memory, ignore
411 * the root partition setting if also a Confidential VM.
412 */
413 if ((ms_hyperv.priv_high & HV_CPU_MANAGEMENT) &&
414 !(ms_hyperv.priv_high & HV_ISOLATION)) {
415 hv_root_partition = true;
416 pr_info("Hyper-V: running as root partition\n");
417 }
418
419 if (ms_hyperv.hints & HV_X64_HYPERV_NESTED) {
420 hv_nested = true;
421 pr_info("Hyper-V: running on a nested hypervisor\n");
422 }
423
424 if (ms_hyperv.features & HV_ACCESS_FREQUENCY_MSRS &&
425 ms_hyperv.misc_features & HV_FEATURE_FREQUENCY_MSRS_AVAILABLE) {
426 x86_platform.calibrate_tsc = hv_get_tsc_khz;
427 x86_platform.calibrate_cpu = hv_get_tsc_khz;
428 }
429
430 if (ms_hyperv.priv_high & HV_ISOLATION) {
431 ms_hyperv.isolation_config_a = cpuid_eax(HYPERV_CPUID_ISOLATION_CONFIG);
432 ms_hyperv.isolation_config_b = cpuid_ebx(HYPERV_CPUID_ISOLATION_CONFIG);
433
434 if (ms_hyperv.shared_gpa_boundary_active)
435 ms_hyperv.shared_gpa_boundary =
436 BIT_ULL(ms_hyperv.shared_gpa_boundary_bits);
437
438 hyperv_paravisor_present = !!ms_hyperv.paravisor_present;
439
440 pr_info("Hyper-V: Isolation Config: Group A 0x%x, Group B 0x%x\n",
441 ms_hyperv.isolation_config_a, ms_hyperv.isolation_config_b);
442
443
444 if (hv_get_isolation_type() == HV_ISOLATION_TYPE_SNP) {
445 static_branch_enable(&isolation_type_snp);
446 } else if (hv_get_isolation_type() == HV_ISOLATION_TYPE_TDX) {
447 static_branch_enable(&isolation_type_tdx);
448
449 /* A TDX VM must use x2APIC and doesn't use lazy EOI. */
450 ms_hyperv.hints &= ~HV_X64_APIC_ACCESS_RECOMMENDED;
451
452 if (!ms_hyperv.paravisor_present) {
> 453 unsigned long vaddr = (unsigned long)__start_bss_decrypted;
> 454 unsigned long vaddr_end = (unsigned long)__end_bss_decrypted;
455
456 for (; vaddr < vaddr_end; vaddr += PMD_SIZE)
457 set_memory_decrypted(vaddr, PMD_SIZE >> PAGE_SHIFT);
458
459 /* HV_MSR_CRASH_CTL is unsupported. */
460 ms_hyperv.misc_features &= ~HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE;
461
462 /* Don't trust Hyper-V's TLB-flushing hypercalls. */
463 ms_hyperv.hints &= ~HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED;
464
465 x86_init.acpi.reduced_hw_early_init = reduced_hw_init;
466 }
467 }
468 }
469
470 if (hv_max_functions_eax >= HYPERV_CPUID_NESTED_FEATURES) {
471 ms_hyperv.nested_features =
472 cpuid_eax(HYPERV_CPUID_NESTED_FEATURES);
473 pr_info("Hyper-V: Nested features: 0x%x\n",
474 ms_hyperv.nested_features);
475 }
476
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-05-24 18:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 2:24 [RFC PATCH] clocksource: hyper-v: Enable the tsc_page for a TDX VM in TD mode Dexuan Cui
2024-05-23 12:06 ` Kirill A. Shutemov
2024-05-24 8:22 ` Dexuan Cui
2024-05-23 14:25 ` Dave Hansen
2024-05-24 8:45 ` Dexuan Cui
2024-05-24 22:44 ` Michael Kelley
2024-05-28 14:15 ` Tom Lendacky
2024-05-28 9:16 ` kirill.shutemov
2024-05-24 17:52 ` kernel test robot
2024-05-24 18:46 ` kernel test robot [this message]
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=202405250230.M6wftLlV-lkp@intel.com \
--to=lkp@intel.com \
--cc=decui@microsoft.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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.