Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-15 Thread Stefano Stabellini
On Thu, 14 Jan 2016, Ian Jackson wrote: > Stefano Stabellini writes ("Re: [PATCH] QEMU as non-root and PCI passthrough > do not mix"): > > On Thu, 14 Jan 2016, Ian Campbell wrote: > > > What if b_info->device_model_user is NULL or == "root"? Doesn't this warn > > > even then? > > > > I meant to

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-15 Thread Konrad Rzeszutek Wilk
On Fri, Jan 15, 2016 at 02:14:40PM +, Stefano Stabellini wrote: > On Thu, 14 Jan 2016, Ian Jackson wrote: > > Stefano Stabellini writes ("Re: [PATCH] QEMU as non-root and PCI > > passthrough do not mix"): > > > On Thu, 14 Jan 2016, Ian Campbell wrote: > > > > What if b_info->device_model_user

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-15 Thread Stefano Stabellini
On Fri, 15 Jan 2016, Konrad Rzeszutek Wilk wrote: > On Fri, Jan 15, 2016 at 02:14:40PM +, Stefano Stabellini wrote: > > On Thu, 14 Jan 2016, Ian Jackson wrote: > > > Stefano Stabellini writes ("Re: [PATCH] QEMU as non-root and PCI > > > passthrough do not mix"): > > > > On Thu, 14 Jan 2016,

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-15 Thread Ian Campbell
On Fri, 2016-01-15 at 14:49 +, Stefano Stabellini wrote: > libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an > error message from QMP server: Device initialization failed Can we also get a patch added to qemu which provides something more meaningful if the reason it can't

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-15 Thread Ian Campbell
On Thu, 2016-01-14 at 17:42 +, Ian Jackson wrote: > Ian Campbell writes ("Re: [PATCH] QEMU as non-root and PCI passthrough do > not mix"): > > That reminds me -- how does the qemu user selection work over migrate? > > Does > > it remember the specific user or does it try and pick it again on

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-14 Thread Ian Jackson
Ian Campbell writes ("Re: [PATCH] QEMU as non-root and PCI passthrough do not mix"): > That reminds me -- how does the qemu user selection work over migrate? Does > it remember the specific user or does it try and pick it again on the other > end? Do we require all hosts in a pool to have been

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-14 Thread Ian Jackson
Stefano Stabellini writes ("Re: [PATCH] QEMU as non-root and PCI passthrough do not mix"): > On Thu, 14 Jan 2016, Ian Campbell wrote: > > What if b_info->device_model_user is NULL or == "root"? Doesn't this warn > > even then? > > I meant to warn even if device_model_user is NULL because it is

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-14 Thread Ian Campbell
On Thu, 2016-01-14 at 17:32 +, Stefano Stabellini wrote: >  > > > +LOG(DEBUG, "QEMU needs to be run as root for PCI passthrough to > > > work"); > > > > Shouldn't there be an if here, and/or an error return? > > Unfortunately we cannot get the user used to run QEMU with from here. >

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-14 Thread Stefano Stabellini
On Thu, 14 Jan 2016, Ian Campbell wrote: > On Tue, 2016-01-12 at 16:52 +, Stefano Stabellini wrote: > > PCI passthrough cannot work if QEMU is run as a non-root process today, > > as QEMU needs to open /dev/mem to mmap the MSI-X table of the device and > > read/write relevant nodes on sysfs. >

Re: [Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-14 Thread Ian Campbell
On Tue, 2016-01-12 at 16:52 +, Stefano Stabellini wrote: > PCI passthrough cannot work if QEMU is run as a non-root process today, > as QEMU needs to open /dev/mem to mmap the MSI-X table of the device and > read/write relevant nodes on sysfs. > > Update the docs to reflect that. > > Run

[Xen-devel] [PATCH] QEMU as non-root and PCI passthrough do not mix

2016-01-12 Thread Stefano Stabellini
PCI passthrough cannot work if QEMU is run as a non-root process today, as QEMU needs to open /dev/mem to mmap the MSI-X table of the device and read/write relevant nodes on sysfs. Update the docs to reflect that. Run QEMU as root and print a warning if at least one PCI device has been assigned