Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Peter Xu
On Thu, Feb 16, 2017 at 10:18:00AM +0800, Cao jin wrote: > Hi peter > > On 02/14/2017 03:51 PM, Peter Xu wrote: > > When we add PCIe extended capabilities, we should be following the rule > > that we add the head extended cap (at offset 0x100) first, then the rest > > of them. Meanwhile, we are al

Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Peter Xu
On Wed, Feb 15, 2017 at 04:25:05PM +0200, Marcel Apfelbaum wrote: > On 02/14/2017 09:51 AM, Peter Xu wrote: > >When we add PCIe extended capabilities, we should be following the rule > >that we add the head extended cap (at offset 0x100) first, then the rest > >of them. Meanwhile, we are always add

Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Cao jin
Hi peter On 02/14/2017 03:51 PM, Peter Xu wrote: > When we add PCIe extended capabilities, we should be following the rule > that we add the head extended cap (at offset 0x100) first, then the rest > of them. Meanwhile, we are always adding new capability bits at the end > of the list. Here the "n

Re: [Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-15 Thread Marcel Apfelbaum
On 02/14/2017 09:51 AM, Peter Xu wrote: When we add PCIe extended capabilities, we should be following the rule that we add the head extended cap (at offset 0x100) first, then the rest of them. Meanwhile, we are always adding new capability bits at the end of the list. Here the "next" looks meani

[Qemu-devel] [PATCH] pcie: simplify pcie_add_capability()

2017-02-13 Thread Peter Xu
When we add PCIe extended capabilities, we should be following the rule that we add the head extended cap (at offset 0x100) first, then the rest of them. Meanwhile, we are always adding new capability bits at the end of the list. Here the "next" looks meaningless in all cases since it should always