Hi Tao, kernel test robot noticed the following build warnings: [auto build test WARNING on 708283abf896dd4853e673cc8cba70acaf9bf4ea] url: https://github.com/intel-lab-lkp/linux/commits/Tao-Su/x86-apic-Introduce-X2APIC_ICR_UNUSED_12-for-x2APIC-mode/20230904-093801 base: 708283abf896dd4853e673cc8cba70acaf9bf4ea patch link: https://lore.kernel.org/r/20230904013555.725413-3-tao1.su%40linux.intel.com patch subject: [PATCH 2/2] KVM: x86: Clear X2APIC_ICR_UNUSED_12 after APIC-write VM-exit config: x86_64-randconfig-003-20230904 (https://download.01.org/0day-ci/archive/20230904/202309041224.CDj6t1BN-lkp@xxxxxxxxx/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230904/202309041224.CDj6t1BN-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/202309041224.CDj6t1BN-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> arch/x86/kvm/lapic.c:2445:30: warning: variable 'val' is uninitialized when used here [-Wuninitialized] kvm_x2apic_icr_write(apic, val); ^~~ arch/x86/kvm/lapic.c:2435:9: note: initialize the variable 'val' to silence this warning u64 val; ^ = 0 1 warning generated. vim +/val +2445 arch/x86/kvm/lapic.c 2430 2431 /* emulate APIC access in a trap manner */ 2432 void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset) 2433 { 2434 struct kvm_lapic *apic = vcpu->arch.apic; 2435 u64 val; 2436 2437 /* 2438 * ICR is a single 64-bit register when x2APIC is enabled. For legacy 2439 * xAPIC, ICR writes need to go down the common (slightly slower) path 2440 * to get the upper half from ICR2. 2441 * 2442 * TODO: optimize to just emulate side effect w/o one more write 2443 */ 2444 if (apic_x2apic_mode(apic) && offset == APIC_ICR) { > 2445 kvm_x2apic_icr_write(apic, val); 2446 } else { 2447 val = kvm_lapic_get_reg(apic, offset); 2448 kvm_lapic_reg_write(apic, offset, (u32)val); 2449 } 2450 } 2451 EXPORT_SYMBOL_GPL(kvm_apic_write_nodecode); 2452 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki