[libvirt] [PATCH 1/6] Add address type for SPAPR VIO devices

Eric Blake eblake at redhat.com
Tue Dec 20 22:35:11 UTC 2011


On 12/12/2011 04:39 PM, Michael Ellerman wrote:
> 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.
> 
> Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
> ---
>  src/conf/domain_conf.c  |   43 ++++++++++++++++++++++++++++++++++++++++++-
>  src/conf/domain_conf.h  |    9 +++++++++
>  src/qemu/qemu_command.c |    5 +++++
>  3 files changed, 56 insertions(+), 1 deletions(-)

ACK and pushed.  Matches what I had already (pre-emptively) documented,
thanks to your doc review of commit fe7fc16.

> @@ -2168,6 +2174,34 @@ cleanup:
>  }
>  
>  static int
> +virDomainDeviceSpaprVioAddressParseXML(xmlNodePtr node,
> +                                      virDomainDeviceSpaprVioAddressPtr addr)
> +{
> +    char *reg;
> +    int ret;
> +
> +    memset(addr, 0, sizeof(*addr));
> +    addr->has_reg = false;

Not strictly necessary - memset already did that.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111220/6bb1f795/attachment-0001.sig>


More information about the libvir-list mailing list