qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify


From: andrzej zaborowski
Subject: Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify
Date: Tue, 17 May 2011 03:38:21 +0200

On 16 May 2011 15:08, Dmitry Eremin-Solenikov <address@hidden> wrote:
> On 5/16/11, andrzej zaborowski <address@hidden> wrote:
>> On 16 May 2011 06:54, Dmitry Eremin-Solenikov <address@hidden> wrote:
>>> Socket is required, as we have to know the QBus before creating the
>>> device on it.
>>
>> Let's skip the qbusification then.  It seems that qbus is a wrong
>> choice for pcmcia and there are no new features or bugs fixed by the
>> conversion, it's code motion?  I also don't see why the socket
>> structure should be needed at the creation time of a PCI device for
>> example, the BusInfo should be enough logically.
>
> Major point for qbus'ification was ability to create PCMCIA devices from
> command line/via other management tools. This would also allow us e.g.
> to move microdrive driver to common ide parts, etc.

That would be nice but it may be better to use separate command line
switches / monitor commands for hotpluggable busses.

>
> For creation of a DeviceState via qdev_create you need BusState (which
> is a part of PCMCIASocket). Of course I can make one global QBus for
> all PCMCIA devices and make some artificial hacks to attach/detach cards
> to artificial sockets, but this seems like a hack.

I considered that for a moment too but it's uglier than current code
and doesn't achieve what you want, because the command line has no
provision for triggering attachment.  A major problem with qdev I see
now is that the creation and attachment of a device are one event
instead of two, which is the case for pcmcia.  So your patch tries to
merge these two events.

Cheers



reply via email to

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