0 day kernel build service
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: <oe-kbuild@lists.linux.dev>
Cc: <lkp@intel.com>, Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [PATCH 1/1] KVM: x86: lapic: update apic_base and APIC ID together
Date: Sun, 23 Aug 2026 20:29:57 +0800	[thread overview]
Message-ID: <202608222154.KilWZhsr-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260818234238.618158-1-dongli.zhang@oracle.com>
References: <20260818234238.618158-1-dongli.zhang@oracle.com>
TO: Dongli Zhang <dongli.zhang@oracle.com>
TO: kvm@vger.kernel.org
CC: seanjc@google.com
CC: pbonzini@redhat.com
CC: joe.jin@oracle.com

Hi Dongli,

kernel test robot noticed the following build warnings:

[auto build test WARNING on kvm/queue]
[also build test WARNING on kvm/next mst-vhost/linux-next linus/master v7.2 next-20260821]
[cannot apply to kvm/linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dongli-Zhang/KVM-x86-lapic-update-apic_base-and-APIC-ID-together/20260818-164238
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link:    https://lore.kernel.org/r/20260818234238.618158-1-dongli.zhang%40oracle.com
patch subject: [PATCH 1/1] KVM: x86: lapic: update apic_base and APIC ID together
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-054-20260822 (https://download.01.org/0day-ci/archive/20260822/202608222154.KilWZhsr-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0

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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202608222154.KilWZhsr-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> arch/x86/kvm/lapic.c:2824:2-8: preceding lock on line 2816

vim +2824 arch/x86/kvm/lapic.c

c7722e5e1daeea arch/x86/kvm/lapic.c Sean Christopherson        2026-05-29  2800  
7d1cb7cee94ffd arch/x86/kvm/lapic.c Sean Christopherson        2024-11-01  2801  static void __kvm_apic_set_base(struct kvm_vcpu *vcpu, u64 value)
97222cc8316328 drivers/kvm/lapic.c  Eddie Dong                 2007-09-12  2802  {
8d14695f9542e9 arch/x86/kvm/lapic.c Yang Zhang                 2013-01-25  2803  	u64 old_value = vcpu->arch.apic_base;
ad312c7c79f781 drivers/kvm/lapic.c  Zhang Xiantao              2007-12-13  2804  	struct kvm_lapic *apic = vcpu->arch.apic;
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2805  	u64 changed = old_value ^ value;
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2806  	bool apicbase_enable_changed = changed & MSR_IA32_APICBASE_ENABLE;
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2807  	bool x2apic_enable_changed = changed & X2APIC_ENABLE;
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2808  	bool apic_mode_changed = apicbase_enable_changed || x2apic_enable_changed;
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2809  	bool need_lock = apic && apic_mode_changed;
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2810  
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2811  	/*
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2812  	 * Serialize apic_base and APIC ID updates with APIC map
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2813  	 * recalculation.
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2814  	 */
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2815  	if (need_lock)
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18 @2816  		mutex_lock(&vcpu->kvm->arch.apic_map_lock);
97222cc8316328 drivers/kvm/lapic.c  Eddie Dong                 2007-09-12  2817  
e66d2ae7c67bd9 arch/x86/kvm/lapic.c Jan Kiszka                 2013-12-29  2818  	vcpu->arch.apic_base = value;
e66d2ae7c67bd9 arch/x86/kvm/lapic.c Jan Kiszka                 2013-12-29  2819  
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2820  	if (apicbase_enable_changed)
93da6af3ae563b arch/x86/kvm/lapic.c Sean Christopherson        2024-12-10  2821  		vcpu->arch.cpuid_dynamic_bits_dirty = true;
c7dd15b33707e9 arch/x86/kvm/lapic.c Jim Mattson                2016-11-09  2822  
c7dd15b33707e9 arch/x86/kvm/lapic.c Jim Mattson                2016-11-09  2823  	if (!apic)
c7dd15b33707e9 arch/x86/kvm/lapic.c Jim Mattson                2016-11-09 @2824  		return;
c7dd15b33707e9 arch/x86/kvm/lapic.c Jim Mattson                2016-11-09  2825  
c5cc421ba3219b arch/x86/kvm/lapic.c Gleb Natapov               2012-08-05  2826  	/* update jump label if enable bit changes */
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2827  	if (apicbase_enable_changed) {
49bd29ba1dbd57 arch/x86/kvm/lapic.c Radim Krčmář               2016-07-12  2828  		if (value & MSR_IA32_APICBASE_ENABLE) {
49bd29ba1dbd57 arch/x86/kvm/lapic.c Radim Krčmář               2016-07-12  2829  			kvm_apic_set_xapic_id(apic, vcpu->vcpu_id);
6e4e3b4df4e31e arch/x86/kvm/lapic.c Cun Li                     2021-01-11  2830  			static_branch_slow_dec_deferred(&apic_hw_disabled);
2f15d027c05fac arch/x86/kvm/lapic.c Vitaly Kuznetsov           2021-04-22  2831  			/* Check if there are APF page ready requests pending */
2f15d027c05fac arch/x86/kvm/lapic.c Vitaly Kuznetsov           2021-04-22  2832  			kvm_make_request(KVM_REQ_APF_READY, vcpu);
187ca84b4b02d8 arch/x86/kvm/lapic.c Wanpeng Li                 2016-08-03  2833  		} else {
6e4e3b4df4e31e arch/x86/kvm/lapic.c Cun Li                     2021-01-11  2834  			static_branch_inc(&apic_hw_disabled.key);
44d527170731c7 arch/x86/kvm/lapic.c Paolo Bonzini              2020-06-22  2835  			atomic_set_release(&apic->vcpu->kvm->arch.apic_map_dirty, DIRTY);
c5cc421ba3219b arch/x86/kvm/lapic.c Gleb Natapov               2012-08-05  2836  		}
187ca84b4b02d8 arch/x86/kvm/lapic.c Wanpeng Li                 2016-08-03  2837  	}
c5cc421ba3219b arch/x86/kvm/lapic.c Gleb Natapov               2012-08-05  2838  
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2839  	if (x2apic_enable_changed) {
052c3b99cbc8d2 arch/x86/kvm/lapic.c Emanuele Giuseppe Esposito 2023-01-10  2840  		if (value & X2APIC_ENABLE)
257b9a5faab584 arch/x86/kvm/lapic.c Radim Krčmář               2015-05-22  2841  			kvm_apic_set_x2apic_id(apic, vcpu->vcpu_id);
052c3b99cbc8d2 arch/x86/kvm/lapic.c Emanuele Giuseppe Esposito 2023-01-10  2842  		else if (value & MSR_IA32_APICBASE_ENABLE)
052c3b99cbc8d2 arch/x86/kvm/lapic.c Emanuele Giuseppe Esposito 2023-01-10  2843  			kvm_apic_set_xapic_id(apic, vcpu->vcpu_id);
052c3b99cbc8d2 arch/x86/kvm/lapic.c Emanuele Giuseppe Esposito 2023-01-10  2844  	}
8d860bbeedef97 arch/x86/kvm/lapic.c Jim Mattson                2018-05-09  2845  
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2846  	if (need_lock)
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2847  		mutex_unlock(&vcpu->kvm->arch.apic_map_lock);
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2848  
a184b36a549d15 arch/x86/kvm/lapic.c Dongli Zhang               2026-08-18  2849  	if (apic_mode_changed) {
1459f5c6b8b8df arch/x86/kvm/lapic.c Sean Christopherson        2023-01-06  2850  		kvm_make_request(KVM_REQ_APICV_UPDATE, vcpu);
896046474f8d2e arch/x86/kvm/lapic.c Wei Wang                   2024-05-07  2851  		kvm_x86_call(set_virtual_apic_mode)(vcpu);
8fc9c7a3079e2d arch/x86/kvm/lapic.c Suravee Suthikulpanit      2022-05-19  2852  	}
8d14695f9542e9 arch/x86/kvm/lapic.c Yang Zhang                 2013-01-25  2853  
ad312c7c79f781 drivers/kvm/lapic.c  Zhang Xiantao              2007-12-13  2854  	apic->base_address = apic->vcpu->arch.apic_base &
97222cc8316328 drivers/kvm/lapic.c  Eddie Dong                 2007-09-12  2855  			     MSR_IA32_APICBASE_BASE;
97222cc8316328 drivers/kvm/lapic.c  Eddie Dong                 2007-09-12  2856  
db324fe6f20b0a arch/x86/kvm/lapic.c Nadav Amit                 2014-11-02  2857  	if ((value & MSR_IA32_APICBASE_ENABLE) &&
3743c2f0251743 arch/x86/kvm/lapic.c Maxim Levitsky             2022-06-06  2858  	     apic->base_address != APIC_DEFAULT_PHYS_BASE) {
3743c2f0251743 arch/x86/kvm/lapic.c Maxim Levitsky             2022-06-06  2859  		kvm_set_apicv_inhibit(apic->vcpu->kvm,
3743c2f0251743 arch/x86/kvm/lapic.c Maxim Levitsky             2022-06-06  2860  				      APICV_INHIBIT_REASON_APIC_BASE_MODIFIED);
3743c2f0251743 arch/x86/kvm/lapic.c Maxim Levitsky             2022-06-06  2861  	}
97222cc8316328 drivers/kvm/lapic.c  Eddie Dong                 2007-09-12  2862  }
97222cc8316328 drivers/kvm/lapic.c  Eddie Dong                 2007-09-12  2863  

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

                 reply	other threads:[~2026-08-23 12:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202608222154.KilWZhsr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@lists.linux.dev \
    /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