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][HVM] pass-through PCI device hotplug support

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH][HVM] pass-through PCI device hotplug support
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Sun, 17 Feb 2008 23:34:39 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Sun, 17 Feb 2008 07:36:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3DB5401.1C8F6%Keir.Fraser@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080215133201.GB21201@xxxxxxxxxxxxxxxxxxxxxx> <C3DB5401.1C8F6%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Fri, Feb 15, 2008 at 02:36:49PM +0000, Keir Fraser wrote:
> On 15/2/08 13:32, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx> wrote:
> 
> > This patch is the new version against 17051 to enable HVM guest VT-d device
> > hotplug.
> > 
> > ** Currently only 2 virtual pci slots(6~7) are made as being capable of
> > hotplug, 
> > so more than 2 vtd dev can't be hotplugged, but we can easily extend it in
> > future.
> 
> Now applied, but perhaps too hastily. I found it broke the
> !CONFIG_PASSTHROUGH build and in fixing that I noticed that you dumped code

I assumed CONFIG_PASSTHROUGH is always on by default:(
So maybe need more #ifdef.

> in a bunch of random places in qemu. Perhaps all passthrough stuff should be
> gathered in one place? Alternatively at least the device model changes (in
> piix4acpi.c) should be decoupled a bit from the backend logic in

Agree with you. passthrough.c manage all the pass-through device info, while
piix4acpi.c manage GPE & hotplug controller and call into passthough.c in some 
condition(say a IO indicating hot removal arrive). 

So at least one pair of passthrough function should be in the piix4acpi and 
ifdef'ed, but we can move all the xenstore logic to it as you said.


> passthrough.c, so the former can cleanly build without the latter. I also
> killed pt_uninit() because I couldn't even find where pci_cleanup() was

pci_cleanup() is in the libpci, which should be called for clean up in theory.  
But things goes well without it.

> defined. No passthrough function should be in vl.c: I #ifdef'ed in the for

Our plan is making this hotplug generic besides passthough device, even for 
virtual PCI device on native QEMU. So leaving do_pci_add/del in vl.c should be 
okay like do_usb_xxx.

> now but the functions should probably be moved. And you did a big dump of
> random crap into vl.h.
> 
>  -- Keir
> 
> 

-- 
best rgds,
edwin

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