From: "Zhai, Edwin" Subject: Re: [PATCH] PV Passthrough PCI Device Hotplug Support (Tools Part) Date: Mon, 10 Mar 2008 15:17:01 +0800 Message-ID: <20080310071700.GM15578@edwin-srv.sh.intel.com> References: <47BEA1AC.40707@ab.jp.nec.com> <47D48C8E.7060206@ab.jp.nec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <47D48C8E.7060206@ab.jp.nec.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Yosuke Iwamatsu Cc: Keir Fraser , xen-devel@lists.xensource.com, "Zhai, Edwin" List-Id: xen-devel@lists.xenproject.org Yosuke, Thanks for you work. I have tested your patch works on HVM VT-d side. One suggestion is error handling for user input. e.g. following input error should be caught by xm: [root@vt-gang32 ~]# xm pci-attach EdwinHVMDomainVtd2 0:2.0.0 (should be 0:2:0.0) Error: pci: failed to locate device and parse it's resources - [Errno 2] No such file or directory: '/sys/bus/pci/devices/0000:00:02.0/driver' Usage: xm pci-attach [virtual slot] On Mon, Mar 10, 2008 at 10:19:10AM +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 expression > rather than use separated arguments like . > 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 > expression. Formerly, 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 > -- best rgds, edwin