From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gordan Bobic Subject: Re: RFC: Automatically making a PCI device assignable in the config file Date: Wed, 10 Jul 2013 16:12:00 +0100 Message-ID: References: "" <51D6CC76.4040906@citrix.com> "<51D6CDE2.90808@eu.citrix.com>" <20957.26581.15772.550615@mariner.uk.xensource.com> <51DD739D.9090206@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51DD739D.9090206@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Andrew Cooper , Ian Jackson , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 10 Jul 2013 15:45:49 +0100, George Dunlap wrote: > On 10/07/13 14:55, Ian Jackson wrote: >> George Dunlap writes ("Re: [Xen-devel] RFC: Automatically making a >> PCI device assignable in the config file"): >>> Auto-seizing is fairly dangerous; you could easily accidentally >>> yank out >>> the ethernet card, or even the disk that dom0 is using. I really >>> think >>> it should have to be enabled on a device-by-device basis. >> I don't think this makes any sense. >> >> In practice you are saying that in order to avoid mistakes, the >> local >> admin must provide the BDF of the device to be passed through in two >> separate places. > > That's not what I had in mind; what I had in mind was something like > this: > > pci = [ '08:04.1,seize=1' ] > > Or alternately: > > xl pci-attach h0 08:04.1,seize=1 > > One could also imagine having something in xl.conf like the > following: > > pci.autoseize = [ '08:04.1','01:00.0' ] > > In this case you wouldn't be simply copy and pasting, because you'd > probably have different domains handling each device. But in any > case, this was just exploring the alternatives -- I don't think > that's > the best thing to do. > >> But that doesn't actually help. If this is all properly documented >> and so forth (ie, if the admin has a smooth experience and doesn't >> trip over having dailed to "seize" the device), they will just >> cut-and-paste the same value into both places in the config. >> >> They will also mutter under their breath to ask why this is >> necessary... > > If someone can accidentally type "xl pci-attach 08:04.0" instead of > "xl pci-attach 08.04.1" and suddenly completely lose their network > connectivity (or yank their hard drive out), then I think they'll > appreciate it. > > In any case, at the moment it's much worse: you have to either > scriptwise run "xl pci-assignable-add" a device, or add an exclusion > on the Linux commandline in grub. So far I'm the only person I know > who has complained about it. :-) This would be an awesome feature, but success can be mixed. My experience is that Nvidia drivers (as one example, I'm sure there are others) don't handle device detaching very gracefully. ACS might help but I have no means of testing that at the moment. So ultimately, you still have to either exclude at least some devices from grub (if xen-pciback is built in) or in modprobe.d (attach device to pciback in driver pre-install). I'm not sure what can be done about this considering we are talking about 3rd party binary drivers. :( Gordan