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

Re: [libvirt] [RFC v3 PATCH 5/5] PowerPC : Add address-type "spapr-vio"



On Wed, 2011-11-30 at 12:44 +0000, Daniel P. Berrange wrote:
> On Tue, Nov 29, 2011 at 08:33:09PM +0530, Prerna Saxena wrote:
> > From: Michael Ellerman <michael ellerman id au>
> > Date: Tue, 29 Nov 2011 13:48:09 +0530
> > Subject: [PATCH 5/5] Add address-type "spapr-vio" for devices based on
> > the same bus.
> > 
> >  For QEMU PPC64 we have a machine type ("pseries") which
> >  has a virtual bus called "spapr-vio". We need to be
> >  able to create devices on this bus, and as such need a
> >  way to specify the address for those devices.
> > 
> > This patch adds a new address type "spapr-vio", which achieves this.
> > 
> > The addressing is specified with a "reg" property in the address
> > definition. The reg is optional, if it is not specified QEMU will
> > auto-assign an address for the device.
> 
> In libvirt, we need to guarantee that addressing is stable across
> QEMU releases. So if the 'reg' property is not set in the XML,
> libvirt must auto-assign one itself before starting QEMU.

Must we really? IMHO if the user doesn't specify anything then that is
essentially asking for "the default", whatever that is.

My reasoning for putting the address assignment code in QEMU in the
first place was that it has the most knowledge and so can make the best
decision.

> You'll notice we have a qemuDomainAssignPCIAddresses() API.
> We will need to have some kind of equivalent for sparpr-vio
> "reg" addresses. Ideally libvirt will auto-assign using the
> same algorithm as QEMU would have, just for sake of sanity.

Yeah I've seen it. I'd rather not do anything similar for spapr-vio,
precisely because we will end up with identical duplicate code in
libvirt & QEMU.

But if it's a hard requirement in your view then I'll do it.

cheers

Attachment: signature.asc
Description: This is a digitally signed message part


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