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