From: Marcelo Tosatti <mtosatti@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
jbaron@redhat.com, jan.kiszka@siemens.com
Subject: Re: [PATCH] kvm: lock slots_lock around device assignment
Date: Wed, 18 Apr 2012 23:30:08 -0300 [thread overview]
Message-ID: <20120419023008.GB17648@amt.cnet> (raw)
In-Reply-To: <20120418034537.26262.80743.stgit@bling.home>
On Tue, Apr 17, 2012 at 09:46:44PM -0600, Alex Williamson wrote:
> @@ -340,7 +343,11 @@ int kvm_iommu_unmap_guest(struct kvm *kvm)
> if (!domain)
> return 0;
>
> + mutex_lock(&kvm->slots_lock);
> kvm_iommu_unmap_memslots(kvm);
> + kvm->arch.iommu_domain = NULL;
> + mutex_unlock(&kvm->slots_lock);
> +
> iommu_domain_free(domain);
> return 0;
> }
This might trigger lockdep warnings due to
kvm_vm_ioctl_create_vcpu
mutex_lock(&kvm->lock)
kvm_put_kvm(kvm)
kvm_destroy_vm
kvm_iommu_unmap_guest
sequence.
Better drop it, it is not necessary in vm destruction
path (since only user is self).
next prev parent reply other threads:[~2012-04-19 2:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 3:46 [PATCH] kvm: lock slots_lock around device assignment Alex Williamson
2012-04-19 2:30 ` Marcelo Tosatti [this message]
2012-04-19 2:58 ` Alex Williamson
2012-04-19 3:04 ` Marcelo Tosatti
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=20120419023008.GB17648@amt.cnet \
--to=mtosatti@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jbaron@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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