Hi, On 12/2/19 12:15 PM, Lorenzo Pieralisi wrote: >> Just allocate those bytes to prevent future allocation assigning it to >> devices. > I do not understand what this means; if the kernel reassigns IO BARs > within the IO window kvmtool provides (through DT host controller > bindings - ranges property) this patch should not be needed. > > Furthermore I don't think there should be any dependency in kvmtool > to the Linux PCIBIOS_MIN_IO offset (which happens to be 0x1000 but > kvmtool must not rely on that). > > To sum it up: kvmtool should assign sensible IO ports default values > to BARs (even though that's *not* mandatory) and let the OS reassign > values according to the IO port windows provided through DT bindings > (ie ranges property). > > It is likely there is something I am missing in this patch logic, > apologies for asking but I don't think this patch should be required. This patch was needed because we advertise the PCI node as 'linux,pci-probe-only'. Any ioports below PCIBIOS_MIN_IO that kvmtool allocates are not accessible by a Linux guest. However, once we have support for reassignable BARs, you are indeed correct in saying that this patch will no longer be needed. I'll drop it from the series. Thanks, Alex > > Thanks, > Lorenzo >