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

[Xen-devel] Re: [PATCH 3/3] xen: implement unplug protocol in xen_platform



Am 23.06.2011 15:16, schrieb Stefano Stabellini:
> On Mon, 20 Jun 2011, Kevin Wolf wrote:
>>>> diff --git a/hw/xen_platform.c b/hw/xen_platform.c
>>>> index b167eee..9f8c843 100644
>>>> --- a/hw/xen_platform.c
>>>> +++ b/hw/xen_platform.c
>>>> @@ -34,6 +34,9 @@
>>>> #include "xen_backend.h"
>>>> #include "rwhandler.h"
>>>> #include "trace.h"
>>>> +#include "hw/ide/internal.h"
>>
>> Sorry, no. :-)
>>
>> This is not using a proper interface, but just a hack that depends on
>> the internal structure of the IDE emulation. It's going to break sooner
>> or later.
>>
>> It seems your problem is that IDE isn't unpluggable. I'm not entirely
>> sure what the right solution is, maybe just adding a new xen-ide device
>> that is used for the Xen machine and closely resembles piix4-ide, but
>> can be hot-unplugged.
>>
> 
> Actually the only thing I was using from hw/ide/internal.h is
> ide_bus_reset, but I can replace it with a qdev_reset_all call.
> Also it seems that at least Linux PV on HVM doesn't have any problems
> even without an ide bus reset when the disk is unplugged.
> 
> So I am going to resend this patch removing this import and replacing
> ide_bus_reset with qdev_reset_all. All the other block related functions
> I am using seem to be public.

hw/ide/pci.h is just as internal as internal.h is. And even if you
managed to access the same things without any IDE header file, I still
think it's not the right level of abstraction because it relies on the
implementation details of IDE.

Just this line: pci_ide->bus[di->bus].ifs[di->unit].bs = NULL; Does this
really look right to you to do anywhere outside IDE?

I'm basically looking for the same as Michael who wanted to have network
unplug handled through qdev, just that the IDE code doesn't support
unplug yet.

Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.