From: Peter Xu <peterx@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu devel <qemu-devel@nongnu.org>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: Re: [Qemu-devel] issues of region cache and iommu reset
Date: Wed, 29 Mar 2017 16:16:30 +0800 [thread overview]
Message-ID: <20170329081630.GF3152@pxdev.xzpeter.org> (raw)
In-Reply-To: <93cb45b7-feca-9340-5fbe-3cc1e60d9e7e@redhat.com>
On Wed, Mar 29, 2017 at 04:00:37PM +0800, Jason Wang wrote:
> Hi:
>
> I meet an issue when doing reboot for a guest with two virtio-net-pci cards
> when iommu is enabled. What happens is:
>
>
> 1) vtd was reset first
I'll add an extra question:
Currently with Q35 and VT-d, our system qtree looks like (simplified
version):
bus: system bus
dev: intel-iommu
dev: q35-pcihost
bus: pcie.0
dev: pci device 1
dev: pci device 2
...
Not sure whether it'll be clearer to switch to:
bus: system bus
dev: q35-pcihost
bus: iommu-scope 0
dev: intel-iommu
bus: pcie.0
dev: pci device 1
dev: pci device 2
...
since logically the IOMMU device should be part of q35 pci-host?
Further, if we'll have more intel-iommus in the future in a single
guest, we'll be able to have devices dangle under the specific iommu
that it belongs. That'll be nice imho.
(Btw, I see that we are using qbus-qdev-qbus-... iterations to
describe the system tree. Why cannot we have qdev under another qdev?
Sorry if the question is stupid... Any pointers on explanations to
these qdev logics would be appreciated as well.)
>
> 2) during the reset of virtio-net-pci #1, deletion of msix subregion will
> cause a commit of all memory listeners
>
> 3) virito-net-pci #2's region cache will be update, but since vtd has
> already been reset, it can't get a valid mappings here
>
>
> Any ideas on how to fix this? Need region cache be aware of IOMMU/IOTLB
> state in this case? Or can we simply reset IOMMU as the last one?
>
> Thanks
>
-- peterx
next prev parent reply other threads:[~2017-03-29 8:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 8:00 [Qemu-devel] issues of region cache and iommu reset Jason Wang
2017-03-29 8:09 ` Paolo Bonzini
2017-03-29 8:37 ` Jason Wang
2017-03-29 8:41 ` Paolo Bonzini
2017-03-29 9:09 ` Jason Wang
2017-03-29 9:11 ` Paolo Bonzini
2017-03-29 9:24 ` Jason Wang
2017-03-29 21:31 ` Michael S. Tsirkin
2017-03-29 8:45 ` Cornelia Huck
2017-03-29 9:18 ` Jason Wang
2017-03-29 11:39 ` Cornelia Huck
2017-03-30 2:14 ` Jason Wang
2017-03-29 21:28 ` Michael S. Tsirkin
2017-03-30 9:02 ` Paolo Bonzini
2017-03-29 8:16 ` Peter Xu [this message]
2017-03-29 21:38 ` Michael S. Tsirkin
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=20170329081630.GF3152@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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 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.