[libvirt] [PATCH 4/4] Re-arrange PCI device address assignment to match QEMU's default
Eric Blake
eblake at redhat.com
Tue Jul 20 22:17:43 UTC 2010
On 07/20/2010 07:09 AM, Daniel P. Berrange wrote:
> To try and ensure that people upgrading from old QEMU get guests
> with the same PCI device ordering, change the way we assign addrs
> to match QEMU's default order. This should make Windows less
> annoyed.
>
> * src/qemu/qemu_conf.c: Follow QEMU's default PCI ordering
> logic when assigning addresses
> ---
> src/qemu/qemu_conf.c | 124 +++++++++++++++++++++++++++++++-------------------
> 1 files changed, 77 insertions(+), 47 deletions(-)
>
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index ae345fb..5075970 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -2239,7 +2239,33 @@ int qemuDomainPCIAddressSetNextAddr(qemuDomainPCIAddressSetPtr addrs,
> return -1;
> }
>
> -
> +/*
> + * This assigns static PCI slots to all configured devices.
> + * The ordering here is chosen to match the ordering used
> + * with old QEMU < 0.12, so that if a user updates a QEMU
> + * host from old QEMU to QEMU >= 0.12, their guests should
> + * get PCI addresses in the same order as before.
> + *
> + * NB, if they previously hotplugged devices then all bets
> + * are off. Hotplug for old QEMU was unfixably broken wrt
> + * to stable PCI addressing.
> + *
> + * Order is:
> + *
> + * - Host bridge (slot 0)
> + * - PIIX3 ISA bridge, IDE controller, something else unknown, USB controller (slot 1)
> + * - Video (slot 2)
> + *
> + * Incrementally assign slots from 3 onwards:
> + *
> + * - Net
> + * - Sound
> + * - SCSI controllers
> + * - VirtIO block
> + * - VirtIO balloon
> + * - Host device passthrough
> + * - Watchdog
> + */
Thanks for the comment.
> +
> + /* Disks (VirtIO only for nwo */
s/nwo/now)/
ACK with that nit fixed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100720/3d06871d/attachment-0001.sig>
More information about the libvir-list
mailing list