From: Jason Wang <jasowang@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
mst@redhat.com, qemu-devel@nongnu.org
Cc: marcel@redhat.com, peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH] virito: unbreak virtio device behinds IOMMU with region cache
Date: Mon, 6 Mar 2017 15:21:46 +0800 [thread overview]
Message-ID: <ce83be51-93d9-12e3-09c5-52d5eab81308@redhat.com> (raw)
In-Reply-To: <ac184515-683c-afe0-2597-283abc2f895c@redhat.com>
On 2017年03月03日 20:56, Paolo Bonzini wrote:
>
> On 03/03/2017 10:06, Jason Wang wrote:
>> Commit c611c76417f5 ("virtio: add MemoryListener to cache ring
>> translations") registers a memory listener to dma_as. This may not
>> work when IOMMU is enabled: dma_as(bus_master_as) were correctly
>> initialized in pcibus_machine_done() after virtio_realize() where we
>> try to register listener and initialize address space cache.
>>
>> Fixing this by:
>>
>> - delay the listener register to status set
>> - reset dma_as before trying to initialize address spaces to make sure
>> it works even IOMMU were created after virtio device
>>
>> Fixes: c611c76417f5 ("virtio: add MemoryListener to cache ring translations")
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Jason Wang <jasowang@redhat.com>
> For virtio 0.9 it is valid to use the virtio device while the status is 0.
>
> You can add a function virtio_set_dma_as to generic virtio that does a
> MemoryListener unregister+register, then PCI can call it when the
> AddressSpace is ready.
>
> Paolo
>
>
Ok, will post a new version.
Thanks
prev parent reply other threads:[~2017-03-06 7:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 9:06 [Qemu-devel] [PATCH] virito: unbreak virtio device behinds IOMMU with region cache Jason Wang
2017-03-03 12:56 ` Paolo Bonzini
2017-03-06 7:21 ` Jason Wang [this message]
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=ce83be51-93d9-12e3-09c5-52d5eab81308@redhat.com \
--to=jasowang@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@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 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).