qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virito: unbreak virtio device behinds IOMMU wit


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH] virito: unbreak virtio device behinds IOMMU with region cache
Date: Mon, 6 Mar 2017 15:21:46 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0



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 <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]