[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize |
Date: |
Thu, 05 Feb 2015 17:07:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
"Michael S. Tsirkin" <address@hidden> writes:
> On Mon, Jan 19, 2015 at 03:52:27PM +0100, Markus Armbruster wrote:
>> I posted this series as RFC back in October, but it depended on
>> patches then still under review, so I put it aside, and promptly
>> forgot. Fortunately, rebasing and updating it wasn't much trouble.
>>
>> While discussing Gonglei's "[PATCH v2 00/19] usb: convert device init
>> to realize", Paolo called the PCI conversion job "Gargantuan". This
>> series attempts to crack it into manageable jobs.
>>
>> The basic idea comes from qdev core: have the core deal with just
>> realize, but default the device models' realize() method to one that
>> calls the old init() method. Unconverted device models don't set
>> their realize(), thus get one that calls their init(). We can then
>> convert device by device instead of having to convert of all of PCI in
>> one Gargantuan go.
>>
>> Since PCI's exit() cannot fail, I chose not to add an unrealize().
>> Precedence: USBDeviceClass method handle_destroy(), called on USB
>> unrealize.
>>
>> Aside: USBDeviceClass also has an unrealize() method, but it's never
>> set and never called.
>>
>> PATCH 01 converts the interface between PCI core and qdev to realize.
>>
>> PATCH 02 adds realize to the interface between PCI core and PCI device
>> models. Once all device models are converted to realize, the old init
>> interface can be dropped, completing the Gargantuan job.
>>
>> PATCH 03-04 convert device models that cannot fail initialization.
>>
>> PATCH 05-10 convert a few that can fail, but are really easy to
>> convert.
>
> As you posted the test RFC now, I applied this in my tree.
Thanks :)
> Pls do complete the test though, we need this upstream.
Sure!