From: kernel test robot <lkp@intel.com>
To: griffoul@gmail.com, kvm@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, seanjc@google.com,
pbonzini@redhat.com, vkuznets@redhat.com, shuah@kernel.org,
dwmw@amazon.co.uk, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Fred Griffoul <fgriffo@amazon.co.uk>
Subject: Re: [PATCH v2 08/10] KVM: x86: Add nested context management
Date: Fri, 21 Nov 2025 05:35:21 +0800 [thread overview]
Message-ID: <202511210515.8L9NBb1R-lkp@intel.com> (raw)
In-Reply-To: <20251118171113.363528-9-griffoul@gmail.org>
Hi,
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 v6.18-rc6 next-20251120]
[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/griffoul-gmail-com/KVM-nVMX-Implement-cache-for-L1-MSR-bitmap/20251119-012332
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link: https://lore.kernel.org/r/20251118171113.363528-9-griffoul%40gmail.org
patch subject: [PATCH v2 08/10] KVM: x86: Add nested context management
config: i386-randconfig-141-20251120 (https://download.01.org/0day-ci/archive/20251121/202511210515.8L9NBb1R-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251121/202511210515.8L9NBb1R-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/202511210515.8L9NBb1R-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/x86/kvm/nested.c:133:10: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct kvm_nested_context *' [-Wnon-literal-null-conversion]
133 | return false;
| ^~~~~
1 warning generated.
vim +133 arch/x86/kvm/nested.c
122
123 struct kvm_nested_context *kvm_nested_context_load(struct kvm_vcpu *vcpu,
124 gpa_t gpa)
125 {
126 struct kvm_nested_context_table *table;
127 struct kvm_nested_context *ctx, *new_ctx = NULL;
128 struct kvm *vm = vcpu->kvm;
129 bool reset = false;
130
131 table = vcpu->kvm->arch.nested_context_table;
132 if (WARN_ON_ONCE(!table))
> 133 return false;
134 retry:
135 spin_lock(&table->lock);
136 ctx = kvm_nested_context_find(table, vcpu, gpa);
137 if (!ctx) {
138 /* At capacity? Recycle the LRU context */
139 if (table->count >= kvm_nested_context_max(vcpu->kvm)) {
140 ctx = kvm_nested_context_recycle(table);
141 if (unlikely(!ctx))
142 goto finish;
143
144 kvm_nested_context_insert(table, ctx, gpa);
145 ++vm->stat.nested_context_recycle;
146 reset = true;
147
148 } else if (new_ctx) {
149 ++table->count;
150 ctx = new_ctx;
151 kvm_nested_context_insert(table, ctx, gpa);
152 new_ctx = NULL;
153
154 } else {
155 /* Allocate a new context without holding the lock */
156 spin_unlock(&table->lock);
157 new_ctx = kvm_x86_ops.nested_ops->alloc_context(vcpu);
158 if (unlikely(!new_ctx))
159 return NULL;
160
161 goto retry;
162 }
163 } else
164 ++vm->stat.nested_context_reuse;
165
166 ctx->vcpu = vcpu;
167 finish:
168 spin_unlock(&table->lock);
169
170 if (new_ctx)
171 kvm_x86_ops.nested_ops->free_context(new_ctx);
172
173 if (reset)
174 kvm_x86_ops.nested_ops->reset_context(ctx);
175
176 return ctx;
177 }
178
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-20 21:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 17:11 [PATCH v2 00/10] KVM: nVMX: Improve performance for unmanaged guest memory griffoul
2025-11-18 17:11 ` [PATCH v2 01/10] KVM: nVMX: Implement cache for L1 MSR bitmap griffoul
2025-11-18 17:11 ` [PATCH v2 02/10] KVM: pfncache: Restore guest-uses-pfn support griffoul
2025-11-18 17:11 ` [PATCH v2 03/10] KVM: x86: Add nested state validation for pfncache support griffoul
2025-11-18 17:11 ` [PATCH v2 04/10] KVM: nVMX: Implement cache for L1 APIC pages griffoul
2025-11-18 17:11 ` [PATCH v2 05/10] KVM: selftests: Add nested VMX APIC cache invalidation test griffoul
2025-11-18 17:11 ` [PATCH v2 06/10] KVM: nVMX: Cache evmcs fields to ensure consistency during VM-entry griffoul
2025-11-18 17:11 ` [PATCH v2 07/10] KVM: nVMX: Replace evmcs kvm_host_map with pfncache griffoul
2025-11-20 12:52 ` kernel test robot
2025-11-18 17:11 ` [PATCH v2 08/10] KVM: x86: Add nested context management griffoul
2025-11-20 21:35 ` kernel test robot [this message]
2025-11-21 21:34 ` kernel test robot
2025-11-18 17:11 ` [PATCH v2 09/10] KVM: nVMX: Use nested context for pfncache persistence griffoul
2025-11-18 17:11 ` [PATCH v2 10/10] KVM: selftests: Add L2 vcpu context switch test griffoul
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=202511210515.8L9NBb1R-lkp@intel.com \
--to=lkp@intel.com \
--cc=dwmw@amazon.co.uk \
--cc=fgriffo@amazon.co.uk \
--cc=griffoul@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=vkuznets@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