qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH] Correctly assign PCI domain numb


From: Isaku Yamahata
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] Correctly assign PCI domain numbers
Date: Mon, 1 Aug 2011 17:31:06 +0900
User-agent: Mutt/1.5.19 (2009-01-05)

[Added mst to Cc.]

In order to use multi PCI domain, several areas need to be addressed
in addition to this patch. For example, bios, acpi dsdt.
Do you have any plan for addressing those area?
What's your motivation for multi pci domain?
NOTE: I'm not opposing to this patch. Just curious for your motivation/plan.

On Mon, Aug 01, 2011 at 04:51:02PM +1000, David Gibson wrote:
> qemu already almost supports PCI domains; that is, several entirely
> independent PCI host bridges on the same machine.  However, a bug in
> pci_bus_new_inplace() means that every host bridge gets assigned domain
> number zero and so can't be properly distinguished.  This patch fixes the
> bug, giving each new host bridge a new domain number.
> 
> Signed-off-by: David Gibson <address@hidden>
> ---
>  hw/pci.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/pci.c b/hw/pci.c
> index 36db58b..2b4aecb 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -262,6 +262,8 @@ int pci_find_domain(const PCIBus *bus)
>      return -1;
>  }
>  
> +static int pci_next_domain; /* = 0 */
> +
>  void pci_bus_new_inplace(PCIBus *bus, DeviceState *parent,
>                           const char *name,
>                           MemoryRegion *address_space,
> @@ -274,7 +276,8 @@ void pci_bus_new_inplace(PCIBus *bus, DeviceState *parent,
>  
>      /* host bridge */
>      QLIST_INIT(&bus->child);
> -    pci_host_bus_register(0, bus); /* for now only pci domain 0 is supported 
> */
> +
> +    pci_host_bus_register(pci_next_domain++, bus);
>  
>      vmstate_register(NULL, -1, &vmstate_pcibus, bus);
>  }
> -- 
> 1.7.5.4
> 
> 

-- 
yamahata



reply via email to

[Prev in Thread] Current Thread [Next in Thread]