public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm:queue 12/12] arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type
@ 2026-04-13 16:13 kernel test robot
  2026-04-13 16:42 ` Sean Christopherson
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2026-04-13 16:13 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: oe-kbuild-all, kvm, Farrah Chen, Paolo Bonzini

tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head:   8f65c76d62f1f07d68b8a14829a59049311547b1
commit: 8f65c76d62f1f07d68b8a14829a59049311547b1 [12/12] Merge tag 'kvm-x86-svm-7.1' of https://github.com/kvm-x86/linux into HEAD
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260413/202604131813.Sp3bcsFp-lkp@intel.com/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/20260413/202604131813.Sp3bcsFp-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/202604131813.Sp3bcsFp-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/x86/kvm/svm/avic.c: In function 'avic_deactivate_vmcb':
>> arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type [-Wincompatible-pointer-types]
     240 |         if (!is_sev_es_guest(svm->vcpu.kvm))
         |                              ~~~~~~~~~^~~~
         |                                       |
         |                                       struct kvm *
   In file included from arch/x86/kvm/svm/avic.c:31:
   arch/x86/kvm/svm/svm.h:415:62: note: expected 'struct kvm_vcpu *' but argument is of type 'struct kvm *'
     415 | static __always_inline bool is_sev_es_guest(struct kvm_vcpu *vcpu)
         |                                             ~~~~~~~~~~~~~~~~~^~~~


vim +/is_sev_es_guest +240 arch/x86/kvm/svm/avic.c

   232	
   233	static void avic_deactivate_vmcb(struct vcpu_svm *svm)
   234	{
   235		struct vmcb *vmcb = svm->vmcb01.ptr;
   236	
   237		vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
   238		vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;
   239	
 > 240		if (!is_sev_es_guest(svm->vcpu.kvm))
   241			svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
   242	
   243		/*
   244		 * If running nested and the guest uses its own MSR bitmap, there
   245		 * is no need to update L0's msr bitmap
   246		 */
   247		if (is_guest_mode(&svm->vcpu) &&
   248		    vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT))
   249			return;
   250	
   251		/* Enabling MSR intercept for x2APIC registers */
   252		avic_set_x2apic_msr_interception(svm, true);
   253	}
   254	

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kvm:queue 12/12] arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type
  2026-04-13 16:13 [kvm:queue 12/12] arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type kernel test robot
@ 2026-04-13 16:42 ` Sean Christopherson
  2026-04-13 16:43   ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Christopherson @ 2026-04-13 16:42 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, kvm, Farrah Chen, Paolo Bonzini

On Mon, Apr 13, 2026, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> head:   8f65c76d62f1f07d68b8a14829a59049311547b1
> commit: 8f65c76d62f1f07d68b8a14829a59049311547b1 [12/12] Merge tag 'kvm-x86-svm-7.1' of https://github.com/kvm-x86/linux into HEAD
> config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260413/202604131813.Sp3bcsFp-lkp@intel.com/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/20260413/202604131813.Sp3bcsFp-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/202604131813.Sp3bcsFp-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    arch/x86/kvm/svm/avic.c: In function 'avic_deactivate_vmcb':
> >> arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type [-Wincompatible-pointer-types]
>      240 |         if (!is_sev_es_guest(svm->vcpu.kvm))
>          |                              ~~~~~~~~~^~~~
>          |                                       |
>          |                                       struct kvm *
>    In file included from arch/x86/kvm/svm/avic.c:31:
>    arch/x86/kvm/svm/svm.h:415:62: note: expected 'struct kvm_vcpu *' but argument is of type 'struct kvm *'
>      415 | static __always_inline bool is_sev_es_guest(struct kvm_vcpu *vcpu)
>          |                                             ~~~~~~~~~~~~~~~~~^~~~
> 
> 
> vim +/is_sev_es_guest +240 arch/x86/kvm/svm/avic.c
> 
>    232	
>    233	static void avic_deactivate_vmcb(struct vcpu_svm *svm)
>    234	{
>    235		struct vmcb *vmcb = svm->vmcb01.ptr;
>    236	
>    237		vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
>    238		vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;
>    239	
>  > 240		if (!is_sev_es_guest(svm->vcpu.kvm))
>    241			svm_set_intercept(svm, INTERCEPT_CR8_WRITE);

Ha!  Not my fault :-)

The resolution should have been:

