On Wed, May 29, 2019 at 1:52 AM Bin Meng <bmeng...@gmail.com> wrote: > > The largest pci bus number should be calculated from ECAM size, > instead of its base address. > > Signed-off-by: Bin Meng <bmeng...@gmail.com>
This seems ok, can you maybe explain what this fixes? Alistair > --- > > hw/riscv/virt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c > index fc4c6b3..d6132d9 100644 > --- a/hw/riscv/virt.c > +++ b/hw/riscv/virt.c > @@ -299,7 +299,7 @@ static void *create_fdt(RISCVVirtState *s, const struct > MemmapEntry *memmap, > qemu_fdt_setprop_string(fdt, nodename, "device_type", "pci"); > qemu_fdt_setprop_cell(fdt, nodename, "linux,pci-domain", 0); > qemu_fdt_setprop_cells(fdt, nodename, "bus-range", 0, > - memmap[VIRT_PCIE_ECAM].base / > + memmap[VIRT_PCIE_ECAM].size / > PCIE_MMCFG_SIZE_MIN - 1); > qemu_fdt_setprop(fdt, nodename, "dma-coherent", NULL, 0); > qemu_fdt_setprop_cells(fdt, nodename, "reg", 0, > memmap[VIRT_PCIE_ECAM].base, > -- > 2.7.4 > >