On Thu, Nov 30, 2017 at 02:23:45PM +0800, Peter Xu wrote:
> On Wed, Nov 29, 2017 at 07:46:25PM +1100, David Gibson wrote:
>
> [...]
>
> > struct PCIBus {
> > BusState qbus;
> > +enum PCIBusFlags flags;
> > PCIIOMMUFunc iommu_fn;
> > void *iommu_opaque;
> > uint8_t devfn_m
On Wed, Nov 29, 2017 at 07:46:25PM +1100, David Gibson wrote:
[...]
> struct PCIBus {
> BusState qbus;
> +enum PCIBusFlags flags;
> PCIIOMMUFunc iommu_fn;
> void *iommu_opaque;
> uint8_t devfn_min;
> @@ -440,8 +446,12 @@ struct PCIBus {
> Notifier machine_done;
> };
On 29/11/2017 15:12, David Gibson wrote:
On Wed, Nov 29, 2017 at 12:45:28PM +0200, Marcel Apfelbaum wrote:
On 29/11/2017 10:46, David Gibson wrote:
pci_bus_is_root() currently relies on a method in the PCIBusClass.
But it's always known if a PCI bus is a root bus when we create it, so
using a d
On Wed, Nov 29, 2017 at 12:45:28PM +0200, Marcel Apfelbaum wrote:
> On 29/11/2017 10:46, David Gibson wrote:
> > pci_bus_is_root() currently relies on a method in the PCIBusClass.
> > But it's always known if a PCI bus is a root bus when we create it, so
> > using a dynamic method is overkill.
> >
On 29/11/2017 10:46, David Gibson wrote:
pci_bus_is_root() currently relies on a method in the PCIBusClass.
But it's always known if a PCI bus is a root bus when we create it, so
using a dynamic method is overkill.
This replaces it with an IS_ROOT bit in a new flags field, which is set on
root b
pci_bus_is_root() currently relies on a method in the PCIBusClass.
But it's always known if a PCI bus is a root bus when we create it, so
using a dynamic method is overkill.
This replaces it with an IS_ROOT bit in a new flags field, which is set on
root buses and otherwise clear. As a bonus this