[libvirt] [PATCH 5/6] Set the default machine as pseries for PPC64

Daniel P. Berrange berrange at redhat.com
Thu Dec 20 10:31:04 UTC 2012


On Thu, Dec 20, 2012 at 02:02:26PM +0800, Li Zhang wrote:
> From: Li Zhang <zhlcindy at linux.vnet.ibm.com>
> 
> pseries machine type is preferred for ppc64.
> This patch is to set pseries as the default machine type.
> 
> Signed-off-by: Li Zhang <zhlcindy at linux.vnet.ibm.com>
> ---
>  src/conf/capabilities.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
> index 7cdb5b7..ba03a84 100644
> --- a/src/conf/capabilities.c
> +++ b/src/conf/capabilities.c
> @@ -624,6 +624,12 @@ virCapabilitiesDefaultGuestMachine(virCapsPtr caps,
>              guest->arch.id != arch)
>              continue;
>  
> +        for (j = 0; j < guest->arch.defaultInfo.nmachines; j ++) {
> +            if (arch == VIR_ARCH_PPC64 &&
> +                STREQ(guest->arch.defaultInfo.machines[j]->name, "pseries"))
> +                return guest->arch.defaultInfo.machines[j]->name;
> +        }
> +
>          for (j = 0; j < guest->arch.ndomains; j++) {
>              virCapsGuestDomainPtr dom = guest->arch.domains[j];
>  

NACK, libvirt queries QEMU to determine the default machine type:

$ qemu-system-ppc64 -M '?'
Supported machines are:
none                 empty machine
ref405ep             ref405ep
taihu                taihu
bamboo               bamboo
mac99                Mac99 based PowerMAC (default)
                                          ^^^^^^^^^
g3beige              Heathrow based PowerMAC
prep                 PowerPC PREP platform
pseries              pSeries Logical Partition (PAPR compliant)
virtex-ml507         Xilinx Virtex ML507 reference design
ppce500              generic paravirt e500 platform
mpc8544ds            mpc8544ds


So if you want to change the default, then you should modify QEMU
upstream

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list