Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-08 Thread Michael S. Tsirkin
On Tue, Apr 08, 2014 at 08:05:23AM +0200, Gerd Hoffmann wrote: > On Mo, 2014-04-07 at 16:34 +0300, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2014 at 02:44:06PM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > +u8 shpc_cap = pci_find_capability(s->bus_dev, > > > > > PCI_CAP_ID_S

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Gerd Hoffmann
On Mo, 2014-04-07 at 16:34 +0300, Michael S. Tsirkin wrote: > On Mon, Apr 07, 2014 at 02:44:06PM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > +u8 shpc_cap = pci_find_capability(s->bus_dev, PCI_CAP_ID_SHPC); > > > > > One thing I'd do is maybe check that the relevant memory type is >

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2014 at 05:16:13PM +0300, Marcel Apfelbaum wrote: > On Mon, 2014-04-07 at 17:09 +0300, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2014 at 04:51:54PM +0300, Marcel Apfelbaum wrote: > [...] > > > > > I don't think we'll need that for the SHPC bridge. > > > > > > > > Why not? > > >

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Marcel Apfelbaum
On Mon, 2014-04-07 at 17:09 +0300, Michael S. Tsirkin wrote: > On Mon, Apr 07, 2014 at 04:51:54PM +0300, Marcel Apfelbaum wrote: [...] > > > > I don't think we'll need that for the SHPC bridge. > > > > > > Why not? > > Because "has shpc" => not an PCIe port. (as far as I know) > > Anyway, why have

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2014 at 04:51:54PM +0300, Marcel Apfelbaum wrote: > On Mon, 2014-04-07 at 16:34 +0300, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2014 at 02:44:06PM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > +u8 shpc_cap = pci_find_capability(s->bus_dev, > > > > > PCI_CAP_

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Marcel Apfelbaum
On Mon, 2014-04-07 at 16:51 +0300, Marcel Apfelbaum wrote: > On Mon, 2014-04-07 at 16:34 +0300, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2014 at 02:44:06PM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > +u8 shpc_cap = pci_find_capability(s->bus_dev, > > > > > PCI_CAP_ID_SHPC

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Marcel Apfelbaum
On Mon, 2014-04-07 at 16:34 +0300, Michael S. Tsirkin wrote: > On Mon, Apr 07, 2014 at 02:44:06PM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > +u8 shpc_cap = pci_find_capability(s->bus_dev, PCI_CAP_ID_SHPC); > > > > > One thing I'd do is maybe check that the relevant memory type is >

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2014 at 02:44:06PM +0200, Gerd Hoffmann wrote: > Hi, > > > > +u8 shpc_cap = pci_find_capability(s->bus_dev, PCI_CAP_ID_SHPC); > > > One thing I'd do is maybe check that the relevant memory type is > > enabled in the bridge (probably just by writing fff to base and readin

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Marcel Apfelbaum
On Mon, 2014-04-07 at 14:44 +0200, Gerd Hoffmann wrote: > Hi, > > > > +u8 shpc_cap = pci_find_capability(s->bus_dev, PCI_CAP_ID_SHPC); > > > One thing I'd do is maybe check that the relevant memory type is > > enabled in the bridge (probably just by writing fff to base and reading > > i

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Gerd Hoffmann
Hi, > > +u8 shpc_cap = pci_find_capability(s->bus_dev, PCI_CAP_ID_SHPC); > One thing I'd do is maybe check that the relevant memory type is > enabled in the bridge (probably just by writing fff to base and reading > it back). > This will give hypervisors an option to avoid wasting reso

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Marcel Apfelbaum
On Mon, 2014-04-07 at 15:11 +0300, Michael S. Tsirkin wrote: > On Mon, Apr 07, 2014 at 02:01:41PM +0200, Gerd Hoffmann wrote: > > On Mo, 2014-04-07 at 13:59 +0300, Marcel Apfelbaum wrote: > > > If a pci-2-pci bridge supports hot-plug functionality but there are no > > > devices > > > connected to

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2014 at 01:59:02PM +0300, Marcel Apfelbaum wrote: > If a pci-2-pci bridge supports hot-plug functionality but there are no devices > connected to it, reserve IO/mem in order to be able to attach devices > later. Do not waste space, use minimum allowed. > > Signed-off-by: Marcel Apf

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2014 at 02:01:41PM +0200, Gerd Hoffmann wrote: > On Mo, 2014-04-07 at 13:59 +0300, Marcel Apfelbaum wrote: > > If a pci-2-pci bridge supports hot-plug functionality but there are no > > devices > > connected to it, reserve IO/mem in order to be able to attach devices > > later. Do

Re: [Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Gerd Hoffmann
On Mo, 2014-04-07 at 13:59 +0300, Marcel Apfelbaum wrote: > If a pci-2-pci bridge supports hot-plug functionality but there are no devices > connected to it, reserve IO/mem in order to be able to attach devices > later. Do not waste space, use minimum allowed. Makes sense. > +u8 shpc_cap

[Qemu-devel] [SeaBIOS] [PATCH] hw/pci: reserve IO and mem for pci-2-pci bridges with no devices attached

2014-04-07 Thread Marcel Apfelbaum
If a pci-2-pci bridge supports hot-plug functionality but there are no devices connected to it, reserve IO/mem in order to be able to attach devices later. Do not waste space, use minimum allowed. Signed-off-by: Marcel Apfelbaum --- src/fw/pciinit.c | 3 +++ src/hw/pci.c | 17 ++