From: Wei Huang <wei@redhat.com>
To: Andrew Jones <drjones@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm
Date: Wed, 23 Sep 2015 09:50:44 -0500 [thread overview]
Message-ID: <5602BC44.5010200@redhat.com> (raw)
In-Reply-To: <1443017892-15567-1-git-send-email-drjones@redhat.com>
On 9/23/15 09:18, Andrew Jones wrote:
> ARM/AArch64 KVM guests don't have any way to identify
> themselves as KVM guests (x86 guests use a CPUID leaf). Now, we
> could discuss all sorts of reasons why guests shouldn't need to
> know that, but then there's always some case where it'd be
One example is for the subscription manager to check the license type...
> nice... Anyway, now that we have SMBIOS tables in ARM guests,
> it's easy for the guest to know that it's a QEMU instance. This
> patch takes that one step further, also identifying KVM, when
> appropriate. Again, we could debate why generally nothing
> should care whether it's of type QEMU or QEMU/KVM, but again,
> sometimes it's nice to know...
>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
> hw/arm/virt.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 6bf0d6d591d6c..607d448354a8c 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -855,12 +855,17 @@ static void virt_build_smbios(VirtGuestInfo *guest_info)
> FWCfgState *fw_cfg = guest_info->fw_cfg;
> uint8_t *smbios_tables, *smbios_anchor;
> size_t smbios_tables_len, smbios_anchor_len;
> + const char *product = "QEMU Virtual Machine";
>
> if (!fw_cfg) {
> return;
> }
>
> - smbios_set_defaults("QEMU", "QEMU Virtual Machine",
> + if (kvm_enabled()) {
> + product = "KVM Virtual Machine";
> + }
> +
> + smbios_set_defaults("QEMU", product,
> "1.0", false, true, SMBIOS_ENTRY_POINT_30);
>
> smbios_get_tables(NULL, 0, &smbios_tables, &smbios_tables_len,
>
Reviewed-by: Wei Huang <wei@redhat.com>
next prev parent reply other threads:[~2015-09-23 14:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 14:18 [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm Andrew Jones
2015-09-23 14:50 ` Wei Huang [this message]
2015-09-23 15:43 ` Peter Maydell
2015-09-23 16:09 ` Peter Maydell
2015-09-24 10:17 ` Andrew Jones
2015-09-24 10:13 ` Andrew Jones
2015-09-28 15:31 ` Andrew Jones
2015-10-08 18:42 ` Peter Maydell
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=5602BC44.5010200@redhat.com \
--to=wei@redhat.com \
--cc=drjones@redhat.com \
--cc=peter.maydell@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;
as well as URLs for NNTP newsgroup(s).