On Thu, Jul 28, 2011 at 12:31:51PM +0300, Pekka Enberg wrote: > On Thu, Jul 28, 2011 at 12:01 PM, Sasha Levin <levinsasha928@xxxxxxxxx> wrote: > > PCI BAR probing is done in four steps: > > > > 1. Read address (and flags). > > 2. Mask BAR. > > 3. Read BAR again - Now the expected result is the size of the BAR. > > 4. Mask BAR with address. > > > > So far, we have only took care of the first step. This means that the kernel > > was using address as the size, causing a PCI allocation blunder. > > > > This patch fixes the issue by passing a proper size after masking. > > > > Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx> > > --- > > tools/kvm/include/kvm/pci.h | 1 + > > tools/kvm/pci.c | 57 +++++++++++++++++++++++++++++++++++++++---- > > 2 files changed, 53 insertions(+), 5 deletions(-) > > > > diff --git a/tools/kvm/include/kvm/pci.h b/tools/kvm/include/kvm/pci.h > > index 6ad4426..a7532e3 100644 > > --- a/tools/kvm/include/kvm/pci.h > > +++ b/tools/kvm/include/kvm/pci.h > > @@ -51,5 +51,6 @@ struct pci_device_header { > > > > void pci__init(void); > > void pci__register(struct pci_device_header *dev, u8 dev_num); > > +u32 pci_get_io_space_block(void); > > s/pci_get_io_space_block/pci__get_io_space_block/ > Pekka, can we drop this idea with double underscopes? iirc perf is about to drop them too. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html