* [sean-jc:vmx/nested_hlt_pause_intercept 7/7] arch/x86/kvm/vmx/vmx.c:8084:40: error: too few arguments to function call, expected 3, have 2
@ 2025-01-17 21:43 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-17 21:43 UTC (permalink / raw)
To: Sean Christopherson; +Cc: llvm, oe-kbuild-all
tree: https://github.com/sean-jc/linux vmx/nested_hlt_pause_intercept
head: 3eba42004fd15e5353a24b6527ea809e83e2985a
commit: 3eba42004fd15e5353a24b6527ea809e83e2985a [7/7] KVM: nVMX: Synthesize nested VM-Exit for supported emulation intercepts
config: i386-randconfig-005-20250117 (https://download.01.org/0day-ci/archive/20250118/202501180547.K24Poiak-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250118/202501180547.K24Poiak-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/202501180547.K24Poiak-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/x86/kvm/vmx/vmx.c:17:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/x86/include/asm/cacheflush.h:5:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> arch/x86/kvm/vmx/vmx.c:8084:40: error: too few arguments to function call, expected 3, have 2
8084 | if (!vmx_is_io_intercepted(vcpu, info))
| ~~~~~~~~~~~~~~~~~~~~~ ^
arch/x86/kvm/vmx/vmx.c:8010:13: note: 'vmx_is_io_intercepted' declared here
8010 | static bool vmx_is_io_intercepted(struct kvm_vcpu *vcpu,
| ^ ~~~~~~~~~~~~~~~~~~~~~~
8011 | struct x86_instruction_info *info,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8012 | unsigned long *exit_qualification)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +8084 arch/x86/kvm/vmx/vmx.c
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8055
5f18c642ff7e21 arch/x86/kvm/vmx/vmx.c Paolo Bonzini 2024-03-18 8056 int vmx_check_intercept(struct kvm_vcpu *vcpu,
8a76d7f25f8f24 arch/x86/kvm/vmx.c Joerg Roedel 2011-04-04 8057 struct x86_instruction_info *info,
21f1b8f29ea5b2 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-02-18 8058 enum x86_intercept_stage stage,
21f1b8f29ea5b2 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-02-18 8059 struct x86_exception *exception)
8a76d7f25f8f24 arch/x86/kvm/vmx.c Joerg Roedel 2011-04-04 8060 {
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8061 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8062 unsigned long exit_qualification = 0;
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8063 u32 vm_exit_reason;
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8064
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8065 switch (info->intercept) {
4948ba1f4b2af0 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8066 case x86_intercept_rdpid:
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8067 /*
4948ba1f4b2af0 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8068 * RDPID causes #UD if not enabled through secondary execution
4948ba1f4b2af0 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8069 * controls (ENABLE_RDTSCP). Note, the implicit MSR access to
4948ba1f4b2af0 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8070 * TSC_AUX is NOT subject to interception, i.e. checking only
4948ba1f4b2af0 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8071 * the dedicated execution control is architecturally correct.
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8072 */
7f3603b6313623 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23 8073 if (!nested_cpu_has2(vmcs12, SECONDARY_EXEC_ENABLE_RDTSCP)) {
21f1b8f29ea5b2 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-02-18 8074 exception->vector = UD_VECTOR;
21f1b8f29ea5b2 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-02-18 8075 exception->error_code_valid = false;
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8076 return X86EMUL_PROPAGATE_FAULT;
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8077 }
4948ba1f4b2af0 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8078 return X86EMUL_CONTINUE;
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8079
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8080 case x86_intercept_in:
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8081 case x86_intercept_ins:
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8082 case x86_intercept_out:
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8083 case x86_intercept_outs:
b057118e8af266 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 @8084 if (!vmx_is_io_intercepted(vcpu, info))
b057118e8af266 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8085 return X86EMUL_CONTINUE;
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8086
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8087 vm_exit_reason = EXIT_REASON_IO_INSTRUCTION;
b057118e8af266 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8088 break;
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8089
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8090 case x86_intercept_lgdt:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8091 case x86_intercept_lidt:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8092 case x86_intercept_lldt:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8093 case x86_intercept_ltr:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8094 case x86_intercept_sgdt:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8095 case x86_intercept_sidt:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8096 case x86_intercept_sldt:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8097 case x86_intercept_str:
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8098 if (!nested_cpu_has2(vmcs12, SECONDARY_EXEC_DESC))
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8099 return X86EMUL_CONTINUE;
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8100
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8101 if (info->intercept == x86_intercept_lldt ||
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8102 info->intercept == x86_intercept_ltr ||
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8103 info->intercept == x86_intercept_sldt ||
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8104 info->intercept == x86_intercept_str)
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8105 vm_exit_reason = EXIT_REASON_LDTR_TR;
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8106 else
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8107 vm_exit_reason = EXIT_REASON_GDTR_IDTR;
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8108 /*
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8109 * FIXME: Decode the ModR/M to generate the correct exit
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8110 * qualification for memory operands.
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8111 */
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8112 break;
86f7e90ce840aa arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-29 8113
9bbc38752725d4 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8114 case x86_intercept_hlt:
9bbc38752725d4 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8115 if (!nested_cpu_has(vmcs12, CPU_BASED_HLT_EXITING))
9bbc38752725d4 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8116 return X86EMUL_CONTINUE;
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8117
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8118 vm_exit_reason = EXIT_REASON_HLT;
9bbc38752725d4 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8119 break;
9bbc38752725d4 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8120
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8121 case x86_intercept_pause:
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8122 /*
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8123 * PAUSE is a single-byte NOP with a REPE prefix, i.e. collides
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8124 * with vanilla NOPs in the emulator. Apply the interception
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8125 * check only to actual PAUSE instructions. Don't check
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8126 * PAUSE-loop-exiting, software can't expect a given PAUSE to
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8127 * exit, i.e. KVM is within its rights to allow L2 to execute
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8128 * the PAUSE.
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8129 */
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8130 if ((info->rep_prefix != REPE_PREFIX) ||
7a223b397dc217 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8131 !nested_cpu_has(vmcs12, CPU_BASED_PAUSE_EXITING))
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8132 return X86EMUL_CONTINUE;
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8133
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8134 vm_exit_reason = EXIT_REASON_PAUSE_INSTRUCTION;
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8135 break;
4984563823f003 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2023-04-04 8136
fb6d4d340e0532 arch/x86/kvm/vmx.c Paolo Bonzini 2016-07-12 8137 /* TODO: check more intercepts... */
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8138 default:
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8139 return X86EMUL_UNHANDLEABLE;
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8140 }
35a571346a94fb arch/x86/kvm/vmx/vmx.c Oliver Upton 2020-02-04 8141
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8142 nested_vmx_vmexit(vcpu, vm_exit_reason, 0, exit_qualification);
3eba42004fd15e arch/x86/kvm/vmx/vmx.c Sean Christopherson 2025-01-16 8143 return X86EMUL_INTERCEPTED;
8a76d7f25f8f24 arch/x86/kvm/vmx.c Joerg Roedel 2011-04-04 8144 }
8a76d7f25f8f24 arch/x86/kvm/vmx.c Joerg Roedel 2011-04-04 8145
:::::: The code at line 8084 was first introduced by commit
:::::: b057118e8af2668869986a817ef0196510be9818 KVM: nVMX: Consolidate missing X86EMUL_INTERCEPTED logic in L2 emulation
:::::: TO: Sean Christopherson <seanjc@google.com>
:::::: CC: Sean Christopherson <seanjc@google.com>
--
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-01-17 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 21:43 [sean-jc:vmx/nested_hlt_pause_intercept 7/7] arch/x86/kvm/vmx/vmx.c:8084:40: error: too few arguments to function call, expected 3, have 2 kernel test robot
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.