[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify
From: |
Dmitry Eremin-Solenikov |
Subject: |
Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify |
Date: |
Mon, 16 May 2011 08:54:30 +0400 |
Hello,
On 5/16/11, andrzej zaborowski <address@hidden> wrote:
> On 25 April 2011 11:06, Dmitry Eremin-Solenikov <address@hidden>
> wrote:
>> Switch dscm1xxxx microdrive driver to use qdev infrastructure.
>> ---
>> hw/ide/microdrive.c | 49
>> +++++++++++++++++++++++++++++++++++++++----------
>> hw/pcmcia.h | 2 +-
>> hw/spitz.c | 5 ++++-
>> hw/tosa.c | 5 ++++-
>> 4 files changed, 48 insertions(+), 13 deletions(-)
>>
>> diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
>> index 9fbbf0e..7692603 100644
>> --- a/hw/ide/microdrive.c
>> +++ b/hw/ide/microdrive.c
>> @@ -38,8 +38,8 @@
>>
>> /* DSCM-1XXXX Microdrive hard disk with CF+ II / PCMCIA interface. */
>> typedef struct {
>> - IDEBus bus;
>> PCMCIACardState card;
>> + IDEBus bus;
>> uint32_t attr_base;
>> uint32_t io_base;
>>
>> @@ -529,22 +529,51 @@ static int dscm1xxxx_detach(void *opaque)
>> return 0;
>> }
>>
>> -PCMCIACardState *dscm1xxxx_init(DriveInfo *bdrv)
>> +PCMCIACardState *dscm1xxxx_init(PCMCIASocket *socket, DriveInfo *bdrv)
>
> This looks like a regression that you have to pass the socket when
> creating a PCMCIA card. I consider it an advantage of the current
> code that pcmcia cards are hotswappable. Can we keep that with
> qdevification? Otherwise is there a gain from the qdevification?
Socket is required, as we have to know the QBus before creating the
device on it.
Reg. hotswap: my intent was to move reuse hotplug/hotswap from QDev layer.
However I could not find a way to trigger device creation/removal at run time,
so I was unable to even try to test this code path. How should I do that?
Cards won´t be hotswitchable (you won´t be able to detach a card from one socket
and then put it back to the other one, however PCMCIA code should be hotplugable
(i.e. you should be able to unplug a card from socket and then plug another one
in).
--
With best wishes
Dmitry
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, andrzej zaborowski, 2011/05/15
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify,
Dmitry Eremin-Solenikov <=
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, andrzej zaborowski, 2011/05/16
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, Dmitry Eremin-Solenikov, 2011/05/16
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, andrzej zaborowski, 2011/05/16
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, Jan Kiszka, 2011/05/17
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, andrzej zaborowski, 2011/05/17
- Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify, Jan Kiszka, 2011/05/17