Issues with PCI-Passtrough (VT-d) in HVM with Xen 4.6
Issues with PCI-Passtrough (VT-d) in HVM with Xen 4.6
=====================================================
Background
----------
I am trying to passthrough an Industrial Ethernet Interface (Hilscher GmbH CIFX 50E-DP(M/S)) on a HVM DomU running the Xen 4.6 Hypervisor. The card is being pass-trough to the HVM using the PCI permissive mode and VT-d is active on this platform.
The Linux driver of the card (available only with NDA) at first sight seems to work properly (e.g. no system stability problems, no call traces in dmesg).
Hilscher provides the libcifx, which is an user-level library for accessing the card. libcfix uses the generic UIO interface and some card-specific interfaces to communicate.
Issue
-----
Whenever libcifx tries perform a reset sequence initializing the card peripherals, we get an empty / invalid result.
I digged deeper into this by adding some debug hooks into the xen-pciback kernel module.
The card performs writes to offset 0x10 and 0x30 at card initialization (mostly writing dwords and words).
To verify if the writes were performed successfully, I read back the values after writing and can see that the read data differs from the written one.
Temporary Fix
-------------
After checking the source[1] of the PCI configuration space handling in xen-pciback, I found out that changing line 258 to read
if (handled && !err) {instead of:
if (!handled && !err) {solves the issue and I can successfully write to the interface.
I am unsure why this works and if it's the right way to do it or possibly a Xen bug, so I would like to ask for feedback for this.
Please let me know whenever I can supply additional logfiles or info. I'd be happy if we can resolve whenever this is a hardware- specific, driver-specific or Xen issue.
Thank you,
Sylwester
PS: I tried to CC Ryan Wilson and Konrad Rzeszutek Wilk, but the E-Mail seems to be no longer active. This is where the changes originated.
Refereces
---------
1.
https://github.com/google/kasan/blob/master/drivers/xen/xen-pciback/conf_space.c
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 47 lines · Sylwester Sosnowski
Issues with PCI-Passtrough (VT-d) in HVM with Xen 4.6
=====================================================Background
----------I am trying to passthrough an Industrial Ethernet Interface (Hilscher GmbH CIFX 50E-DP(M/S)) on a HVM DomU running the Xen 4.6 Hypervisor. The card is being pass-trough to the HVM using the PCI permissive mode and VT-d is active on this platform.
The Linux driver of the card (available only with NDA) at first sight seems to work properly (e.g. no system stability problems, no call traces in dmesg).
Hilscher provides the libcifx, which is an user-level library for accessing the card. libcfix uses the generic UIO interface and some card-specific interfaces to communicate.
Issue
-----Whenever libcifx tries perform a reset sequence initializing the card peripherals, we get an empty / invalid result.
I digged deeper into this by adding some debug hooks into the xen-pciback kernel module.
The card performs writes to offset
0x10and0x30at card initialization (mostly writing dwords and words).To verify if the writes were performed successfully, I read back the values after writing and can see that the read data differs from the written one.
Temporary Fix
-------------After checking the source[1] of the PCI configuration space handling in xen-pciback, I found out that changing line 258 to read
if (handled && !err) {instead of:
Quoted 7 lines
if (!handled && !err) {solves the issue and I can successfully write to the interface.
I am unsure why this works and if it's the right way to do it or possibly a Xen bug, so I would like to ask for feedback for this.
did you try the permissive module parameter?
Quoted 9 lines
Please let me know whenever I can supply additional logfiles or info. I'd be happy if we can resolve whenever this is a hardware- specific, driver-specific or Xen issue.
Thank you,
Sylwester
Quoted 8 lines
PS: I tried to CC Ryan Wilson and Konrad Rzeszutek Wilk, but the E-Mail seems to be no longer active. This is where the changes originated.
Refereces
---------
1.
https://github.com/google/kasan/blob/master/drivers/xen/xen-pciback/conf_space.c
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 1 line · On 02.06.16 um 22:06 Konrad Rzeszutek Wilk wrote:
Quoted 1 line
did you try the permissive module parameter?
Yes, I have been using the permissive mode when
I was getting these results.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · On 02.06.16 at 21:59 Sylwester Sosnowski wrote:
Issues with PCI-Passtrough (VT-d) in HVM with Xen 4.6
=====================================================Background
----------I am trying to passthrough an Industrial Ethernet Interface (Hilscher GmbH CIFX 50E-DP(M/S)) on a HVM DomU running the Xen 4.6 Hypervisor. The card is being pass-trough to the HVM using the PCI permissive mode and VT-d is active on this platform.
Quick correction here: I meant PV and not HVM. I mixed up the terms.
Sorry for the confusion.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 02.06.16 at 21:59, <[email protected]> wrote:
Temporary Fix
-------------After checking the source[1] of the PCI configuration space handling in xen-pciback, I found out that changing line 258 to read
Quoted 7 lines
if (handled && !err) {instead of:
if (!handled && !err) {solves the issue and I can successfully write to the interface.
This can't possibly a solution (see also the comment right there). But without you telling us what register gets written with what value, and what's being read back, I don't think there's much we can do or suggest. In the end, by changing the conditional you force writes that _did_ get emulated to _nevertheless_ also get carried out to raw hardware. If that helps for your specific case, then it's quite possible that something in the emulation paths invoked from the code above that conditional is wrong.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 16 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 02.06.16 at 21:59, <[email protected]> wrote:
Temporary Fix
-------------After checking the source[1] of the PCI configuration space handling in xen-pciback, I found out that changing line 258 to read
Quoted 7 lines
if (handled && !err) {instead of:
if (!handled && !err) {solves the issue and I can successfully write to the interface.
Quoted 8 lines
This can't possibly a solution (see also the comment right there). But without you telling us what register gets written with what value, and what's being read back, I don't think there's much we can do or suggest. In the end, by changing the conditional you force writes that _did_ get emulated to _nevertheless_ also get carried out to raw hardware. If that helps for your specific case, then it's quite possible that something in the emulation paths invoked from the code above that conditional is wrong.
Many thanks Jan for your comment!!
Regarding the flow of data: there is a user level "toolkit" and the actual uio driver (uio_netx).
1. The uio_netx driver "only" configures the device and turns the interrupts off. This appears to be working, although I find it strange, that when it is "write request 4 bytes" conf_space.c seems to do it twice, when it is "write request 2 bytes", it is only once (see below) - but I am not sure if I overlooked something.
2. the user level driver part (toolkit) first reads out the PCI config, send a reset sequence to the device, and then restores (write back the previously save PCI config) to the driver. After that, it should upload the firmware blob to the PCI card, which does not happen, because it thinks, the reset was not successful.
But I need to capture this again and compare with the settings of the reset sequence in the source of the driver (will send later).
So far I got the following- does that make sense to you?
Dom0:
lspci -vvv -s 06:00.0 06:00.0 Unassigned class [ff00]: Hilscher GmbH CIFX 50E-DP(M/S) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 64 Interrupt: pin A routed to IRQ 11 Region 0: Memory at f7a00000 (32-bit, non-prefetchable) [size=64K] modprobe xen-pciback verbose_request=1 xl pci-assignable-add 06:00.0 xl pci-attach debian-guest 06:00.0,permissive=1
Driver gets automatically loaded in DomU and the driver tries to disable the interrupts
https://github.com/torvalds/linux/blob/master/drivers/uio/uio_netx.c#L99
on Dom0: tail -f /var/log/kern.log
---- snip ----
pciback 0000:06:00.0: enabling permissive mode configuration space accesses!
[139971.850691] pciback 0000:06:00.0: permissive mode is potentially unsafe! [139971.904249] xen_pciback: vpci: 0000:06:00.0: assign to virtual slot 0 [139971.906548] pciback 0000:06:00.0: registering for 17766 [139971.914313] xen-pciback: 0000:06:00.0: read 4 bytes at 0x0 [139971.914327] xen-pciback: 0000:06:00.0: read 4 bytes at 0x0 = 15cf [139971.914341] xen-pciback: 0000:06:00.0: read 1 bytes at 0xe [139971.914350] xen-pciback: 0000:06:00.0: read 1 bytes at 0xe = 0 [139971.914356] xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 [139971.914364] xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200 [139971.914378] xen-pciback: 0000:06:00.0: read 4 bytes at 0x8 [139971.914386] xen-pciback: 0000:06:00.0: read 4 bytes at 0x8 = ff000000 [139971.914402] xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 [139971.914409] xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200 [139971.914423] xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d [139971.914437] xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d = 1 [139971.914448] xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c [139971.914456] xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c = 10 [139971.914466] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 [139971.914480] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 103 [139971.914490] xen-pciback: 0000:06:00.0: write request 2 bytes at 0x4 = 100 [139971.914492] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 [139971.914505] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 103
---- snap ----
which is from here https://github.com/torvalds/linux/blob/master/drivers/xen/xen-pciback/conf_space.c#L208
One observation that struck me:
- if the write request is a word (as opposed to a double word), the
write always seems to succeed!
[139971.914490] xen-pciback: 0000:06:00.0: write request 2 bytes at 0x4 = 100 <---- input value [139971.914492] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 [139971.914505] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 103 <---- before write [139971.914527] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 [139971.914540] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 100 <---- after write
- if the write request is a double word, the write _sometimes_ seems
to succeed!
or is this just some method the overwrite all registers with
"ffffffff" first and then set the actual value?
[914572] xbk: 06:00.0: write request 4 bytes at 0x10 = ffffffff [914574] xbk: 06:00.0: read 4 bytes at 0x10
[914582] xbk: 06:00.0: read 4 bytes at 0x10 = f7a00000 [914591] xbk: 06:00.0: read 4 bytes at 0x10
[914599] xbk: 06:00.0: read 4 bytes at 0x10 = 10000 <---- fail
--
[914636] xbk: 06:00.0: write request 4 bytes at 0x10 = f7a00000 [914638] xbk: 06:00.0: read 4 bytes at 0x10
[914646] xbk: 06:00.0: read 4 bytes at 0x10 = 10000 [914660] xbk: 06:00.0: read 4 bytes at 0x10
[914667] xbk: 06:00.0: read 4 bytes at 0x10 = f7a00000 <----
success
--
[919484] xbk: 06:00.0: write request 4 bytes at 0x14 = ffffffff [919486] xbk: 06:00.0: read 4 bytes at 0x14
[919493] xbk: 06:00.0: read 4 bytes at 0x14 = 0 [919502] xbk: 06:00.0: read 4 bytes at 0x14
[919508] xbk: 06:00.0: read 4 bytes at 0x14 = 1 <---- fail
--
[919542] xbk: 06:00.0: write request 4 bytes at 0x14 = 0 [919544] xbk: 06:00.0: read 4 bytes at 0x14
[919551] xbk: 06:00.0: read 4 bytes at 0x14 = 1 [919564] xbk: 06:00.0: read 4 bytes at 0x14
[919574] xbk: 06:00.0: read 4 bytes at 0x14 = 0 <---- success
--
[922060] xbk: 06:00.0: write request 4 bytes at 0x18 = ffffffff [922062] xbk: 06:00.0: read 4 bytes at 0x18
[922069] xbk: 06:00.0: read 4 bytes at 0x18 = 0 [922082] xbk: 06:00.0: read 4 bytes at 0x18
[922089] xbk: 06:00.0: read 4 bytes at 0x18 = 1 <---- fail
--
[922136] xbk: 06:00.0: write request 4 bytes at 0x18 = 0 [922138] xbk: 06:00.0: read 4 bytes at 0x18
[922146] xbk: 06:00.0: read 4 bytes at 0x18 = 1 [922158] xbk: 06:00.0: read 4 bytes at 0x18
[922166] xbk: 06:00.0: read 4 bytes at 0x18 = 0 <---- success
So far, this seems to be fine, actually. The problem starts, once we run the diagnostic tool for the PCI card (works fine of course on Dom0), which initiates the reset on the card (again: read PCI config, send reset sequence, write back config to PCI card, check if some "flag" is valid (which is not), and then goes on to upload the firmware to the device).
Many thanks!!! Jürgen
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 03.06.16 at 14:02, <[email protected]> wrote:
One observation that struck me:
- if the write request is a word (as opposed to a double word), the
write always seems to succeed![139971.914490] xen-pciback: 0000:06:00.0: write request 2 bytes at 0x4 = 100 <---- input value [139971.914492] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 [139971.914505] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 103 <---- before write [139971.914527] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 [139971.914540] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 100 <---- after write
Quoted 2 lines
- if the write request is a double word, the write _sometimes_ seems
to succeed!
Well, perhaps that depends on which field gets written to, rather than merely the width of the write.
Quoted 8 lines
or is this just some method the overwrite all registers with
"ffffffff" first and then set the actual value?[914572] xbk: 06:00.0: write request 4 bytes at 0x10 = ffffffff [914574] xbk: 06:00.0: read 4 bytes at 0x10 [914582] xbk: 06:00.0: read 4 bytes at 0x10 = f7a00000 [914591] xbk: 06:00.0: read 4 bytes at 0x10 [914599] xbk: 06:00.0: read 4 bytes at 0x10 = 10000 <---- fail
That's an unexpected value, indeed (but seems to match up with the source, so there's definitely something wrong here - this presumably ought to be 0xffff0000, meaning the size of that region is 64k). You also can't expect to read back 0xffffffff in this
case: BARs have some read-only bits at the bottom.
Quoted 6 lines
[914636] xbk: 06:00.0: write request 4 bytes at 0x10 = f7a00000 [914638] xbk: 06:00.0: read 4 bytes at 0x10 [914646] xbk: 06:00.0: read 4 bytes at 0x10 = 10000 [914660] xbk: 06:00.0: read 4 bytes at 0x10 [914667] xbk: 06:00.0: read 4 bytes at 0x10 = f7a00000 <----success
But overall this doesn't look to be a trace of the post-reset restore attempt, but instead I'd guess this is the OS sizing the BARs. I.e. while apparently pointing to a problem, likely not directly related to yours.
I'll see to put together a patch for the recognizable problem, but I'm still unclear about your actual one.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines
Quoted 10 lines
Quoted 2 lines · On 03.06.16 at 15:26, <[email protected]> wrote:
Quoted 1 line · On 03.06.16 at 14:02, <[email protected]> wrote:
or is this just some method the overwrite all registers with
"ffffffff" first and then set the actual value?[914572] xbk: 06:00.0: write request 4 bytes at 0x10 = ffffffff [914574] xbk: 06:00.0: read 4 bytes at 0x10 [914582] xbk: 06:00.0: read 4 bytes at 0x10 = f7a00000 [914591] xbk: 06:00.0: read 4 bytes at 0x10 [914599] xbk: 06:00.0: read 4 bytes at 0x10 = 10000 <---- fail
Quoted 4 lines
That's an unexpected value, indeed (but seems to match up with the source, so there's definitely something wrong here - this presumably ought to be
0xffff0000, meaning the size of that region is 64k).
Mind trying out the attached patch?
Jan
xen-pciback: return proper values during BAR sizing
Reads following writes with all address bits set to 1 should return all changeable address bits as one, not the BAR size (nor, as was the case for the upper half of 64-bit BARs, the high half of the region's end address). Presumably this didn't cause any problems so far because consumers use the value to calculate the size (usually via val & -val), and do nothing else with it.
But also consider the exception here: Unimplemented BARs should always return all zeroes.
And finally, the check for whether to return the sizing address on read for the ROM BAR should ignore all non-address bits, not just the ROM Enable one.
drivers/xen/xen-pciback/conf_space_header.c +11 -7
@@ -149,7 +149,7 @@ static int rom_write(struct pci_dev *dev/* A write to obtain the length must happen as a 32-bit write. * This does not (yet) support writing individual bytes */ -if (value == ~PCI_ROM_ADDRESS_ENABLE ) +if ((value | ~PCI_ROM_ADDRESS_MASK ) == ~0 ) bar->which =1 ;else {u32 tmpval;
@@ -229,38 +229,42 @@ static inline void read_dev_bar(struct p (PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64))) { bar_info->val = res[pos -1 ].start >>32 ; - bar_info->len_val = res[pos -1 ].end >>32 ; + bar_info->len_val = -resource_size (&res[pos -1 ]) >>32 ;return ; } } +if (!res[pos].flags || + (res[pos].flags & (IORESOURCE_DISABLED |IORESOURCE_UNSET | +IORESOURCE_BUSY ))) +return ; + bar_info->val = res[pos].start | (res[pos].flags &PCI_REGION_FLAG_MASK ); - bar_info->len_val =resource_size (&res[pos]); + bar_info->len_val = -resource_size (&res[pos]) | + (res[pos].flags &PCI_REGION_FLAG_MASK ); }static void *bar_init (struct pci_dev *dev,int offset) { -struct pci_bar_info *bar =kmalloc (sizeof (*bar),GFP_KERNEL ); +struct pci_bar_info *bar =kzalloc (sizeof (*bar),GFP_KERNEL );if (!bar)return ERR_PTR (-ENOMEM );read_dev_bar (dev, bar, offset, ~0 ); - bar->which =0 ;return bar; }static void *rom_init (struct pci_dev *dev,int offset) { -struct pci_bar_info *bar =kmalloc (sizeof (*bar),GFP_KERNEL ); +struct pci_bar_info *bar =kzalloc (sizeof (*bar),GFP_KERNEL );if (!bar)return ERR_PTR (-ENOMEM );read_dev_bar (dev, bar, offset, ~PCI_ROM_ADDRESS_ENABLE ); - bar->which =0 ;return bar; }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Hi Jan,
Quoted 12 lines · Jan Beulich
Quoted 12 lines
Quoted 11 lines
Quoted 2 lines · On 03.06.16 at 15:26, <[email protected]> wrote:
Quoted 1 line · On 03.06.16 at 14:02, <[email protected]> wrote:
or is this just some method the overwrite all registers with
"ffffffff" first and then set the actual value?[914572] xbk: 06:00.0: write request 4 bytes at 0x10 = ffffffff [914574] xbk: 06:00.0: read 4 bytes at 0x10 [914582] xbk: 06:00.0: read 4 bytes at 0x10 = f7a00000 [914591] xbk: 06:00.0: read 4 bytes at 0x10 [914599] xbk: 06:00.0: read 4 bytes at 0x10 = 10000 <----fail
Quoted 6 lines
Quoted 4 lines
That's an unexpected value, indeed (but seems to match up with the source, so there's definitely something wrong here - this presumably ought to be
0xffff0000, meaning the size of that region is 64k).Mind trying out the attached patch?
Many thanks for your patch!! I did try it, and it is different now (details in files attached)
"best of conf_space_header" see below.
I cannot really make sense of it, though. Can you?
Thank you, Jürgen
original:
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = 10000
patched:
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = ffff0000
==> pci-attach-orig-grep <==
3906.673306] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = ffffffff 3906.673307] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 3906.673313] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000 --
3906.673338] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = f7a00000 3906.673339] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 3906.673345] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = 10000 --
3906.673405] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = ffffffff 3906.673406] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 3906.673413] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
--
3906.673434] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = 0 3906.673436] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 3906.673442] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 1
--
3906.673496] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = ffffffff 3906.673498] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 3906.673504] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
--
3906.673526] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = 0 3906.673528] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 3906.673533] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 1
--
3906.673590] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = ffffffff 3906.673598] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c 3906.673612] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
--
3906.673660] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = 0 3906.673670] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c 3906.673684] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 1
--
3906.673747] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = ffffffff 3906.673749] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 3906.673756] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
--
3906.673801] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = 0 3906.673804] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 3906.673812] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 1
--
3906.673988] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = ffffffff 3906.673992] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 3906.674002] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
--
3906.674067] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = 0 3906.674069] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 3906.674076] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 1
--
3906.674146] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = fffff800 3906.674149] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 3906.674156] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
--
3906.674220] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = 0 3906.674223] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 3906.674232] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
==> pci-attach-jan-grep <==
4743.120637] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = ffffffff 4743.120638] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 4743.120645] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000 --
4743.120675] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = f7a00000 4743.120677] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 4743.120685] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = ffff0000 --
4743.120741] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = ffffffff 4743.120742] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 4743.120749] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
--
4743.120779] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = 0 4743.120781] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 4743.120788] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
--
4743.120845] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = ffffffff 4743.120847] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 4743.120854] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
--
4743.120884] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = 0 4743.120886] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 4743.120891] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
--
4743.120954] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = ffffffff 4743.120955] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c 4743.120961] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
--
4743.120993] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = 0 4743.120994] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c 4743.121000] xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
--
4743.121055] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = ffffffff 4743.121058] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 4743.121064] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
--
4743.121098] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = 0 4743.121099] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 4743.121107] xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
--
4743.121171] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = ffffffff 4743.121173] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 4743.121180] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
--
4743.121205] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = 0 4743.121207] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 4743.121214] xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
--
4743.121278] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = fffff800 4743.121280] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 4743.121287] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
--
4743.121326] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = 0 4743.121328] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 4743.121333] xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
pciback 0000:06:00.0: enabling permissive mode configuration space accesses! pciback 0000:06:00.0: permissive mode is potentially unsafe!xen_pciback: vpci: 0000:06:00.0: assign to virtual slot 0 pciback 0000:06:00.0: registering for 33
xen-pciback: 0000:06:00.0: read 4 bytes at 0x0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x0 = 15cf
xen-pciback: 0000:06:00.0: read 1 bytes at 0xe
xen-pciback: 0000:06:00.0: read 1 bytes at 0xe = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 4 bytes at 0x8
xen-pciback: 0000:06:00.0: read 4 bytes at 0x8 = ff000000
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d = 1
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c = 10
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = 10000
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = 10000
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 1
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 1
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 1
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 1
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 1
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 1
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 1
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 1
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 1
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 1
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = fffff800
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2c
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2c = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2e
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2e = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: write request 2 bytes at 0x4 = 2
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: enable
pciback 0000:06:00.0: enabling device (0000 -> 0002)
xen: registering gsi 16 triggering 0 polarity 1
Already setup the GSI :16
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c = 10
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d = 1
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 2
pciback 0000:06:00.0: enabling permissive mode configuration space accesses! pciback 0000:06:00.0: permissive mode is potentially unsafe!xen_pciback: vpci: 0000:06:00.0: assign to virtual slot 0 pciback 0000:06:00.0: registering for 33
xen-pciback: 0000:06:00.0: read 4 bytes at 0x0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x0 = 15cf
xen-pciback: 0000:06:00.0: read 1 bytes at 0xe
xen-pciback: 0000:06:00.0: read 1 bytes at 0xe = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 4 bytes at 0x8
xen-pciback: 0000:06:00.0: read 4 bytes at 0x8 = ff000000
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d = 1
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c = 10
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = ffff0000
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = f7a00000
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10
xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = ffff0000
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14
xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18
xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c
xen-pciback: 0000:06:00.0: read 4 bytes at 0x1c = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20
xen-pciback: 0000:06:00.0: read 4 bytes at 0x20 = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = ffffffff
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24
xen-pciback: 0000:06:00.0: read 4 bytes at 0x24 = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = fffff800
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: write request 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30
xen-pciback: 0000:06:00.0: read 4 bytes at 0x30 = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2c
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2c = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2e
xen-pciback: 0000:06:00.0: read 2 bytes at 0x2e = 0
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6
xen-pciback: 0000:06:00.0: read 2 bytes at 0x6 = 200
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: write request 2 bytes at 0x4 = 2
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 0
xen-pciback: 0000:06:00.0: enable
pciback 0000:06:00.0: enabling device (0000 -> 0002)
xen: registering gsi 16 triggering 0 polarity 1
Already setup the GSI :16
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3c = 10
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d
xen-pciback: 0000:06:00.0: read 1 bytes at 0x3d = 1
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4
xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 2
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · Jan Beulich
I'll see to put together a patch for the recognizable problem, but I'm still unclear about your actual one.
regarding the actual one: while it is still not working, I managed to dig deeper and found a few observations
background: there is a driver/kernel module, and a user space library, and a "test console" the "test console" uses the library, and invokes "cifXInit" (initialise the PCI card)
during init, it does
a) read pci config (space)
b) send reset sequence to the PCI device
c) writes back the pci config saved from step "a)" (restore)
I used "lspci -xxx -s BDF" to read that config space, now
- on the Dom0 - when I run that "test console", everything works as expected, and the "lspci -xxx" output is the same before and after the reset sequence (there is a delay built-in to allow rebooting of the ARM chip on the device)
before the reset:
06:00.0 Unassigned class [ff00]: Hilscher GmbH CIFX 50E-DP(M/S) 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00 10: 00 00 a0 f7 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
diff before-reset after-reset:
2,3c2,3
< 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00 < 10: 00 00 a0 f7 00 00 00 00 00 00 00 00 00 00 00 00
---
Quoted 2 lines
00: cf 15 00 00 00 00 00 02 00 00 00 ff 00 00 00 00 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
5c5
< 30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
---
Quoted 1 line
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00
and it is 100% identical to "before reset" after the configuration restore operation
- on the DomU - when I run that "test console" tool, the "lspci -xxx" output is different from before/after not much, though, only one register(?)
diff lspci.before-testconsole lspci.after-testconsole 2c2
< 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00
---
Quoted 1 line
00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 00 00 00
Now, I my desperation I found out about "setpci" and thought I give it a shot, alas no dice, it does not seem to write
root@DomU: setpci -s 00:00.0 D.B # the device is at 00.00.0
log from Dom0 # the device is at 06.00.0
xen-pciback: 0000:06:00.0: read 1 bytes at 0xd xen-pciback: 0000:06:00.0: read 1 bytes at 0xd = 0
root@DomU: setpci -s 00:00.0 D.B=40 # the device is at 00.00.0
log from Dom0 # the device is at 06.00.0
xen-pciback: 0000:06:00.0: write request 1 bytes at 0xd = 40 xen-pciback: 0000:06:00.0: read 1 bytes at 0xd xen-pciback: 0000:06:00.0: read 1 bytes at 0xd = 0
Even though, when I do "cat /sys/bus/pci/drivers/pciback/quirks" it duly lists this address as writeable:
06:00.0
15cf:0000:0000:0000
00000000:2:00000000
00000002:2:00000000
00000004:2:00000000
0000003c:1:00000000
0000003d:1:00000000
0000000c:1:00000000
0000000d:1:00000000 <------- ok to write 1 byte
0000000f:1:00000000
00000010:4:00000000
00000014:4:00000000
00000018:4:00000000
0000001c:4:00000000
00000020:4:00000000
00000024:4:00000000
00000030:4:00000000Lastly, this is the only difference of "lspci -xxx" (after a _PCI_ device reset) between Dom0 and DomU
diff lspci.before-domU lspci.before-dom0
< 30: 00 00 00 00 00 00 00 00 00 00 00 00 10 01 00 00
---
Quoted 1 line
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00
Long story short, not sure where to look anymore :(
It just seems like this thing is not "coming back" properly after the driver send the device reset. The comment in the driver source say, if this address has 0xFFFFFFFF "This happens if memory is not available." (but I doubt, this is necessarily the correct error message)
Very lastly, when I do "xl dmesg | grep VT-d" - there is some msg re: no Dom0 DMA passtrough
(XEN) Intel VT-d iommu 0 supported page sizes: 4kB. (XEN) Intel VT-d iommu 1 supported page sizes: 4kB. (XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled. <------ ?? important ???
(XEN) Intel VT-d Queued Invalidation enabled. (XEN) Intel VT-d Interrupt Remapping enabled. (XEN) Intel VT-d Shared EPT tables not enabled.
Thanks again for reading that far! Jürgen
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 04.06.16 at 16:36, <[email protected]> wrote:
Quoted 1 line · Jan Beulich
Mind trying out the attached patch?
Many thanks for your patch!! I did try it, and it is different now (details in files attached)
"best of
conf_space_header" see below.I cannot really make sense of it, though. Can you?
Sure - it's now as expected. As said - there are read-only bits at the bottom of all of the BAR registers.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.06.16 at 17:15, <[email protected]> wrote:
Quoted 2 lines · Jan Beulich
I'll see to put together a patch for the recognizable problem, but I'm still unclear about your actual one.
regarding the actual one: while it is still not working, I managed to dig deeper and found a few observations
background: there is a driver/kernel module, and a user space library, and a "test console"
the "test console" uses the library, and invokes "cifXInit" (initialise the PCI card)
Quoted 4 lines
during init, it does
a) read pci config (space)
b) send reset sequence to the PCI device
c) writes back the pci config saved from step "a)" (restore)
I'm sorry to mention that, but so far you still didn't provide a matching pciback log for that portion of the operation, at least afaict.
Quoted 9 lines
- on the DomU - when I run that "test console" tool, the "lspci -xxx" output is different from before/after
not much, though, only one register(?)diff lspci.before-testconsole lspci.after-testconsole 2c2
< 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00
---Quoted 1 line
00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 00 00 00
Okay, that's the Latency Timer field, and I think just like BARs we may need to permit restoring this field. However, please note that the reset being done behind the back of pciback really is the problem here: pciback assumes (for a reason, as you can certainly understand) that it has full control over config space of a passed through device.
And actually the latency timer would, as a side effect of enabling bus mastering on the device (via the pci_set_master() call from command_write()) set the Latency Timer field properly, just that again pciback (and the rest of Dom0's PCI subsystem) thinks that bus mastering is already enabled on the device. So perhaps in permissive mode we should simply allow the latency timer field to be written, just like we allow writing various of the Command Register bits in that mode. Maintainers, what do you think?
If we decide to go that route, I would then wonder whether Cache Line Size being unconditionally writable right now would also better be restricted to permissive mode.
In any event, Jürgen, it would be helpful if you could confirm that instead of your gross hack, only permitting the actual write of that one field would also make the device usable by the guest.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Hi Jan,
Quoted 13 lines · Jan Beulich
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 04.06.16 at 17:15, <[email protected]> wrote:
Quoted 2 lines · Jan Beulich
I'll see to put together a patch for the recognizable problem, but I'm still unclear about your actual one.
regarding the actual one: while it is still not working, I managed to dig deeper and found a few observations
background: there is a driver/kernel module, and a user space library, and a "test console"
the "test console" uses the library, and invokes "cifXInit" (initialise the PCI card)
Quoted 8 lines
Quoted 4 lines
during init, it does
a) read pci config (space)
b) send reset sequence to the PCI device
c) writes back the pci config saved from step "a)" (restore)I'm sorry to mention that, but so far you still didn't provide a matching pciback log for that portion of the operation, at least afaict.
sorry about that- we managed to pull this together. note: we changed the user space library to perform another read after the write/restore
we did on Dom0 and DomU, "inside permissive mode" printk statement we added if it goes into "if (!handled ...)"
DOM0
# read PCI config and save for later restore
(gdb) x/64wx 0x6221900x622190: 0x000015cf 0x02000107 0xff000000 0x000040000x6221a0: 0xf7a00000 0x00000000 0x00000000 0x000000000x6221b0: 0x00000000 0x00000000 0x00000001 0x000000000x6221c0: 0x00000000 0x00000000 0x00000000 0x0000010b0x6221d0: 0x00000000 0x00000000 0x00000000 0x000000000x6221e0: 0x00000000 0x00000000 0x00000000 0x000000000x6221f0: 0x00000000 0x00000000 0x00000000 0x000000000x622200: 0x00000000 0x00000000 0x00000000 0x000000000x622210: 0x00000000 0x00000000 0x00000000 0x000000000x622220: 0x00000000 0x00000000 0x00000000 0x000000000x622230: 0x00000000 0x00000000 0x00000000 0x000000000x622240: 0x00000000 0x00000000 0x00000000 0x000000000x622250: 0x00000000 0x00000000 0x00000000 0x000000000x622260: 0x00000000 0x00000000 0x00000000 0x000000000x622270: 0x00000000 0x00000000 0x00000000 0x000000000x622280: 0x00000000 0x00000000 0x00000000 0x00000000
# write/restore PCI config # ... # read PCI config again and see what is there now
(gdb) x/64w 0x6221900x622190: 0x000015cf 0x02000107 0xff000000 0x00004000 <--- worked0x6221a0: 0xf7a00000 0x00000000 0x00000000 0x000000000x6221b0: 0x00000000 0x00000000 0x00000001 0x000000000x6221c0: 0x00000000 0x00000000 0x00000000 0x0000010b0x6221d0: 0x00000000 0x00000000 0x00000000 0x000000000x6221e0: 0x00000000 0x00000000 0x00000000 0x000000000x6221f0: 0x00000000 0x00000000 0x00000000 0x000000000x622200: 0x00000000 0x00000000 0x00000000 0x000000000x622210: 0x00000000 0x00000000 0x00000000 0x000000000x622220: 0x00000000 0x00000000 0x00000000 0x000000000x622230: 0x00000000 0x00000000 0x00000000 0x000000000x622240: 0x00000000 0x00000000 0x00000000 0x000000000x622250: 0x00000000 0x00000000 0x00000000 0x000000000x622260: 0x00000000 0x00000000 0x00000000 0x000000000x622270: 0x00000000 0x00000000 0x00000000 0x000000000x622280: 0x00000000 0x00000000 0x00000000 0x00000000
(gdb)
DOMU
# read PCI config and save for later restore
(gdb) p pvPCIConfig
$2 = (void *) 0x61ef90
(gdb) x/64wx 0x61ef900x61ef90: 0x000015cf 0x02000102 0xff000000 0x000040000x61efa0: 0xf7a00000 0x00000000 0x00000000 0x000000000x61efb0: 0x00000000 0x00000000 0x00000001 0x000000000x61efc0: 0x00000000 0x00000000 0x00000000 0x000001100x61efd0: 0x00000000 0x00000000 0x00000000 0x000000000x61efe0: 0x00000000 0x00000000 0x00000000 0x000000000x61eff0: 0x00000000 0x00000000 0x00000000 0x000000000x61f000: 0x00000000 0x00000000 0x00000000 0x000000000x61f010: 0x00000000 0x00000000 0x00000000 0x000000000x61f020: 0x00000000 0x00000000 0x00000000 0x000000000x61f030: 0x00000000 0x00000000 0x00000000 0x000000000x61f040: 0x00000000 0x00000000 0x00000000 0x000000000x61f050: 0x00000000 0x00000000 0x00000000 0x000000000x61f060: 0x00000000 0x00000000 0x00000000 0x000000000x61f070: 0x00000000 0x00000000 0x00000000 0x000000000x61f080: 0x00000000 0x00000000 0x00000000 0x00000000
# write/restore PCI config # ... # read PCI config again and see what is there now
(gdb) p OS_ReadPCIConfig(ptDevInstance->pvOSDependent) $3 = (void *) 0x61ef90
(gdb) x/64wx 0x61ef900x61ef90: 0x000015cf 0x02000102 0xff000000 0x00000000 <--- failed0x61efa0: 0xf7a00000 0x00000000 0x00000000 0x000000000x61efb0: 0x00000000 0x00000000 0x00000001 0x000000000x61efc0: 0x00000000 0x00000000 0x00000000 0x000001100x61efd0: 0x00000000 0x00000000 0x00000000 0x000000000x61efe0: 0x00000000 0x00000000 0x00000000 0x000000000x61eff0: 0x00000000 0x00000000 0x00000000 0x000000000x61f000: 0x00000000 0x00000000 0x00000000 0x000000000x61f010: 0x00000000 0x00000000 0x00000000 0x000000000x61f020: 0x00000000 0x00000000 0x00000000 0x000000000x61f030: 0x00000000 0x00000000 0x00000000 0x000000000x61f040: 0x00000000 0x00000000 0x00000000 0x000000000x61f050: 0x00000000 0x00000000 0x00000000 0x000000000x61f060: 0x00000000 0x00000000 0x00000000 0x000000000x61f070: 0x00000000 0x00000000 0x00000000 0x000000000x61f080: 0x00000000 0x00000000 0x00000000 0x00000000
[ 1466.964782 < 139.522689>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x0 = 15cf
[ 1466.964786 < 0.000004>] xen-pciback: 0000:06:00.0: read 2 bytes at 0x0 [ 1466.964799 < 0.000013>] xen-pciback: 0000:06:00.0: read 2 bytes at 0x0 = 15cf [ 1466.964801 < 0.000002>] xen-pciback: 0000:06:00.0: read 2 bytes at 0x2 [ 1466.964807 < 0.000006>] xen-pciback: 0000:06:00.0: read 2 bytes at 0x2 = 0 [ 1466.964828 < 0.000021>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x4 = 2000102 [ 1466.964829 < 0.000001>] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 [ 1466.964841 < 0.000012>] xen-pciback: 0000:06:00.0: read 2 bytes at 0x4 = 102 [ 1466.964870 < 0.000029>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x8 = ff000000 [ 1466.964872 < 0.000002>] xen-pciback: 0000:06:00.0: inside permissive mode - write request 4 bytes at 0x8 = ff000000 [ 1466.964895 < 0.000023>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0xc = 4000 [ 1466.964897 < 0.000002>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xc [ 1466.964907 < 0.000010>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xc = 0 [ 1466.964914 < 0.000007>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xf [ 1466.964925 < 0.000011>] xen-pciback: 0000:06:00.0: read 1 bytes at 0xf = 0 [ 1466.964947 < 0.000022>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x10 = f7a00000 [ 1466.964948 < 0.000001>] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 [ 1466.964955 < 0.000007>] xen-pciback: 0000:06:00.0: read 4 bytes at 0x10 = f7a00000 [ 1466.964972 < 0.000017>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x14 = 0 [ 1466.964973 < 0.000001>] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 [ 1466.964980 < 0.000007>] xen-pciback: 0000:06:00.0: read 4 bytes at 0x14 = 0 [ 1466.964998 < 0.000018>] xen-pciback: 0000:06:00.0: write request 4 bytes at 0x18 = 0 [ 1466.964999 < 0.000001>] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 [ 1466.965006 < 0.000007>] xen-pciback: 0000:06:00.0: read 4 bytes at 0x18 = 0
Quoted 8 lines
Quoted 8 lines
- on the DomU - when I run that "test console" tool, the "lspci -xxx" output is different from before/after
not much, though, only one register(?)diff lspci.before-testconsole lspci.after-testconsole 2c2
< 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00
---
Quoted 8 lines
Quoted 1 line
Quoted 1 line
00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 00 00 00
Okay, that's the Latency Timer field, and I think just like BARs we may need to permit restoring this field. However, please note that the reset being done behind the back of pciback really is the problem here: pciback assumes (for a reason, as you can certainly understand) that it has full control over config space of a passed through device.
I agree that it is very ugly to reset the device behind the back of pciback. However, this is how the vendor decided to do it, and have no better idea how to accomplish this.
While I cannot image that there is, but can you think think of any "correct" way to reset a pci device from
a) inside a DomU
b) from the user space library?
What I cannot do: modify the firmware or the HW of the PCI device (which would be good, because then it could simply do
all memory cleaning etc. w/o affecting its PCI config known to the host)
What I can do: rewrite all parts of the driver (uio_netx) and user space library.
Quoted 8 lines
And actually the latency timer would, as a side effect of enabling bus mastering on the device (via the
pci_set_master()call fromcommand_write()) set the Latency Timer field properly, just that again pciback (and the rest of Dom0's PCI subsystem) thinks that bus mastering is already enabled on the device. So perhaps in permissive mode we should simply allow the latency timer field to be written, just like we allow writing various of the Command Register bits in that mode. Maintainers, what do you think?
(is that something that /sys/bus/pci/drivers/pciback/quirks could help with? according to docs, this is only used/in effect when in permissive mode)
Quoted 5 lines
If we decide to go that route, I would then wonder whether Cache Line Size being unconditionally writable right now would also better be restricted to permissive mode.
In any event, Jürgen, it would be helpful if you could confirm
If I understood you correctly, I modify xen_pcibk_config_write in "drivers/xen/xen-pciback/conf_space.c" to specifically allow only this field (latency timer) to be written and log everything.
Will do and report back!
Thanks for your time!!!
Jürgen
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 06.06.16 at 11:09, <[email protected]> wrote:
[ 1466.964895 < 0.000023>] xen-pciback: 0000:06:00.0: write request 4
bytes at0xc= 4000
[ 1466.964897 < 0.000002>] xen-pciback: 0000:06:00.0: read 1 bytes at0xc
[ 1466.964907 < 0.000010>] xen-pciback: 0000:06:00.0: read 1 bytes at0xc= 0
[ 1466.964914 < 0.000007>] xen-pciback: 0000:06:00.0: read 1 bytes at0xf
[ 1466.964925 < 0.000011>] xen-pciback: 0000:06:00.0: read 1 bytes at0xf= 0
No read of 0xd and 0xe?
Quoted 9 lines
I agree that it is very ugly to reset the device behind the back of pciback.
However, this is how the vendor decided to do it, and have no better idea how
to accomplish this.
While I cannot image that there is, but can you think think of any "correct" way to reset a pci device from
a) inside a DomU
b) from the user space library?
No, resetting a device shouldn't be needed at all _after_ assignment to a guest. Do you have any insight why that's needed here in the first place?
Quoted 11 lines
Quoted 8 lines
And actually the latency timer would, as a side effect of enabling bus mastering on the device (via the
pci_set_master()call fromcommand_write()) set the Latency Timer field properly, just that again pciback (and the rest of Dom0's PCI subsystem) thinks that bus mastering is already enabled on the device. So perhaps in permissive mode we should simply allow the latency timer field to be written, just like we allow writing various of the Command Register bits in that mode. Maintainers, what do you think?(is that something that
/sys/bus/pci/drivers/pciback/quirkscould help with? according to docs, this is only used/in effect when in permissive mode)
I don't think so - quirks can, afaict, only be registered for fields that don't have explicit handling associated to them (see the xen_pcibk_field_is_dup() call in xen_pcibk_config_add_field_offset()).
Quoted 8 lines
Quoted 5 lines
If we decide to go that route, I would then wonder whether Cache Line Size being unconditionally writable right now would also better be restricted to permissive mode.
In any event, Jürgen, it would be helpful if you could confirm
If I understood you correctly, I modify
xen_pcibk_config_writein "drivers/xen/xen-pciback/conf_space.c" to specifically allow only this field (latency timer) to be written and log everything.
Right - just limit your existing workaround to just this one field.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 17 lines · Jan Beulich
Quoted 10 lines
- on the DomU - when I run that "test console" tool, the "lspci -xxx" output is different from before/after
not much, though, only one register(?)diff lspci.before-testconsole lspci.after-testconsole 2c2
< 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00
---Quoted 1 line
00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 00 00 00
Okay, that's the Latency Timer field, and I think just like BARs we may need to permit restoring this field. However, please note that the reset being done behind the back of pciback really is the problem here: pciback assumes (for a reason, as you can certainly understand) that it has full control over config space of a passed through device.
Quoted 8 lines
And actually the latency timer would, as a side effect of enabling bus mastering on the device (via the
pci_set_master()call fromcommand_write()) set the Latency Timer field properly, just that again pciback (and the rest of Dom0's PCI subsystem) thinks that bus mastering is already enabled on the device. So perhaps in permissive mode we should simply allow the latency timer field to be written, just like we allow writing various of the Command Register bits in that mode. Maintainers, what do you think?
Don't we currently allow it to be written unconditionally? It is no different from accessing Cache Line Size.
Or are you suggesting to make it stricter?
Quoted 4 lines
If we decide to go that route, I would then wonder whether Cache Line Size being unconditionally writable right now would also better be restricted to permissive mode.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 28 lines
Quoted 1 line
Quoted 1 line · On 06.06.16 at 16:01, <[email protected]> wrote:
Quoted 17 lines · Jan Beulich
Quoted 10 lines
- on the DomU - when I run that "test console" tool, the "lspci -xxx" output is different from before/after
not much, though, only one register(?)diff lspci.before-testconsole lspci.after-testconsole 2c2
< 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00
---Quoted 1 line
00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 00 00 00
Okay, that's the Latency Timer field, and I think just like BARs we may need to permit restoring this field. However, please note that the reset being done behind the back of pciback really is the problem here: pciback assumes (for a reason, as you can certainly understand) that it has full control over config space of a passed through device.
Quoted 8 lines
And actually the latency timer would, as a side effect of enabling bus mastering on the device (via the
pci_set_master()call fromcommand_write()) set the Latency Timer field properly, just that again pciback (and the rest of Dom0's PCI subsystem) thinks that bus mastering is already enabled on the device. So perhaps in permissive mode we should simply allow the latency timer field to be written, just like we allow writing various of the Command Register bits in that mode. Maintainers, what do you think?
Quoted 2 lines
Don't we currently allow it to be written unconditionally? It is no different from accessing Cache Line Size.
No, we don't. And no, someone must have thought differently. This is what we have right now:
{
/* Any side effects of letting driver domain control cache line? */
.offset = PCI_CACHE_LINE_SIZE,
.size = 1,
.u.b.read = xen_pcibk_read_config_byte,
.u.b.write = xen_pcibk_write_config_byte,
},
{
.offset = PCI_LATENCY_TIMER,
.size = 1,
.u.b.read = xen_pcibk_read_config_byte,
},I.e. whoever wrote this originally thought that writes to Latency Timer should be suppressed altogether, and there may be reasons to also suppress writes to Cache Line Size.
Quoted 1 line
Or are you suggesting to make it stricter?
Well, following the comment I indeed thought about making the Cache Line Size one more strict. Latency Timer can't possibly be made more strict (unless we also wanted to disallow reads). And it is, iirc, irrelevant for PCIe anyway, so allowing writes there might be an option, but as they ought to have no effect, it would seem kind of pointless.
In general I think we should be rather conservative with allowing writes to any register.
Jan
Quoted 6 lines
Quoted 3 lines
If we decide to go that route, I would then wonder whether Cache Line Size being unconditionally writable right now would also better be restricted to permissive mode.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 44 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · On 06.06.16 at 16:01, <[email protected]> wrote:
Quoted 16 lines · Jan Beulich
Quoted 9 lines
- on the DomU - when I run that "test console" tool, the "lspci -xxx" output is different from before/after
not much, though, only one register(?)diff lspci.before-testconsole lspci.after-testconsole 2c2
< 00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 40 00 00
---Quoted 1 line
00: cf 15 00 00 02 01 00 02 00 00 00 ff 00 00 00 00
Okay, that's the Latency Timer field, and I think just like BARs we may need to permit restoring this field. However, please note that the reset being done behind the back of pciback really is the problem here: pciback assumes (for a reason, as you can certainly understand) that it has full control over config space of a passed through device.
Quoted 8 lines
And actually the latency timer would, as a side effect of enabling bus mastering on the device (via the
pci_set_master()call fromcommand_write()) set the Latency Timer field properly, just that again pciback (and the rest of Dom0's PCI subsystem) thinks that bus mastering is already enabled on the device. So perhaps in permissive mode we should simply allow the latency timer field to be written, just like we allow writing various of the Command Register bits in that mode. Maintainers, what do you think?Quoted 2 lines
Don't we currently allow it to be written unconditionally? It is no different from accessing Cache Line Size.
No, we don't. And no, someone must have thought differently. This is what we have right now:
{ /* Any side effects of letting driver domain control cache line? */ .offset = PCI_CACHE_LINE_SIZE, .size = 1, .u.b.read = xen_pcibk_read_config_byte, .u.b.write = xen_pcibk_write_config_byte, }, { .offset = PCI_LATENCY_TIMER, .size = 1, .u.b.read = xen_pcibk_read_config_byte, },
Quoted 8 lines
I.e. whoever wrote this originally thought that writes to Latency Timer should be suppressed altogether, and there may be reasons to also suppress writes to Cache Line Size.
Quoted 1 line
Or are you suggesting to make it stricter?
Well, following the comment I indeed thought about making the Cache Line Size one more strict. Latency Timer can't possibly be made more strict (unless we also wanted to disallow reads).
Oh, yes, I completely mis-read the chunk that you quoted above. Didn't notice that timer doesn't have a write op.
Quoted 7 lines
And
it is, iirc, irrelevant for PCIe anyway, so allowing writes there might be an option, but as they ought to have no effect, it would seem kind of pointless.In general I think we should be rather conservative with allowing writes to any register.
Yes.
-boris
Quoted 10 lines
Jan
Quoted 5 lines
Quoted 3 lines
If we decide to go that route, I would then wonder whether Cache Line Size being unconditionally writable right now would also better be restricted to permissive mode.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel