qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3] virtio: do not require IOMMU to be created i


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH V3] virtio: do not require IOMMU to be created in advance
Date: Wed, 8 Mar 2017 15:14:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 03/08/2017 11:16 AM, Peter Xu wrote:
On Wed, Mar 08, 2017 at 05:09:45PM +0800, Peter Xu wrote:
On Wed, Mar 08, 2017 at 10:17:09AM +0200, Marcel Apfelbaum wrote:

[...]


I am sorry I was not clear enough:
If a device is added after the system is up (hotplug), we cannot depend on the 
"machine_done"
event to enable "bus master".
This is why we have
   if (qdev_hotplug)
        pci_init_bus_master(pci_dev);

The code you proposed changes the order, so this call is done *after* realize.

My question was: What if any other device may require the bus_master_as
at realize time (and can be hot-plugged) ?
For example: hcd-ehci/hcd-ohci devices call pci_get_address_space()
and caches the bus_master_as.

Oh, I didn't notice that there are other devices that used
bus_master_as during realization. If so... Would this really work even
without hot plug? Considering that bus_master_as won't be inited until
machine done phase?

Please ignore my question... I think the answer is that these devices
are only caching the pointer of bus_master_as. So it won't really use
the address space before machine_done.

If so, IMHO moving pci_init_bus_master() after device specific
realize() is okay as well then, right?


It should work, right. But you may want to double-check anyway :)

Thanks,
Marcel

Thanks,

-- peterx





reply via email to

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