From: Cornelia Huck <cohuck@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Blake <eblake@redhat.com>,
peter.maydell@linaro.org,
Michael Roth <mdroth@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>,
Michael Clark <mjc@sifive.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [Qemu-devel] [ANNOUNCE] QEMU 2.12.0-rc4 is now available
Date: Tue, 24 Apr 2018 17:24:48 +0200 [thread overview]
Message-ID: <20180424172448.7bac4f71.cohuck@redhat.com> (raw)
In-Reply-To: <23067740-ed72-25f0-42e3-21b56019525e@redhat.com>
On Tue, 24 Apr 2018 15:56:14 +0200
Laszlo Ersek <lersek@redhat.com> wrote:
> On 04/24/18 15:39, Eric Blake wrote:
> > On 04/24/2018 07:46 AM, Laszlo Ersek wrote:
> >
> >> I just noticed two QAPI bugs introduced in 2.12, in the following two
> >> commits:
> >>
> >> (1) ca230ff33f89 ("qmp: add architecture specific cpu data for
> >> query-cpus-fast", 2018-02-26)
> >>
> >> This commit added @arch to @CpuInfoFast, but it failed to set the new
> >> field to CPU_INFO_ARCH_OTHER in qmp_query_cpus_fast(), when TARGET_S390X
> >> is not defined.
> >
> > We zero-initialize info->value, and info->value->arch == 0 happens to be
> > CPU_INFO_ARCH_X86 which is associated with the empty type CpuInfoOther,
> > which is no different than what we would have had with
> > CPU_INFO_ARCH_OTHER. So the drawback is that on x86 architectures,
> > things look correct; while on sparc, ppc, mips, and tricore (which have
> > a specific type) and on all other platforms (which should use "other"),
> > the output wrongly reports "arch":"x86" but does not crash.
>
> I agree.
As an exercise for the reader: Figure out on which architectures I
tried this out... (Hint: one starts with s and ends with x, while the
other one starts with x.)
>
> >
> >>
> >> (2) 25fa194b7b11 ("RISC-V Build Infrastructure", 2018-03-07)
> >>
> >> This commit added the @riscv enum constant to @CpuInfoArch (used in both
> >> @CpuInfo and @CpuInfoFast -- the return types of the @query-cpus and
> >> @query-cpus-fast commands, respectively), and assigned, in both return
> >> structures, the @CpuInfoRISCV sub-structure to the new enum value.
> >
> > Ouch - we SHOULD have used 'CpuInfoOther' rather than 'CpuInfoRISCV' for
> > @CpuInfoFast. We do NOT want to report the 'pc' field in the fast query.
>
> Right.
>
> >>
> >> However, qmp_query_cpus_fast() does not populate the sub-structure, when
> >> TARGET_RISCV is defined; only qmp_query_cpus() does.
> >
> > Indeed, the output wrongly reports "arch":"x86" instead of
> > "arch":"riscv" - but at least things do not crash.
> >
> >>
> >> The fixes don't look complicated. Do you want to hold the release while
> >> I post the fixes?
> >>
> >> I don't think these bugs are "show stoppers". On the other hand, QAPI is
> >> an external interface.
> >
> > It's too late for the 2.12 release. We'll definitely fix things in
> > 2.12.1 (so cc the patches to qemu-stable),
>
> OK, will do.
>
> > and should document in the
> > release notes that query-cpus-fast is known to report bogus "arch" data
> > for all architectures except x86 and s390, so applications should be
> > careful to not rely on the bogus information.
>
> <https://wiki.qemu.org/ChangeLog/2.12#Known_issues> refers to
> <https://wiki.qemu.org/Planning/2.12>, so I've added the above sentence
> to <https://wiki.qemu.org/Planning/2.12#Issues_that_will_not_be_fixed>.
The wiki updates look good to me.
prev parent reply other threads:[~2018-04-24 15:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 14:56 [Qemu-devel] [ANNOUNCE] QEMU 2.12.0-rc4 is now available Michael Roth
2018-04-24 12:46 ` Laszlo Ersek
2018-04-24 13:39 ` Eric Blake
2018-04-24 13:56 ` Laszlo Ersek
2018-04-24 15:24 ` Cornelia Huck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180424172448.7bac4f71.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=lersek@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mihajlov@linux.vnet.ibm.com \
--cc=mjc@sifive.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).