All of lore.kernel.org
 help / color / mirror / Atom feed
* [sean-jc:x86/stale_mmio_cleanup 70/72] arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
@ 2025-04-02  8:38 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-02  8:38 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: oe-kbuild-all

tree:   https://github.com/sean-jc/linux x86/stale_mmio_cleanup
head:   1f284ca401d9620d6f0e4aea289cc2a50c4403e9
commit: 7df9be2ef92ca4407a365455e0670f4f07af7e25 [70/72] KVM: VMX: Apply MMIO mitigation if KVM maps MMIO into the guest
config: i386-buildonly-randconfig-001-20250402 (https://download.01.org/0day-ci/archive/20250402/202504021630.C3QkiAsX-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250402/202504021630.C3QkiAsX-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/202504021630.C3QkiAsX-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from <command-line>:
   arch/x86/kvm/vmx/vmx.c: In function 'vmx_vcpu_enter_exit':
>> arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                                           ^
   include/linux/compiler_types.h:522:23: note: in definition of macro '__compiletime_assert'
     522 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:542:9: note: in expansion of macro '_compiletime_assert'
     542 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/vmx.c:7364:18: note: in expansion of macro 'READ_ONCE'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                  ^~~~~~~~~
>> arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                                           ^
   include/linux/compiler_types.h:522:23: note: in definition of macro '__compiletime_assert'
     522 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:542:9: note: in expansion of macro '_compiletime_assert'
     542 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/vmx.c:7364:18: note: in expansion of macro 'READ_ONCE'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                  ^~~~~~~~~
>> arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                                           ^
   include/linux/compiler_types.h:522:23: note: in definition of macro '__compiletime_assert'
     522 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:542:9: note: in expansion of macro '_compiletime_assert'
     542 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/vmx.c:7364:18: note: in expansion of macro 'READ_ONCE'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                  ^~~~~~~~~
>> arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                                           ^
   include/linux/compiler_types.h:522:23: note: in definition of macro '__compiletime_assert'
     522 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:542:9: note: in expansion of macro '_compiletime_assert'
     542 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                            ^~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/vmx.c:7364:18: note: in expansion of macro 'READ_ONCE'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                  ^~~~~~~~~
>> arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                                           ^
   include/linux/compiler_types.h:522:23: note: in definition of macro '__compiletime_assert'
     522 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:542:9: note: in expansion of macro '_compiletime_assert'
     542 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |         ^~~~~~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/vmx/vmx.c:7364:18: note: in expansion of macro 'READ_ONCE'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                  ^~~~~~~~~
>> arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                                           ^
   include/linux/compiler_types.h:498:27: note: in definition of macro '__unqual_scalar_typeof'
     498 |                 _Generic((x),                                           \
         |                           ^
   include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |         ^~~~~~~~~~~
   arch/x86/kvm/vmx/vmx.c:7364:18: note: in expansion of macro 'READ_ONCE'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                  ^~~~~~~~~
   In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:344,
                    from include/linux/export.h:5,
                    from include/linux/linkage.h:7,
                    from include/linux/fs.h:5,
                    from include/linux/highmem.h:5,
                    from arch/x86/kvm/vmx/vmx.c:17:
>> arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                                           ^
   include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   arch/x86/kvm/vmx/vmx.c:7364:18: note: in expansion of macro 'READ_ONCE'
    7364 |                  READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
         |                  ^~~~~~~~~


vim +7364 arch/x86/kvm/vmx/vmx.c

  7347	
  7348	static noinstr void vmx_vcpu_enter_exit(struct kvm_vcpu *vcpu,
  7349						unsigned int flags)
  7350	{
  7351		struct vcpu_vmx *vmx = to_vmx(vcpu);
  7352	
  7353		guest_state_enter_irqoff();
  7354	
  7355		/*
  7356		 * L1D Flush includes CPU buffer clear to mitigate MDS, but VERW
  7357		 * mitigation for MDS is done late in VMentry and is still
  7358		 * executed in spite of L1D Flush. This is because an extra VERW
  7359		 * should not matter much after the big hammer L1D Flush.
  7360		 */
  7361		if (static_branch_unlikely(&vmx_l1d_should_flush))
  7362			vmx_l1d_flush(vcpu);
  7363		else if (static_branch_unlikely(&mmio_stale_data_clear) &&
> 7364			 READ_ONCE(vcpu->kvm->arch.mapped_host_mmio))
  7365			mds_clear_cpu_buffers();
  7366	
  7367		vmx_disable_fb_clear(vmx);
  7368	
  7369		if (vcpu->arch.cr2 != native_read_cr2())
  7370			native_write_cr2(vcpu->arch.cr2);
  7371	
  7372		vmx->fail = __vmx_vcpu_run(vmx, (unsigned long *)&vcpu->arch.regs,
  7373					   flags);
  7374	
  7375		vcpu->arch.cr2 = native_read_cr2();
  7376		vcpu->arch.regs_avail &= ~VMX_REGS_LAZY_LOAD_SET;
  7377	
  7378		vmx->idt_vectoring_info = 0;
  7379	
  7380		vmx_enable_fb_clear(vmx);
  7381	
  7382		if (unlikely(vmx->fail)) {
  7383			vmx->exit_reason.full = 0xdead;
  7384			goto out;
  7385		}
  7386	
  7387		vmx->exit_reason.full = vmcs_read32(VM_EXIT_REASON);
  7388		if (likely(!vmx->exit_reason.failed_vmentry))
  7389			vmx->idt_vectoring_info = vmcs_read32(IDT_VECTORING_INFO_FIELD);
  7390	
  7391		if ((u16)vmx->exit_reason.basic == EXIT_REASON_EXCEPTION_NMI &&
  7392		    is_nmi(vmx_get_intr_info(vcpu))) {
  7393			kvm_before_interrupt(vcpu, KVM_HANDLING_NMI);
  7394			if (cpu_feature_enabled(X86_FEATURE_FRED))
  7395				fred_entry_from_kvm(EVENT_TYPE_NMI, NMI_VECTOR);
  7396			else
  7397				vmx_do_nmi_irqoff();
  7398			kvm_after_interrupt(vcpu);
  7399		}
  7400	
  7401	out:
  7402		guest_state_exit_irqoff();
  7403	}
  7404	

-- 
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-04-02  8:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02  8:38 [sean-jc:x86/stale_mmio_cleanup 70/72] arch/x86/kvm/vmx/vmx.c:7364:43: error: 'struct kvm_arch' has no member named 'mapped_host_mmio' 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.