llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [sean-jc:vmx/sgx2_pferr_intercept 9/9] arch/x86/kvm/vmx/vmx.c:5213:17: error: call to undeclared function 'IS_ENABLED_'; ISO C99 and later do not support implicit function declarations
@ 2025-11-19  9:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-19  9:54 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/sean-jc/linux vmx/sgx2_pferr_intercept
head:   8a7add4d5d370361f93bd73f26aa92f198250ce5
commit: 8a7add4d5d370361f93bd73f26aa92f198250ce5 [9/9] KVM: VMX: Always reflect SGX EPCM #PFs back into the guest
config: x86_64-randconfig-013-20251119 (https://download.01.org/0day-ci/archive/20251119/202511191755.QwebkOuA-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251119/202511191755.QwebkOuA-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/202511191755.QwebkOuA-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/kvm/vmx/vmx.c:5213:17: error: call to undeclared function 'IS_ENABLED_'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    5213 |                 WARN_ON_ONCE(!IS_ENABLED_(CONFIG_X86_SGX_KVM) ||
         |                               ^
>> arch/x86/kvm/vmx/vmx.c:5213:29: error: use of undeclared identifier 'CONFIG_X86_SGX_KVM'
    5213 |                 WARN_ON_ONCE(!IS_ENABLED_(CONFIG_X86_SGX_KVM) ||
         |                                           ^
   2 errors generated.


vim +/IS_ENABLED_ +5213 arch/x86/kvm/vmx/vmx.c

  5195	
  5196	static int vmx_handle_page_fault(struct kvm_vcpu *vcpu, u32 error_code)
  5197	{
  5198		unsigned long cr2 = vmx_get_exit_qual(vcpu);
  5199	
  5200		if (vcpu->arch.apf.host_apf_flags)
  5201			goto handle_pf;
  5202	
  5203		/* When using EPT, KVM intercepts #PF only to detect illegal GPAs. */
  5204		WARN_ON_ONCE(enable_ept && !allow_smaller_maxphyaddr);
  5205	
  5206		/*
  5207		 * On SGX2 hardware, EPCM violations are delivered as #PF with the SGX
  5208		 * flag set in the error code (SGX1 harware generates #GP(0)).  EPCM
  5209		 * violations have nothing to do with shadow paging and can never be
  5210		 * resolved by KVM; always reflect them into the guest.
  5211		 */
  5212		if (error_code & PFERR_SGX_MASK) {
> 5213			WARN_ON_ONCE(!IS_ENABLED_(CONFIG_X86_SGX_KVM) ||
  5214				     !cpu_feature_enabled(X86_FEATURE_SGX2));
  5215			if (guest_cpu_cap_has(vcpu, X86_FEATURE_SGX2))
  5216				kvm_fixup_and_inject_pf_error(vcpu, cr2, error_code);
  5217			else
  5218				kvm_inject_gp(vcpu, 0);
  5219			return 1;
  5220		}
  5221	
  5222		/*
  5223		 * If EPT is enabled, fixup and inject the #PF.  KVM intercepts #PFs
  5224		 * only to set PFERR_RSVD as appropriate (hardware won't set RSVD due
  5225		 * to the GPA being legal with respect to host.MAXPHYADDR).
  5226		 */
  5227		if (enable_ept) {
  5228			kvm_fixup_and_inject_pf_error(vcpu, cr2, error_code);
  5229			return 1;
  5230		}
  5231	
  5232	handle_pf:
  5233		return kvm_handle_page_fault(vcpu, error_code, cr2, NULL, 0);
  5234	}
  5235	

-- 
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-11-19  9:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-19  9:54 [sean-jc:vmx/sgx2_pferr_intercept 9/9] arch/x86/kvm/vmx/vmx.c:5213:17: error: call to undeclared function 'IS_ENABLED_'; ISO C99 and later do not support implicit function declarations 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).