qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 14/17] acpi: fix s3/s4 disabled type


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 14/17] acpi: fix s3/s4 disabled type
Date: Wed, 31 May 2017 15:23:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> On Thu, May 18, 2017 at 4:58 PM Markus Armbruster <address@hidden> wrote:
>
>> Marc-André Lureau <address@hidden> writes:
>>
>> > Use a more specific bool type.
>> >
>> > Signed-off-by: Marc-André Lureau <address@hidden>
>>
>> Why doesn't this run afoul backward compatibility?  To answer the
>> question, we need to enumerate affected external interfaces.
>>
>>
> Right, this will break if we have users such as:
>
>  -global PIIX4_PM.disable_s3=2
>
> With this change, it will now error with:
>
> qemu-system-x86_64: can't apply global PIIX4_PM.disable_s3=2: Invalid
> parameter type for 'disable_s3', expected: boolean
>
> Acceptable? otherwise, I drop the patch

Quick grep through libvirt... aha, src/qemu_command.c:

    if (def->pm.s3) {
        const char *pm_object = "PIIX4_PM";

        if (qemuDomainIsQ35(def) &&
            virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_DISABLE_S3)) {
            pm_object = "ICH9-LPC";
        } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX_DISABLE_S3)) {
            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                           "%s", _("setting ACPI S3 not supported"));
            return -1;
        }

        virCommandAddArg(cmd, "-global");
        virCommandAddArgFormat(cmd, "%s.disable_s3=%d",
                               pm_object, def->pm.s3 == VIR_TRISTATE_BOOL_NO);
    }

We need to keep at least disable_s3=0 and disable_s3=1 working.  Let's
drop the patch from this series.



reply via email to

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