WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 3/3] xen: implement unplug protocol in xen_platform
From: Kevin Wolf <kwolf@xxxxxxxxxx>
Date: Mon, 27 Jun 2011 10:26:33 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx Devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>, Alexander Graf <agraf@xxxxxxx>, "qemu-devel@xxxxxxxxxx Developers" <qemu-devel@xxxxxxxxxx>, Anthony Liguori <anthony@xxxxxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
Delivery-date: Mon, 27 Jun 2011 01:24:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1106231248470.12963@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.DEB.2.00.1106161645230.12963@kaball-desktop> <1308240319-13949-3-git-send-email-stefano.stabellini@xxxxxxxxxxxxx> <7424DA76-FD02-479F-B72A-D0B6EBBDE7DF@xxxxxxx> <4DFF0C0A.8040505@xxxxxxxxxx> <alpine.DEB.2.00.1106231248470.12963@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10
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

<Prev in Thread] Current Thread [Next in Thread>