diff --cc arch/x86/kvm/svm/avic.c
index 2885c5993ebc,7056c4891f93..adf211860949
--- a/arch/x86/kvm/svm/avic.c
+++ b/arch/x86/kvm/svm/avic.c
@@@ -226,9 -237,6 +237,9 @@@ static void avic_deactivate_vmcb(struc
        vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
        vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;

-       if (!sev_es_guest(svm->vcpu.kvm))
++      if (!is_sev_es_guest(&svm->vcpu))
 +              svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
 +
        /*
         * If running nested and the guest uses its own MSR bitmap, there
         * is no need to update L0's msr bitmap

>    242	
>    243		/*
>    244		 * If running nested and the guest uses its own MSR bitmap, there
>    245		 * is no need to update L0's msr bitmap
>    246		 */
>    247		if (is_guest_mode(&svm->vcpu) &&
>    248		    vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT))
>    249			return;
>    250	
>    251		/* Enabling MSR intercept for x2APIC registers */
>    252		avic_set_x2apic_msr_interception(svm, true);
>    253	}
>    254	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kvm:queue 12/12] arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type
  2026-04-13 16:42 ` Sean Christopherson
@ 2026-04-13 16:43   ` Paolo Bonzini
  2026-04-13 16:55     ` Sean Christopherson
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2026-04-13 16:43 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: kernel test robot, oe-kbuild-all, kvm, Farrah Chen

On Mon, Apr 13, 2026 at 6:42 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Mon, Apr 13, 2026, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> > head:   8f65c76d62f1f07d68b8a14829a59049311547b1
> > commit: 8f65c76d62f1f07d68b8a14829a59049311547b1 [12/12] Merge tag 'kvm-x86-svm-7.1' of https://github.com/kvm-x86/linux into HEAD
> > config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260413/202604131813.Sp3bcsFp-lkp@intel.com/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/20260413/202604131813.Sp3bcsFp-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/202604131813.Sp3bcsFp-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> >    arch/x86/kvm/svm/avic.c: In function 'avic_deactivate_vmcb':
> > >> arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type [-Wincompatible-pointer-types]
> >      240 |         if (!is_sev_es_guest(svm->vcpu.kvm))
> >          |                              ~~~~~~~~~^~~~
> >          |                                       |
> >          |                                       struct kvm *
> >    In file included from arch/x86/kvm/svm/avic.c:31:
> >    arch/x86/kvm/svm/svm.h:415:62: note: expected 'struct kvm_vcpu *' but argument is of type 'struct kvm *'
> >      415 | static __always_inline bool is_sev_es_guest(struct kvm_vcpu *vcpu)
> >          |                                             ~~~~~~~~~~~~~~~~~^~~~
> >
> >
> > vim +/is_sev_es_guest +240 arch/x86/kvm/svm/avic.c
> >
> >    232
> >    233        static void avic_deactivate_vmcb(struct vcpu_svm *svm)
> >    234        {
> >    235                struct vmcb *vmcb = svm->vmcb01.ptr;
> >    236
> >    237                vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
> >    238                vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;
> >    239
> >  > 240                if (!is_sev_es_guest(svm->vcpu.kvm))
> >    241                        svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
>
> Ha!  Not my fault :-)

Yes, I have already pushed the right one.

Paolo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kvm:queue 12/12] arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type
  2026-04-13 16:43   ` Paolo Bonzini
@ 2026-04-13 16:55     ` Sean Christopherson
  0 siblings, 0 replies; 4+ messages in thread
From: Sean Christopherson @ 2026-04-13 16:55 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kernel test robot, oe-kbuild-all, kvm, Farrah Chen

On Mon, Apr 13, 2026, Paolo Bonzini wrote:
> On Mon, Apr 13, 2026 at 6:42 PM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Mon, Apr 13, 2026, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
> > > head:   8f65c76d62f1f07d68b8a14829a59049311547b1
> > > commit: 8f65c76d62f1f07d68b8a14829a59049311547b1 [12/12] Merge tag 'kvm-x86-svm-7.1' of https://github.com/kvm-x86/linux into HEAD
> > > config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260413/202604131813.Sp3bcsFp-lkp@intel.com/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/20260413/202604131813.Sp3bcsFp-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/202604131813.Sp3bcsFp-lkp@intel.com/
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > >    arch/x86/kvm/svm/avic.c: In function 'avic_deactivate_vmcb':
> > > >> arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type [-Wincompatible-pointer-types]
> > >      240 |         if (!is_sev_es_guest(svm->vcpu.kvm))
> > >          |                              ~~~~~~~~~^~~~
> > >          |                                       |
> > >          |                                       struct kvm *
> > >    In file included from arch/x86/kvm/svm/avic.c:31:
> > >    arch/x86/kvm/svm/svm.h:415:62: note: expected 'struct kvm_vcpu *' but argument is of type 'struct kvm *'
> > >      415 | static __always_inline bool is_sev_es_guest(struct kvm_vcpu *vcpu)
> > >          |                                             ~~~~~~~~~~~~~~~~~^~~~
> > >
> > >
> > > vim +/is_sev_es_guest +240 arch/x86/kvm/svm/avic.c
> > >
> > >    232
> > >    233        static void avic_deactivate_vmcb(struct vcpu_svm *svm)
> > >    234        {
> > >    235                struct vmcb *vmcb = svm->vmcb01.ptr;
> > >    236
> > >    237                vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
> > >    238                vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;
> > >    239
> > >  > 240                if (!is_sev_es_guest(svm->vcpu.kvm))
> > >    241                        svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
> >
> > Ha!  Not my fault :-)
> 
> Yes, I have already pushed the right one.

Heh, nope :-)

diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
index 56f38a851c1b..adf211860949 100644
--- a/arch/x86/kvm/svm/avic.c
+++ b/arch/x86/kvm/svm/avic.c
@@ -237,7 +237,7 @@ static void avic_deactivate_vmcb(struct vcpu_svm *svm)
        vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
        vmcb->control.avic_physical_id &= ~AVIC_PHYSICAL_MAX_INDEX_MASK;
 
-       if (!is_sev_es_guest(svm->vcpu))
+       if (!is_sev_es_guest(&svm->vcpu))
                svm_set_intercept(svm, INTERCEPT_CR8_WRITE);
 
        /*

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-13 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 16:13 [kvm:queue 12/12] arch/x86/kvm/svm/avic.c:240:39: error: passing argument 1 of 'is_sev_es_guest' from incompatible pointer type kernel test robot
2026-04-13 16:42 ` Sean Christopherson
2026-04-13 16:43   ` Paolo Bonzini
2026-04-13 16:55     ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox