From: Ian Jackson Subject: Re: [PATCH 2 of 2] xl, libxl: Add per-device and global permissive config options for pci passthrough Date: Mon, 2 Apr 2012 16:20:49 +0100 Message-ID: <20345.50129.248371.995505@mariner.uk.xensource.com> References: <62b1030a2485536caf99.1333363657@kodo2> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <62b1030a2485536caf99.1333363657@kodo2> 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: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org George Dunlap writes ("[Xen-devel] [PATCH 2 of 2] xl, libxl: Add per-device and global permissive config options for pci passthrough"): > +By default pciback only allows PV guests to write "known safe" values into > +PCI config space. But many devices require writes to other areas of config > +space in order to operate properly. This tells the pciback driver to > +allow all writes to PCI config space for this domain and this device. This > +option should be enabled with caution, as there may be stability or security > +implications of doing so. Is this security warning not overly mealy-mouthed ? Surely it should be more definite. > +Changes the default value of 'permissive' for all PCI devices for this > +VM. This can still be overriden on a per-device basis. See the > +"pci=" section for more information on the "permissive" flag. And this should mention it as well I think. > + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "write to %s returned %d", Please keep the lines to 75-80 characters at most. I think you should consider breakibg out the sysfs writing function and refactoring with the very similar code in libxl__device_pci_reset, rather than introducing yet another clone. Ian.