Re: [PATCH v7 1/9] KVM: x86: Define KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT

From: kernel test robot

Date: Mon Mar 30 2026 - 03:51:16 EST


Hi Jim,

kernel test robot noticed the following build errors:

[auto build test ERROR on 3d6cdcc8883b5726513d245eef0e91cabfc397f7]

url: https://github.com/intel-lab-lkp/linux/commits/Jim-Mattson/KVM-x86-Define-KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT/20260328-110805
base: 3d6cdcc8883b5726513d245eef0e91cabfc397f7
patch link: https://lore.kernel.org/r/20260327234023.2659476-2-jmattson%40google.com
patch subject: [PATCH v7 1/9] KVM: x86: Define KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT
config: x86_64-randconfig-016-20260330 (https://download.01.org/0day-ci/archive/20260330/202603301501.N2sdlIQ9-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260330/202603301501.N2sdlIQ9-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603301501.N2sdlIQ9-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from arch/x86/kvm/svm/svm_onhyperv.c:11:
arch/x86/kvm/svm/svm.h: In function 'l2_has_separate_pat':
>> arch/x86/kvm/svm/svm.h:626:18: error: implicit declaration of function 'kvm_check_has_quirk'; did you mean 'kvm_check_request'? [-Wimplicit-function-declaration]
626 | !kvm_check_has_quirk(svm->vcpu.kvm,
| ^~~~~~~~~~~~~~~~~~~
| kvm_check_request
In file included from arch/x86/kvm/svm/svm_ops.h:7,
from arch/x86/kvm/svm/svm_onhyperv.c:12:
arch/x86/kvm/x86.h: At top level:
>> arch/x86/kvm/x86.h:429:20: error: conflicting types for 'kvm_check_has_quirk'; have 'bool(struct kvm *, u64)' {aka '_Bool(struct kvm *, long long unsigned int)'}
429 | static inline bool kvm_check_has_quirk(struct kvm *kvm, u64 quirk)
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/svm/svm.h:626:18: note: previous implicit declaration of 'kvm_check_has_quirk' with type 'int()'
626 | !kvm_check_has_quirk(svm->vcpu.kvm,
| ^~~~~~~~~~~~~~~~~~~
--
In file included from kvm/svm/svm_onhyperv.c:11:
kvm/svm/svm.h: In function 'l2_has_separate_pat':
kvm/svm/svm.h:626:18: error: implicit declaration of function 'kvm_check_has_quirk'; did you mean 'kvm_check_request'? [-Wimplicit-function-declaration]
626 | !kvm_check_has_quirk(svm->vcpu.kvm,
| ^~~~~~~~~~~~~~~~~~~
| kvm_check_request
In file included from kvm/svm/svm_ops.h:7,
from kvm/svm/svm_onhyperv.c:12:
arch/x86/kvm/x86.h: At top level:
>> arch/x86/kvm/x86.h:429:20: error: conflicting types for 'kvm_check_has_quirk'; have 'bool(struct kvm *, u64)' {aka '_Bool(struct kvm *, long long unsigned int)'}
429 | static inline bool kvm_check_has_quirk(struct kvm *kvm, u64 quirk)
| ^~~~~~~~~~~~~~~~~~~
kvm/svm/svm.h:626:18: note: previous implicit declaration of 'kvm_check_has_quirk' with type 'int()'
626 | !kvm_check_has_quirk(svm->vcpu.kvm,
| ^~~~~~~~~~~~~~~~~~~


vim +626 arch/x86/kvm/svm/svm.h

618
619 static inline bool l2_has_separate_pat(struct vcpu_svm *svm)
620 {
621 /*
622 * If KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT is disabled while a vCPU
623 * is running, the L2 IA32_PAT semantics for that vCPU are undefined.
624 */
625 return nested_npt_enabled(svm) &&
> 626 !kvm_check_has_quirk(svm->vcpu.kvm,
627 KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT);
628 }
629

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