qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH 4/4] pseries: Implement automatic PAPR VIO address


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH 4/4] pseries: Implement automatic PAPR VIO address allocation
Date: Mon, 16 Apr 2012 14:02:23 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Apr 15, 2012 at 07:42:58PM +0200, Andreas Färber wrote:
> Am 04.04.2012 07:02, schrieb David Gibson:
> > PAPR virtual IO (VIO) devices require a unique, but otherwise arbitrary,
> > "address" used as a token to the hypercalls which manipulate them.
> > 
> > Currently the pseries machine code does an ok job of allocating these
> > addresses when the legacy -net nic / -serial and so forth options are used
> > but will fail to allocate them properly when using -device.
> > 
> > Specifically, you can use -device if all addresses are explicitly assigned.
> > Without explicit assignment, only one VIO device of each type (network,
> > console, SCSI) will be assigned properly, any further ones will attempt
> > to take the same address leading to a fatal error.
> > 
> > This patch fixes the situation by adding a proper address allocator to the
> > VIO "bus" code.  This is used both by -device and the legacy options and
> > default devices.  Addresses can still be explicitly assigned with -device
> > options if desired.
> > 
> > This patch changes the (guest visible) numbering of VIO devices, but since
> > their addresses are discovered using the device tree and already differ
> > from the numbering found on existing PowerVM systems, this does not break
> > compatibility.
> > 
> > Signed-off-by: David Gibson <address@hidden>
> > ---
> >  hw/spapr.c       |    7 ++---
> >  hw/spapr_llan.c  |    5 +--
> >  hw/spapr_vio.c   |   74 
> > ++++++++++++++++++++++++++++++++----------------------
> >  hw/spapr_vio.h   |   13 ++++-----
> >  hw/spapr_vscsi.c |    5 +--
> >  hw/spapr_vty.c   |    5 +--
> >  6 files changed, 59 insertions(+), 50 deletions(-)
> 
> Reviewed-by: Andreas Färber <address@hidden>
> 
> Technically this change looks okay but I'd appreciate a second reviewer
> as to what side-effects this change in numbering might have, so I'm
> leaving this one to Alex.

Hm, ok.  As with the interrupt mapping patch, because we communicate
all the addressing information to the guest through the device tree,
the exact numbering really doesn't matter.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson



reply via email to

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