public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, kvm@vger.kernel.org,
	 Farrah Chen <farrah.chen@intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: 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
Date: Mon, 13 Apr 2026 09:42:26 -0700	[thread overview]
Message-ID: <ad0c8lNL5ZoSRZI6@google.com> (raw)
In-Reply-To: <202604131813.Sp3bcsFp-lkp@intel.com>

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

  reply	other threads:[~2026-04-13 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-04-13 16:43   ` Paolo Bonzini
2026-04-13 16:55     ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad0c8lNL5ZoSRZI6@google.com \
    --to=seanjc@google.com \
    --cc=farrah.chen@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox