[Qemu-devel] [PATCHv5] Align PCI capabilities in pci_find_space

2012-10-20 Thread Matt Renzelmann
The current implementation of pci_find_space does not correctly align PCI capabilities in the PCI configuration space. It also does not support PCI-Express devices. This patch fixes these issues. Thanks to Alex Williamson for feedback. Signed-off-by: Matt Renzelmann --- Re-sending to add CC

Re: [Qemu-devel] [PATCH v5] Align PCI capabilities in pci_find_space

2012-10-11 Thread Matt Renzelmann
nu.org [mailto:qemu-devel- > bounces+mjr=cs.wisc@nongnu.org] On Behalf Of Matt Renzelmann > Sent: Saturday, September 29, 2012 9:51 AM > To: qemu-devel@nongnu.org > Cc: blauwir...@gmail.com; alex.william...@redhat.com > Subject: [Qemu-devel] [PATCH v5] Align PCI capabilities in pc

[Qemu-devel] [PATCH v5] Align PCI capabilities in pci_find_space

2012-09-29 Thread Matt Renzelmann
The current implementation of pci_find_space does not correctly align PCI capabilities in the PCI configuration space. It also does not support PCI-Express devices. This patch fixes these issues. Thanks to Alex Williamson for feedback. Signed-off-by: Matt Renzelmann --- Braces added. hw

[Qemu-devel] [PATCH v4] Align PCI capabilities in pci_find_space

2012-09-26 Thread Matt Renzelmann
The current implementation of pci_find_space does not correctly align PCI capabilities in the PCI configuration space. It also does not support PCI-Express devices. This patch fixes these issues. Thanks to Alex Williamson for feedback. Signed-off-by: Matt Renzelmann --- This version adds the

Re: [Qemu-devel] [PATCH v3] Align PCI capabilities in pci_find_space

2012-09-26 Thread Matt Renzelmann
> > Mismatched uses of "size" here. We need both the end of the range to > search and the size of the sub-range we're looking for. Maybe start, > end, and size. Thanks, > Ah of course, how's this: static int pci_find_space(PCIDevice *pdev, uint32_t start, uint32_t e

Re: [Qemu-devel] [PATCH v3] Align PCI capabilities in pci_find_space

2012-09-26 Thread Matt Renzelmann
> > static int pci_find_space(PCIDevice *pdev, uint8_t size, bool pcie_space) > > { > > int config_base; > > int config_size; > > int offset = PCI_CONFIG_HEADER_SIZE; > > int i; > > uint32_t *dword_used = &pdev->used[PCI_CONFIG_HEADER_SIZE]; > > This needs to change too. > > I

Re: [Qemu-devel] [PATCH v3] Align PCI capabilities in pci_find_space

2012-09-26 Thread Matt Renzelmann
> > > > hw/pci.c | 28 +--- > > 1 files changed, 21 insertions(+), 7 deletions(-) > > > > diff --git a/hw/pci.c b/hw/pci.c > > index f855cf3..2217dda 100644 > > --- a/hw/pci.c > > +++ b/hw/pci.c > > @@ -1626,16 +1626,30 @@ PCIDevice *pci_create_simple(PCIBus *bus, int dev