Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Peter Xu
On Thu, Feb 16, 2017 at 11:04:46AM +0800, Peter Xu wrote: > On Wed, Feb 15, 2017 at 07:52:35PM -0700, Alex Williamson wrote: > > On Thu, 16 Feb 2017 10:35:28 +0800 > > Peter Xu wrote: > > > > > On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > > > > VFIO actually wants to crea

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Peter Xu
On Wed, Feb 15, 2017 at 07:52:35PM -0700, Alex Williamson wrote: > On Thu, 16 Feb 2017 10:35:28 +0800 > Peter Xu wrote: > > > On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > > > VFIO actually wants to create a capability with ID == 0. > > > This is done to make guest drivers

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Alex Williamson
On Thu, 16 Feb 2017 10:35:28 +0800 Peter Xu wrote: > On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > > VFIO actually wants to create a capability with ID == 0. > > This is done to make guest drivers skip the given capability. > > pcie_add_capability then trips up on this cap

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Peter Xu
On Wed, Feb 15, 2017 at 10:49:47PM +0200, Michael S. Tsirkin wrote: > VFIO actually wants to create a capability with ID == 0. > This is done to make guest drivers skip the given capability. > pcie_add_capability then trips up on this capability > when looking for end of capability list. > > To su

Re: [Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Alex Williamson
On Wed, 15 Feb 2017 22:49:47 +0200 "Michael S. Tsirkin" wrote: > VFIO actually wants to create a capability with ID == 0. > This is done to make guest drivers skip the given capability. > pcie_add_capability then trips up on this capability > when looking for end of capability list. > > To suppo

[Qemu-devel] [PATCH] pci/pcie: don't assume cap id 0 is reserved

2017-02-15 Thread Michael S. Tsirkin
VFIO actually wants to create a capability with ID == 0. This is done to make guest drivers skip the given capability. pcie_add_capability then trips up on this capability when looking for end of capability list. To support this use-case, it's easy enough to switch to e.g. 0x for these com