From patchwork Thu Jan 24 03:20:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [6/6] pseries: Adjust default VIO address allocations to play better with libvirt X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 215109 Message-Id: <1358997643-20728-7-git-send-email-david@gibson.dropbear.id.au> To: agraf@suse.de Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Date: Thu, 24 Jan 2013 14:20:43 +1100 From: David Gibson List-Id: Currently, if VIO devices for pseries don't have addresses explicitly allocated, they get automatically numbered from 0x1000. This is in the same general range that libvirt will typically assign VIO device addresses. That means that if there is a device libvirt doesn't know about, and it gets an address assigned before the libvirt assigned devices are processed, we can end up with an address conflict (qemu will abort with an error). While the real solution is to teach libvirt about the other devices, so it can correctly manage the whole allocation, this patch reduces the interim inconvenience by moving qemu allocations to a range that libvirt is less likely to conflict with. Because the guest gets the device addresses through the device tree, these addresses are truly arbitrary and can be changed without breaking guests. Signed-off-by: David Gibson --- hw/spapr_vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c index 2054219..34c9ca6 100644 --- a/hw/spapr_vio.c +++ b/hw/spapr_vio.c @@ -492,7 +492,7 @@ VIOsPAPRBus *spapr_vio_bus_init(void) qbus = qbus_create(TYPE_SPAPR_VIO_BUS, dev, "spapr-vio"); bus = DO_UPCAST(VIOsPAPRBus, bus, qbus); - bus->next_reg = 0x1000; + bus->next_reg = 0x71000000; /* hcall-vio */ spapr_register_hypercall(H_VIO_SIGNAL, h_vio_signal);