Re: [PATCH 07/14] conf: Add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR

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

 



On Wed, Nov 15, 2017 at 12:50 PM +0100, Andrea Bolognani <abologna@xxxxxxxxxx> wrote:
> We can finally introduce a specific target type for the spapr-vty
> device used by pSeries guests, which means isa-serial will no longer
> show up to confuse users.
>
> We make sure migration works in both directions by interpreting the
> isa-serial target type, or the lack of target type, appropriately
> when parsing the guest XML, and skipping the newly-introduced type
> when formatting if for migration. We also verify that spapr-vty is
> not used for non-pSeries guests and add a bunch of test cases.
>
> This commit is best viewed with 'git diff -w'.
>
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1511421
>
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  docs/formatdomain.html.in                          |  11 +-
>  docs/schemas/domaincommon.rng                      |   1 +
>  src/conf/domain_conf.c                             |   5 +-
>
> +        for (i = 0; i < def->nserials; i++) {
> +            virDomainChrDefPtr serial = def->serials[i];
> +
> +            /* Historically, the native console type for some machine types
> +             * was not set at all, which means it defaulted to ISA even
> +             * though that was not even remotely accurate. To ensure migration
> +             * towards older libvirt versions works for such guests, we switch
> +             * it back to the default here */
> +            if (flags & VIR_DOMAIN_XML_MIGRATABLE) {
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
               This condition is unneeded here as we already checked
               this ~100 lines before.

> +                switch ((virDomainChrSerialTargetType) serial->targetType) {
> +                case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR:
> +                    serial->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE;
> +                    break;

[...snip]

--
Beste Grüße / Kind regards
   Marc Hartmayer

IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux