Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-21 Thread Konrad Rzeszutek Wilk
On Fri, Nov 21, 2014 at 01:53:32PM -0300, Simon Martin wrote: > Hello Konrad and Jan, > > > > There was a bug in Xen pcibackend that I thought I upstreamed which could > > be releated. It was not restoring the right registers to the PCI-device. > > > They are attached. > > Thanks for the patche

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-21 Thread Simon Martin
Hello Konrad and Jan, > There was a bug in Xen pcibackend that I thought I upstreamed which could > be releated. It was not restoring the right registers to the PCI-device. > They are attached. Thanks for the patches, however I have been finding some very interesting things. I decided to keep

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-20 Thread Jan Beulich
>>> On 19.11.14 at 16:12, wrote: > This is getting more interesting. It seems that something is > overwriting the pci-back configuration data. > > Starting from a fresh reboot I checked the Dom0 pci configuration and > got this: > > root@smartin-xen:~# lspci -s 00:19.0 -x > 00:19.0 Et

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-19 Thread Konrad Rzeszutek Wilk
On Wed, Nov 19, 2014 at 12:12:09PM -0300, Simon Martin wrote: > Hello Jan and Konrad, > > Tuesday, November 18, 2014, 1:49:13 PM, you wrote: > > >> > >> I've just checked this with lspci. I see that the IO is being enabled. > > > Memory you mean. > > Yes. Sorry. > > >> Any other idea on

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-19 Thread Simon Martin
Hello Jan and Konrad, Tuesday, November 18, 2014, 1:49:13 PM, you wrote: >> >> I've just checked this with lspci. I see that the IO is being enabled. > Memory you mean. Yes. Sorry. >> Any other idea on why I might be reading back 0xff for all PCI >> memory area reads? The lspci output

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-18 Thread Jan Beulich
>>> On 18.11.14 at 17:24, wrote: > Hello Jan, > > Friday, November 14, 2014, 5:27:36 AM, you wrote: > I implied your earlier statement to mean that. But - did you also verify that the three flags actually end up set (ideally from both DomU and Dom0 perspective)? The PCI backend ma

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-18 Thread Simon Martin
Hello Konrad, Thursday, November 13, 2014, 4:29:15 PM, you wrote: > On Thu, Nov 13, 2014 at 04:21:48PM -0300, Simon Martin wrote: >> Thanks Konrad, >> >> Thursday, November 13, 2014, 4:03:38 PM, you wrote: >> >> >> Yes I do verify the write. How do I check this from Dom0? >> >> > You can crank

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-18 Thread Simon Martin
Hello Jan, Friday, November 14, 2014, 5:27:36 AM, you wrote: >>> I implied your earlier statement to mean that. But - did you also >>> verify that the three flags actually end up set (ideally from both >>> DomU and Dom0 perspective)? The PCI backend may be screwing >>> up things... >> >> Yes I d

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-14 Thread Jan Beulich
>>> On 13.11.14 at 18:49, wrote: >>> Yes, the first thing I do in the driver is set the PCI configuration >>> access bits to 7 that should enable IO space, Memory Space and Master >>> BUS access. >>> >>> As a test I disabled this and all reads to the PCI device return -1, >>> even the first

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-13 Thread Konrad Rzeszutek Wilk
On Thu, Nov 13, 2014 at 04:21:48PM -0300, Simon Martin wrote: > Thanks Konrad, > > Thursday, November 13, 2014, 4:03:38 PM, you wrote: > > >> Yes I do verify the write. How do I check this from Dom0? > > > You can crank up the debug volume in xen-pciback. Recompile the kernel > > and put '#defin

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-13 Thread Simon Martin
Thanks Konrad, Thursday, November 13, 2014, 4:03:38 PM, you wrote: >> Yes I do verify the write. How do I check this from Dom0? > You can crank up the debug volume in xen-pciback. Recompile the kernel > and put '#define DEBUG 1' at the start of the .c files. > Interestingly enough I saw this is

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-13 Thread Konrad Rzeszutek Wilk
On Thu, Nov 13, 2014 at 02:49:07PM -0300, Simon Martin wrote: > Hello Jan, > > >> > >> Yes, the first thing I do in the driver is set the PCI configuration > >> access bits to 7 that should enable IO space, Memory Space and Master > >> BUS access. > >> > >> As a test I disabled this and all

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-13 Thread Simon Martin
Hello Jan, >> >> Yes, the first thing I do in the driver is set the PCI configuration >> access bits to 7 that should enable IO space, Memory Space and Master >> BUS access. >> >> As a test I disabled this and all reads to the PCI device return -1, >> even the first one. > I implied your ea

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-13 Thread Jan Beulich
>>> On 13.11.14 at 16:07, wrote: > Thanks Jan, > > Thursday, November 13, 2014, 11:08:33 AM, you wrote: > > On 13.11.14 at 14:29, wrote: >>> I am having 2 major problems at the moment. >>> >>> 1.- Access to the PCI device from the PV will fail the second time I >>> create it UNLESS I call

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-13 Thread Simon Martin
Thanks Jan, Thursday, November 13, 2014, 11:08:33 AM, you wrote: On 13.11.14 at 14:29, wrote: >> I am having 2 major problems at the moment. >> >> 1.- Access to the PCI device from the PV will fail the second time I >> create it UNLESS I call xl pci-assignable-remove/pci-assignable-add >>

Re: [Xen-devel] Problems accessing passthrough PCI device

2014-11-13 Thread Jan Beulich
>>> On 13.11.14 at 14:29, wrote: > I am having 2 major problems at the moment. > > 1.- Access to the PCI device from the PV will fail the second time I > create it UNLESS I call xl pci-assignable-remove/pci-assignable-add > between each creation. If I don't do this then all PCI accesses return >