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

Re: [Xen-devel] [PATCH] PV Passthrough PCI Device Hotplug Support(Tools

To: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] PV Passthrough PCI Device Hotplug Support(Tools Part)
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Mon, 10 Mar 2008 11:04:57 +0900
Delivery-date: Sun, 09 Mar 2008 19:05:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47D48C8E.7060206@xxxxxxxxxxxxx>
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: <C3E44EB2.1440F%Keir.Fraser@xxxxxxxxxxxx> <47BEA1AC.40707@xxxxxxxxxxxxx> <47D48C8E.7060206@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Iwamatsu,

 def xm_pci_detach(args):
-    arg_check(args, 'pci-detach', 2)
-    dom = args[0]
-    dev = args[1]
-    server.xend.domain.destroyDevice(dom, 'dpci', dev)
+    arg_check(args, 'pci-detach', 2, 2)  <----------------- here!!
+    (dom, pci) = parse_pci_configuration(args, 'Closing')
+    server.xend.domain.device_configure(dom, pci)
+

The last "2" is not necessary. 
With your patch, the following strange error message is shown. 

# xm pci-detach
Error: 'xm pci-detach' requires between 2 and 2 arguments.
                                ^^^^^^^^^^^^^^^
Usage: xm pci-detach  <Domain> <virtual slot>

Remove a domain's pass-through pci device.


Best regards,
 Kan

Mon, 10 Mar 2008 10:19:10 +0900, Yosuke Iwamatsu wrote:

>Hi,
>
>This is the updated patch of PV PCI passthrough hotplug (tools portion).
>
>Changes to xm command:
>- Let 'xm pci-attach' command use <domain:bus:slot.func> expression
>   rather than use separated arguments like <domain> <bus> <slot> <func>.
>   This is the same expression of the domain configuration file and I
>   believe it is more user-friendly.
>- Let 'xm pci-detach' command use the same <domain:bus:slot.func>
>   expression. Formerly, <virtual slot> was used as the key to indicate
>   which device we were detaching. But for the current implementation of
>   PV PCI hotplug, virtual slots don't have much meaning. I think using
>   the same physical device name in both attachment and detachment is
>   appropriate here.
>
>Changes to xend:
>- Both attach and detach commands are received by device_configure()
>   and handled by pci_device_configure().
>- HVM specific processings are done in hvm_pci_create_device() and
>   hvm_destroyPCIDevice().
>
>The major problem I encoutered during this work is that, I don't have
>a vt-d enabled machine and could not confirm that HVM PCI hotplug would
>still work after modifications :-(
>Then I hacked libxc a little to pretend as if there existed a vt-d
>hardware, and could see HVM PCI attach/detach working correctly.
>So now I'm pretty sure that we can do both PV and HVM hotplugs with
>this patch, but I would appreciate it if someone could test this on
>a real vt-d machine.
>
>Regards,
>-------------------
>Yosuke Iwamatsu
>         NEC Corporation
>


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