* [intel-tdx:kvm-upstream-workaround 256/338] arch/x86/kvm/vmx/tdx.c:2547:6: warning: variable 'intr_info' set but not used
@ 2023-04-30 7:16 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-04-30 7:16 UTC (permalink / raw)
To: Yuan Yao; +Cc: llvm, oe-kbuild-all, Isaku Yamahata
tree: https://github.com/intel/tdx.git kvm-upstream-workaround
head: abaa3072a8763b7a6276df61d205bf33eb2f31a5
commit: de4a8b56e21e09b5d0cca6f846b97837a41aa37c [256/338] KVM: TDX: Basic exception injection support for DEBUG TDX guest
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20230430/202304301527.MTE2GE63-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel/tdx/commit/de4a8b56e21e09b5d0cca6f846b97837a41aa37c
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream-workaround
git checkout de4a8b56e21e09b5d0cca6f846b97837a41aa37c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kvm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304301527.MTE2GE63-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/x86/kvm/vmx/tdx.c:2547:6: warning: variable 'intr_info' set but not used [-Wunused-but-set-variable]
u32 intr_info;
^
1 warning generated.
vim +/intr_info +2547 arch/x86/kvm/vmx/tdx.c
2532
2533 void tdx_set_gdt(struct kvm_vcpu *vcpu, struct desc_ptr *dt)
2534 {
2535 if (!is_debug_td(vcpu))
2536 return;
2537
2538 td_vmcs_write32(to_tdx(vcpu), GUEST_GDTR_LIMIT, dt->size);
2539 td_vmcs_write64(to_tdx(vcpu), GUEST_GDTR_BASE, dt->address);
2540 }
2541 void tdx_inject_exception(struct kvm_vcpu *vcpu)
2542 {
2543 struct vcpu_tdx *tdx;
2544 unsigned int vector;
2545 bool has_error_code;
2546 u32 error_code;
> 2547 u32 intr_info;
2548
2549 if (KVM_BUG_ON(!is_debug_td(vcpu), vcpu->kvm))
2550 return;
2551
2552 tdx = to_tdx(vcpu);
2553 vector = vcpu->arch.exception.vector;
2554 has_error_code = vcpu->arch.exception.has_error_code;
2555 error_code = vcpu->arch.exception.error_code;
2556 intr_info = vector | INTR_INFO_VALID_MASK;
2557
2558 kvm_deliver_exception_payload(vcpu, &vcpu->arch.exception);
2559
2560 if (has_error_code) {
2561 td_vmcs_write32(tdx, VM_ENTRY_EXCEPTION_ERROR_CODE,
2562 error_code);
2563 intr_info |= INTR_INFO_DELIVER_CODE_MASK;
2564 }
2565
2566 if (kvm_exception_is_soft(vector)) {
2567 td_vmcs_write32(tdx, VM_ENTRY_INSTRUCTION_LEN,
2568 vcpu->arch.event_exit_inst_len);
2569 intr_info |= INTR_TYPE_SOFT_EXCEPTION;
2570 } else {
2571 intr_info |= INTR_TYPE_HARD_EXCEPTION;
2572 }
2573
2574 pr_warn_once("Exception injection is not supported by TDX.\n");
2575 /* td_vmcs_write32(tdx, VM_ENTRY_INTR_INFO_FIELD, intr_info);*/
2576 }
2577
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-30 7:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-30 7:16 [intel-tdx:kvm-upstream-workaround 256/338] arch/x86/kvm/vmx/tdx.c:2547:6: warning: variable 'intr_info' set but not used 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).