[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: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 14/17] acpi: fix s3/s4 disabled type |
Date: |
Wed, 31 May 2017 13:26:09 +0000 |
On Wed, May 31, 2017 at 5:23 PM Markus Armbruster <address@hidden> wrote:
> 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.
>
Ah crap, I thought 0 and 1 where acceptable bool values, it's not the case..
--
Marc-André Lureau
- Re: [Qemu-devel] [PATCH 11/17] object: use more specific property type names, (continued)
[Qemu-devel] [PATCH 15/17] Use uint property getter/setter where appropriate, Marc-André Lureau, 2017/05/09
[Qemu-devel] [PATCH 16/17] RFC: qdict: add uint, Marc-André Lureau, 2017/05/09
[Qemu-devel] [PATCH 17/17] qobject: move dump_qobject() from block/ to qobject/, Marc-André Lureau, 2017/05/09
Re: [Qemu-devel] [PATCH 00/17] qobject/qapi: add uint type, no-reply, 2017/05/13
Re: [Qemu-devel] [PATCH 00/17] qobject/qapi: add uint type, Markus Armbruster, 2017/05/18