From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Wei Huang <wei@redhat.com>
Cc: peter.maydell@linaro.org, drjones@redhat.com,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH 1/1] mach-virt: Set VM's SMBIOS system version to mc->desc
Date: Thu, 22 Mar 2018 11:07:12 +0000 [thread overview]
Message-ID: <20180322110712.GN3583@redhat.com> (raw)
In-Reply-To: <20180322031216.14569-1-wei@redhat.com>
On Wed, Mar 21, 2018 at 10:12:16PM -0500, Wei Huang wrote:
> Instead of using "1.0" as the system version of SMBIOS, we should use
> mc->desc for mach-virt machine type. With this patch, "dmidecode -t 1"
> (e.g., "-M virt-2.12,accel=kvm") will show:
>
> Handle 0x0100, DMI type 1, 27 bytes
> System Information
> Manufacturer: QEMU
> Product Name: KVM Virtual Machine
> Version: QEMU 2.12 ARM Virtual Machine
> Serial Number: Not Specified
> ...
>
> instead of:
> Handle 0x0100, DMI type 1, 27 bytes
> System Information
> Manufacturer: QEMU
> Product Name: KVM Virtual Machine
> Version: 1.0
> Serial Number: Not Specified
> ...
>
> Signed-off-by: Wei Huang <wei@redhat.com>
> ---
> hw/arm/virt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 2c07245047..da7228b297 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -1132,6 +1132,7 @@ static void *machvirt_dtb(const struct arm_boot_info *binfo, int *fdt_size)
>
> static void virt_build_smbios(VirtMachineState *vms)
> {
> + MachineClass *mc = MACHINE_GET_CLASS(vms);
> uint8_t *smbios_tables, *smbios_anchor;
> size_t smbios_tables_len, smbios_anchor_len;
> const char *product = "QEMU Virtual Machine";
> @@ -1145,7 +1146,7 @@ static void virt_build_smbios(VirtMachineState *vms)
> }
>
> smbios_set_defaults("QEMU", product,
> - "1.0", false, true, SMBIOS_ENTRY_POINT_30);
> + mc->desc, false, true, SMBIOS_ENTRY_POINT_30);
Surely this needs to be handled in back compatible manner so that existing
machine types are not changed - only the new virt-2.12 machine type should
get new format.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-03-22 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 3:12 [Qemu-arm] [PATCH 1/1] mach-virt: Set VM's SMBIOS system version to mc->desc Wei Huang
2018-03-22 8:01 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
2018-03-22 10:53 ` Peter Maydell
2018-03-22 13:47 ` Wei Huang
2018-03-22 11:07 ` Daniel P. Berrangé [this message]
2018-03-22 13:49 ` Andrew Jones
2018-03-22 13:55 ` Daniel P. Berrangé
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=20180322110712.GN3583@redhat.com \
--to=berrange@redhat.com \
--cc=drjones@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=wei@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.