All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Naveen N Rao (AMD)" <naveen@kernel.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Vasant Hegde <vasant.hegde@amd.com>
Subject: Re: [PATCH v2 2/2] KVM: SVM: Limit AVIC physical max index based on configured max_vcpu_ids
Date: Mon, 3 Feb 2025 19:41:15 +0800	[thread overview]
Message-ID: <202502031922.dBj76pSx-lkp@intel.com> (raw)
In-Reply-To: <b79610c60de53048f3fda942fd45973c4ab1de97.1738563890.git.naveen@kernel.org>

Hi Naveen,

kernel test robot noticed the following build errors:

[auto build test ERROR on eb723766b1030a23c38adf2348b7c3d1409d11f0]

url:    https://github.com/intel-lab-lkp/linux/commits/Naveen-N-Rao-AMD/KVM-SVM-Increase-X2AVIC-limit-to-4096-vcpus/20250203-144127
base:   eb723766b1030a23c38adf2348b7c3d1409d11f0
patch link:    https://lore.kernel.org/r/b79610c60de53048f3fda942fd45973c4ab1de97.1738563890.git.naveen%40kernel.org
patch subject: [PATCH v2 2/2] KVM: SVM: Limit AVIC physical max index based on configured max_vcpu_ids
config: x86_64-buildonly-randconfig-003-20250203 (https://download.01.org/0day-ci/archive/20250203/202502031922.dBj76pSx-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/20250203/202502031922.dBj76pSx-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/202502031922.dBj76pSx-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/x86/include/asm/kvm_host.h:31,
                    from include/linux/kvm_host.h:45,
                    from arch/x86/kvm/svm/avic.c:20:
>> arch/x86/include/asm/apic.h:258:34: error: expected ')' before numeric constant
     258 | #define x2apic_mode             (0)
         |                                  ^
   arch/x86/kvm/svm/avic.c:88:66: note: in expansion of macro 'x2apic_mode'
      88 | static inline u32 avic_get_max_physical_id(struct kvm *kvm, bool x2apic_mode)
         |                                                                  ^~~~~~~~~~~
   arch/x86/kvm/svm/avic.c: In function 'avic_activate_vmcb':
>> arch/x86/kvm/svm/avic.c:117:51: error: implicit declaration of function 'avic_get_max_physical_id' [-Werror=implicit-function-declaration]
     117 |                 vmcb->control.avic_physical_id |= avic_get_max_physical_id(svm->vcpu.kvm, true);
         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/avic_get_max_physical_id +117 arch/x86/kvm/svm/avic.c

    98	
    99	static void avic_activate_vmcb(struct vcpu_svm *svm)
   100	{
   101		struct vmcb *vmcb = svm->vmcb01.ptr;
   102	
   103		vmcb->control.int_ctl &= ~(AVIC_ENABLE_MASK | X2APIC_MODE_MASK);
   104		vmcb->control.avic_physical_id &= ~avic_physical_max_index_mask;
   105	
   106		vmcb->control.int_ctl |= AVIC_ENABLE_MASK;
   107	
   108		/*
   109		 * Note: KVM supports hybrid-AVIC mode, where KVM emulates x2APIC MSR
   110		 * accesses, while interrupt injection to a running vCPU can be
   111		 * achieved using AVIC doorbell.  KVM disables the APIC access page
   112		 * (deletes the memslot) if any vCPU has x2APIC enabled, thus enabling
   113		 * AVIC in hybrid mode activates only the doorbell mechanism.
   114		 */
   115		if (x2avic_enabled && apic_x2apic_mode(svm->vcpu.arch.apic)) {
   116			vmcb->control.int_ctl |= X2APIC_MODE_MASK;
 > 117			vmcb->control.avic_physical_id |= avic_get_max_physical_id(svm->vcpu.kvm, true);
   118			/* Disabling MSR intercept for x2APIC registers */
   119			svm_set_x2apic_msr_interception(svm, false);
   120		} else {
   121			/*
   122			 * Flush the TLB, the guest may have inserted a non-APIC
   123			 * mapping into the TLB while AVIC was disabled.
   124			 */
   125			kvm_make_request(KVM_REQ_TLB_FLUSH_CURRENT, &svm->vcpu);
   126	
   127			/* For xAVIC and hybrid-xAVIC modes */
   128			vmcb->control.avic_physical_id |= avic_get_max_physical_id(svm->vcpu.kvm, false);
   129			/* Enabling MSR intercept for x2APIC registers */
   130			svm_set_x2apic_msr_interception(svm, true);
   131		}
   132	}
   133	

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

  reply	other threads:[~2025-02-03 11:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03  6:37 [PATCH v2 0/2] KVM: SVM: Add support for 4096 vcpus with x2AVIC Naveen N Rao (AMD)
2025-02-03  6:37 ` [PATCH v2 1/2] KVM: SVM: Increase X2AVIC limit to 4096 vcpus Naveen N Rao (AMD)
2025-02-03  6:37 ` [PATCH v2 2/2] KVM: SVM: Limit AVIC physical max index based on configured max_vcpu_ids Naveen N Rao (AMD)
2025-02-03 11:41   ` kernel test robot [this message]
2025-02-03 18:08   ` kernel test robot
2025-02-03 21:06   ` kernel test robot
2025-02-05  6:48   ` Vasant Hegde
2025-02-06  9:12     ` Naveen N Rao

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=202502031922.dBj76pSx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveen@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=vasant.hegde@amd.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 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.