llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Wed, 19 Nov 2025 17:54:20 +0800	[thread overview]
Message-ID: <202511191755.QwebkOuA-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-11-19  9:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202511191755.QwebkOuA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=seanjc@google.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 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).