llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [RFC Patch v2 3/4] x86/Hyper-V: Not use auto-eoi when Secure AVIC is available
       [not found] <20250613110829.122371-4-ltykernel@gmail.com>
@ 2025-06-14 13:32 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-14 13:32 UTC (permalink / raw)
  To: Tianyu Lan; +Cc: llvm, oe-kbuild-all

Hi Tianyu,

[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/core]
[also build test ERROR on linus/master v6.16-rc1 next-20250613]
[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/Tianyu-Lan/x86-Hyper-V-Not-use-hv-apic-driver-when-Secure-AVIC-is-available/20250613-191041
base:   tip/x86/core
patch link:    https://lore.kernel.org/r/20250613110829.122371-4-ltykernel%40gmail.com
patch subject: [RFC Patch v2 3/4] x86/Hyper-V: Not use auto-eoi when Secure AVIC is available
config: i386-buildonly-randconfig-003-20250614 (https://download.01.org/0day-ci/archive/20250614/202506142143.mZm3MmgZ-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/20250614/202506142143.mZm3MmgZ-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/202506142143.mZm3MmgZ-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kernel/cpu/mshyperv.c:466:22: error: use of undeclared identifier 'CC_ATTR_SNP_SECURE_AVIC'
     466 |         if (cc_platform_has(CC_ATTR_SNP_SECURE_AVIC))
         |                             ^
   1 error generated.


vim +/CC_ATTR_SNP_SECURE_AVIC +466 arch/x86/kernel/cpu/mshyperv.c

   442	
   443		/*
   444		 * Extract the features and hints
   445		 */
   446		ms_hyperv.features = cpuid_eax(HYPERV_CPUID_FEATURES);
   447		ms_hyperv.priv_high = cpuid_ebx(HYPERV_CPUID_FEATURES);
   448		ms_hyperv.ext_features = cpuid_ecx(HYPERV_CPUID_FEATURES);
   449		ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
   450		ms_hyperv.hints    = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
   451	
   452		hv_max_functions_eax = cpuid_eax(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS);
   453	
   454		pr_info("Hyper-V: privilege flags low %#x, high %#x, ext %#x, hints %#x, misc %#x\n",
   455			ms_hyperv.features, ms_hyperv.priv_high,
   456			ms_hyperv.ext_features, ms_hyperv.hints,
   457			ms_hyperv.misc_features);
   458	
   459		ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS);
   460		ms_hyperv.max_lp_index = cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS);
   461	
   462		pr_debug("Hyper-V: max %u virtual processors, %u logical processors\n",
   463			 ms_hyperv.max_vp_index, ms_hyperv.max_lp_index);
   464	
   465		hv_identify_partition_type();
 > 466		if (cc_platform_has(CC_ATTR_SNP_SECURE_AVIC))
   467			ms_hyperv.hints |= HV_DEPRECATING_AEOI_RECOMMENDED;
   468	
   469		if (ms_hyperv.hints & HV_X64_HYPERV_NESTED) {
   470			hv_nested = true;
   471			pr_info("Hyper-V: running on a nested hypervisor\n");
   472		}
   473	
   474		if (ms_hyperv.features & HV_ACCESS_FREQUENCY_MSRS &&
   475		    ms_hyperv.misc_features & HV_FEATURE_FREQUENCY_MSRS_AVAILABLE) {
   476			x86_platform.calibrate_tsc = hv_get_tsc_khz;
   477			x86_platform.calibrate_cpu = hv_get_tsc_khz;
   478			setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
   479		}
   480	
   481		if (ms_hyperv.priv_high & HV_ISOLATION) {
   482			ms_hyperv.isolation_config_a = cpuid_eax(HYPERV_CPUID_ISOLATION_CONFIG);
   483			ms_hyperv.isolation_config_b = cpuid_ebx(HYPERV_CPUID_ISOLATION_CONFIG);
   484	
   485			if (ms_hyperv.shared_gpa_boundary_active)
   486				ms_hyperv.shared_gpa_boundary =
   487					BIT_ULL(ms_hyperv.shared_gpa_boundary_bits);
   488	
   489			hyperv_paravisor_present = !!ms_hyperv.paravisor_present;
   490	
   491			pr_info("Hyper-V: Isolation Config: Group A 0x%x, Group B 0x%x\n",
   492				ms_hyperv.isolation_config_a, ms_hyperv.isolation_config_b);
   493	
   494	
   495			if (hv_get_isolation_type() == HV_ISOLATION_TYPE_SNP) {
   496				static_branch_enable(&isolation_type_snp);
   497			} else if (hv_get_isolation_type() == HV_ISOLATION_TYPE_TDX) {
   498				static_branch_enable(&isolation_type_tdx);
   499	
   500				/* A TDX VM must use x2APIC and doesn't use lazy EOI. */
   501				ms_hyperv.hints &= ~HV_X64_APIC_ACCESS_RECOMMENDED;
   502	
   503				if (!ms_hyperv.paravisor_present) {
   504					/*
   505					 * Mark the Hyper-V TSC page feature as disabled
   506					 * in a TDX VM without paravisor so that the
   507					 * Invariant TSC, which is a better clocksource
   508					 * anyway, is used instead.
   509					 */
   510					ms_hyperv.features &= ~HV_MSR_REFERENCE_TSC_AVAILABLE;
   511	
   512					/*
   513					 * The Invariant TSC is expected to be available
   514					 * in a TDX VM without paravisor, but if not,
   515					 * print a warning message. The slower Hyper-V MSR-based
   516					 * Ref Counter should end up being the clocksource.
   517					 */
   518					if (!(ms_hyperv.features & HV_ACCESS_TSC_INVARIANT))
   519						pr_warn("Hyper-V: Invariant TSC is unavailable\n");
   520	
   521					/* HV_MSR_CRASH_CTL is unsupported. */
   522					ms_hyperv.misc_features &= ~HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE;
   523	
   524					/* Don't trust Hyper-V's TLB-flushing hypercalls. */
   525					ms_hyperv.hints &= ~HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED;
   526	
   527					x86_init.acpi.reduced_hw_early_init = reduced_hw_init;
   528				}
   529			}
   530		}
   531	
   532		if (hv_max_functions_eax >= HYPERV_CPUID_NESTED_FEATURES) {
   533			ms_hyperv.nested_features =
   534				cpuid_eax(HYPERV_CPUID_NESTED_FEATURES);
   535			pr_info("Hyper-V: Nested features: 0x%x\n",
   536				ms_hyperv.nested_features);
   537		}
   538	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-14 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250613110829.122371-4-ltykernel@gmail.com>
2025-06-14 13:32 ` [RFC Patch v2 3/4] x86/Hyper-V: Not use auto-eoi when Secure AVIC is available kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).