From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH] treewide: replace qemu_hw_version() with QEMU_HW_VERSION
Date: Wed, 25 Mar 2026 08:00:00 +0100 [thread overview]
Message-ID: <CABgObfZXP1XvFg_SNPJ=dP7gXix3g=ZTq-jnC71WTv+cCusVPA@mail.gmail.com> (raw)
In-Reply-To: <3768bc38-1231-4f62-9ac8-c27e8bb66e7b@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 2101 bytes --]
Il mar 24 mar 2026, 20:18 Philippe Mathieu-Daudé <philmd@linaro.org> ha
scritto:
> On 24/3/26 17:57, Paolo Bonzini wrote:
> > The version is never set on 2.5+ machine types, so qemu_hw_version() and
> > qemu_set_hw_version() are not needed anymore.
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> > include/hw/core/boards.h | 6 ------
> > include/qemu/hw-version.h | 15 ---------------
> > hw/ide/core.c | 2 +-
> > hw/scsi/megasas.c | 2 +-
> > hw/scsi/scsi-bus.c | 2 +-
> > hw/scsi/scsi-disk.c | 2 +-
> > system/vl.c | 4 ----
> > target/s390x/cpu_models.c | 2 +-
> > util/osdep.c | 12 ------------
> > 9 files changed, 5 insertions(+), 42 deletions(-)
>
>
> > diff --git a/include/qemu/hw-version.h b/include/qemu/hw-version.h
> > index 730a8c904d9..a40a6c204a6 100644
> > --- a/include/qemu/hw-version.h
> > +++ b/include/qemu/hw-version.h
> > @@ -7,21 +7,6 @@
> > #ifndef QEMU_HW_VERSION_H
> > #define QEMU_HW_VERSION_H
> >
> > -/*
> > - * Starting on QEMU 2.5, qemu_hw_version() returns "2.5+" by default
> > - * instead of QEMU_VERSION, so setting hw_version on MachineClass
> > - * is no longer mandatory.
> > - *
> > - * Do NOT change this string, or it will break compatibility on all
> > - * machine classes that don't set hw_version.
> > - */
> > #define QEMU_HW_VERSION "2.5+"
>
> Maybe rename as QEMU_HW_VERSION_2_5P if we remove the "do not change
> this string" comment.
>
Maybe, on the other hand *which* version is used as the baseline (2.5+) is
an implementation detail. Even if we added QEMU_HW_VERSION_11_1+ tomorrow,
the baseline would stay the same. The comment is clear.
Paolo
> >
> > -/* QEMU "hardware version" setting. Used to replace code that exposed
> > - * QEMU_VERSION to guests in the past and need to keep compatibility.
> > - * Do not use qemu_hw_version() in new code.
> > - */
> > -void qemu_set_hw_version(const char *);
> > -const char *qemu_hw_version(void);
> > -
> > #endif
>
>
[-- Attachment #2: Type: text/html, Size: 3161 bytes --]
prev parent reply other threads:[~2026-03-25 7:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 16:57 [PATCH] treewide: replace qemu_hw_version() with QEMU_HW_VERSION Paolo Bonzini
2026-03-24 17:02 ` Daniel P. Berrangé
2026-03-24 17:04 ` Peter Maydell
2026-03-24 17:11 ` Paolo Bonzini
2026-03-24 17:13 ` Daniel P. Berrangé
2026-03-24 19:18 ` Philippe Mathieu-Daudé
2026-03-25 7:00 ` Paolo Bonzini [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='CABgObfZXP1XvFg_SNPJ=dP7gXix3g=ZTq-jnC71WTv+cCusVPA@mail.gmail.com' \
--to=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.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