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

Li Zhang zhlcindy at gmail.com
Fri Dec 21 05:12:26 UTC 2012


On Fri, Dec 21, 2012 at 10:27 AM, Li Zhang <zhlcindy at gmail.com> wrote:

>
> On Thu, Dec 20, 2012 at 6:31 PM, Daniel P. Berrange <berrange at redhat.com>wrote:
>
>> 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
>>
>
> Actually, Libvirt has redefined the default machine in the function
> virCapabilitiesDefaultGuestMachine.
> The default machine will be the last one, mpc8544ds which is not we expect.
>
>
Please ignore my above comment. Upstream is still mac99.
My concern is that it may be a little hard to change it in QEMU.


> Thanks.
>
>
>> 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 :|
>>
>
>
>
> --
>
> Best Regards
> -Li
>



-- 

Best Regards
-Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121221/fa381767/attachment-0001.htm>


More information about the libvir-list mailing list