[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 1/2] hw/pci: delay bus_master_enable_region
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH RFC 1/2] hw/pci: delay bus_master_enable_region initialization |
Date: |
Mon, 23 May 2016 16:33:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 23/05/2016 16:22, Marcel Apfelbaum wrote:
> On 05/23/2016 05:08 PM, Paolo Bonzini wrote:
>>
>>
>> On 23/05/2016 16:01, Marcel Apfelbaum wrote:
>>> Skip bus_master_enable region creation on PCI devices init
>>> in order to be sure the IOMMU device (if present) would
>>> be created in advance. Add this memory region at machine_done time.
>>>
>>> Signed-off-by: Marcel Apfelbaum <address@hidden>
>>> ---
>>> hw/i386/pc.c | 17 +++++++++++++++++
>>> hw/pci/pci.c | 22 ++++++++++++----------
>>> include/hw/pci/pci.h | 2 ++
>>> 3 files changed, 31 insertions(+), 10 deletions(-)
>>
>> Does hotplug still work?
>
> Hotplug does work, but the device can't be bus_master since I am adding
> the bus_master_region only at machine_done...
>
> Thank you for pointing that out, this can be easily solved by checking
> the qdev_hotplug flag and enabling the bus_master region if we passed
> machine creation.
>
> Other than that, does it seems to a you a feasible approach?
Yes, I guess it's okay.
Thanks,
Paolo