* [kvm:queue 120/120] arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on line 1375 (fwd)
@ 2021-04-04 15:29 Julia Lawall
2021-04-05 15:10 ` Sean Christopherson
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2021-04-04 15:29 UTC (permalink / raw)
To: Nathan Tempelman
Cc: Paolo Bonzini, Danmei Wei, Farrah Chen, Robert Hu, kvm, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4498 bytes --]
Is an unlock needed on line 1380?
julia
---------- Forwarded message ----------
Date: Sat, 3 Apr 2021 09:55:24 +0800
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Cc: lkp@intel.com, Julia Lawall <julia.lawall@lip6.fr>
Subject: [kvm:queue 120/120] arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on
line 1375
CC: kbuild-all@lists.01.org
CC: kvm@vger.kernel.org
CC: Robert Hu <robert.hu@intel.com>
CC: Farrah Chen <farrah.chen@intel.com>
CC: Danmei Wei <danmei.wei@intel.com>
TO: Nathan Tempelman <natet@google.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head: f96be2deac9bca3ef5a2b0b66b71fcef8bad586d
commit: f96be2deac9bca3ef5a2b0b66b71fcef8bad586d [120/120] KVM: x86: Support KVM VMs sharing SEV context
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: i386-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on line 1375
vim +1380 arch/x86/kvm/svm/sev.c
f96be2deac9bca Nathan Tempelman 2021-03-16 1365
eaf78265a4ab33 Joerg Roedel 2020-03-24 1366 void sev_vm_destroy(struct kvm *kvm)
eaf78265a4ab33 Joerg Roedel 2020-03-24 1367 {
eaf78265a4ab33 Joerg Roedel 2020-03-24 1368 struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
eaf78265a4ab33 Joerg Roedel 2020-03-24 1369 struct list_head *head = &sev->regions_list;
eaf78265a4ab33 Joerg Roedel 2020-03-24 1370 struct list_head *pos, *q;
eaf78265a4ab33 Joerg Roedel 2020-03-24 1371
eaf78265a4ab33 Joerg Roedel 2020-03-24 1372 if (!sev_guest(kvm))
eaf78265a4ab33 Joerg Roedel 2020-03-24 1373 return;
eaf78265a4ab33 Joerg Roedel 2020-03-24 1374
eaf78265a4ab33 Joerg Roedel 2020-03-24 @1375 mutex_lock(&kvm->lock);
eaf78265a4ab33 Joerg Roedel 2020-03-24 1376
f96be2deac9bca Nathan Tempelman 2021-03-16 1377 /* If this is a mirror_kvm release the enc_context_owner and skip sev cleanup */
f96be2deac9bca Nathan Tempelman 2021-03-16 1378 if (is_mirroring_enc_context(kvm)) {
f96be2deac9bca Nathan Tempelman 2021-03-16 1379 kvm_put_kvm(sev->enc_context_owner);
f96be2deac9bca Nathan Tempelman 2021-03-16 @1380 return;
f96be2deac9bca Nathan Tempelman 2021-03-16 1381 }
f96be2deac9bca Nathan Tempelman 2021-03-16 1382
eaf78265a4ab33 Joerg Roedel 2020-03-24 1383 /*
eaf78265a4ab33 Joerg Roedel 2020-03-24 1384 * Ensure that all guest tagged cache entries are flushed before
eaf78265a4ab33 Joerg Roedel 2020-03-24 1385 * releasing the pages back to the system for use. CLFLUSH will
eaf78265a4ab33 Joerg Roedel 2020-03-24 1386 * not do this, so issue a WBINVD.
eaf78265a4ab33 Joerg Roedel 2020-03-24 1387 */
eaf78265a4ab33 Joerg Roedel 2020-03-24 1388 wbinvd_on_all_cpus();
eaf78265a4ab33 Joerg Roedel 2020-03-24 1389
eaf78265a4ab33 Joerg Roedel 2020-03-24 1390 /*
eaf78265a4ab33 Joerg Roedel 2020-03-24 1391 * if userspace was terminated before unregistering the memory regions
eaf78265a4ab33 Joerg Roedel 2020-03-24 1392 * then lets unpin all the registered memory.
eaf78265a4ab33 Joerg Roedel 2020-03-24 1393 */
eaf78265a4ab33 Joerg Roedel 2020-03-24 1394 if (!list_empty(head)) {
eaf78265a4ab33 Joerg Roedel 2020-03-24 1395 list_for_each_safe(pos, q, head) {
eaf78265a4ab33 Joerg Roedel 2020-03-24 1396 __unregister_enc_region_locked(kvm,
eaf78265a4ab33 Joerg Roedel 2020-03-24 1397 list_entry(pos, struct enc_region, list));
7be74942f184fd David Rientjes 2020-08-25 1398 cond_resched();
eaf78265a4ab33 Joerg Roedel 2020-03-24 1399 }
eaf78265a4ab33 Joerg Roedel 2020-03-24 1400 }
eaf78265a4ab33 Joerg Roedel 2020-03-24 1401
eaf78265a4ab33 Joerg Roedel 2020-03-24 1402 mutex_unlock(&kvm->lock);
eaf78265a4ab33 Joerg Roedel 2020-03-24 1403
eaf78265a4ab33 Joerg Roedel 2020-03-24 1404 sev_unbind_asid(kvm, sev->handle);
eaf78265a4ab33 Joerg Roedel 2020-03-24 1405 sev_asid_free(sev->asid);
eaf78265a4ab33 Joerg Roedel 2020-03-24 1406 }
eaf78265a4ab33 Joerg Roedel 2020-03-24 1407
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: Type: application/gzip, Size: 65499 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm:queue 120/120] arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on line 1375 (fwd)
2021-04-04 15:29 [kvm:queue 120/120] arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on line 1375 (fwd) Julia Lawall
@ 2021-04-05 15:10 ` Sean Christopherson
2021-04-05 15:35 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Sean Christopherson @ 2021-04-05 15:10 UTC (permalink / raw)
To: Julia Lawall
Cc: Nathan Tempelman, Paolo Bonzini, Danmei Wei, Farrah Chen,
Robert Hu, kvm, kbuild-all
On Sun, Apr 04, 2021, Julia Lawall wrote:
> Is an unlock needed on line 1380?
Yep, I reported it as well, but only after it was queued. I'm guessing Paolo
will tweak the patch or drop it for now.
Thanks!
> f96be2deac9bca Nathan Tempelman 2021-03-16 1377 /* If this is a mirror_kvm release the enc_context_owner and skip sev cleanup */
> f96be2deac9bca Nathan Tempelman 2021-03-16 1378 if (is_mirroring_enc_context(kvm)) {
> f96be2deac9bca Nathan Tempelman 2021-03-16 1379 kvm_put_kvm(sev->enc_context_owner);
> f96be2deac9bca Nathan Tempelman 2021-03-16 @1380 return;
> f96be2deac9bca Nathan Tempelman 2021-03-16 1381 }
> f96be2deac9bca Nathan Tempelman 2021-03-16 1382
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm:queue 120/120] arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on line 1375 (fwd)
2021-04-05 15:10 ` Sean Christopherson
@ 2021-04-05 15:35 ` Paolo Bonzini
2021-04-06 20:24 ` Nathan Tempelman
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2021-04-05 15:35 UTC (permalink / raw)
To: Sean Christopherson
Cc: Julia Lawall, Nathan Tempelman, Danmei Wei, Farrah Chen,
Robert Hu, kvm, kbuild-all
On Mon, Apr 5, 2021 at 5:10 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Sun, Apr 04, 2021, Julia Lawall wrote:
> > Is an unlock needed on line 1380?
>
> Yep, I reported it as well, but only after it was queued. I'm guessing Paolo
> will tweak the patch or drop it for now.
Yeah, it's a public holiday here but either Nathan or I will post v3.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm:queue 120/120] arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on line 1375 (fwd)
2021-04-05 15:35 ` Paolo Bonzini
@ 2021-04-06 20:24 ` Nathan Tempelman
0 siblings, 0 replies; 4+ messages in thread
From: Nathan Tempelman @ 2021-04-06 20:24 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Sean Christopherson, Julia Lawall, Danmei Wei, Farrah Chen,
Robert Hu, kvm, kbuild-all
Yeah I've got the fix for this pending, Sean did call it out last week
after it was queued. I've been trying to get a self test built to
verify this patch before pushing the v3 since I thought I had some
time before the next release closes, but I can go ahead and get out
the v3 asap and keep you all updated if the self tests turn anything
up.
On Mon, Apr 5, 2021 at 8:35 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On Mon, Apr 5, 2021 at 5:10 PM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Sun, Apr 04, 2021, Julia Lawall wrote:
> > > Is an unlock needed on line 1380?
> >
> > Yep, I reported it as well, but only after it was queued. I'm guessing Paolo
> > will tweak the patch or drop it for now.
>
> Yeah, it's a public holiday here but either Nathan or I will post v3.
>
> Paolo
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-06 20:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-04 15:29 [kvm:queue 120/120] arch/x86/kvm/svm/sev.c:1380:2-8: preceding lock on line 1375 (fwd) Julia Lawall
2021-04-05 15:10 ` Sean Christopherson
2021-04-05 15:35 ` Paolo Bonzini
2021-04-06 20:24 ` Nathan Tempelman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).