From patchwork Wed Sep 23 14:18:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 54051 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id ACC0922F10 for ; Wed, 23 Sep 2015 14:18:54 +0000 (UTC) Received: by wicmn1 with SMTP id mn1sf25115240wic.1 for ; Wed, 23 Sep 2015 07:18:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=khkdfmZGUstBQtR3CxIyxwZdErf1Ikkbx1RVuxKK69Y=; b=hwFtd6NWRNQHb6AosMg5UXHVm8un4S/eo+0k0dpHLGs26ORb2hGpOYLxVDga3q4CX1 jacGxsLKepEMZbrOXQzPMliTGyZvp3JlFwkTT0ybfWdBg/uwuUFeQaGIDFhe6noOHIe3 TausyqqbdNgu+ECVUXi+H2ej3AfLfFf9DQswF47K+HFntJKAWFSQ0fadoO1iV4c+YUOi 7vJ+pVpI23tbqx0SzvhE95uqMpy6ZQL9K6QT7euoRVI4qocxL9NKaBR81t+jYg/u2OCw qQed/Q8s20pyya+BA508XxB1FVapE6ceiplzfyqsb+Cov2PYILRxKCM3qYOgWA4228ze +aiw== X-Gm-Message-State: ALoCoQmhZCESTZfYNhspsw2QLf/mrseWstw0nGjAht1rECaXrrXBr0gnes5IUDvGr9hSAMyzb8q4 X-Received: by 10.112.26.212 with SMTP id n20mr5369241lbg.2.1443017933936; Wed, 23 Sep 2015 07:18:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.32.207 with SMTP id g198ls95562lfg.18.gmail; Wed, 23 Sep 2015 07:18:53 -0700 (PDT) X-Received: by 10.112.52.168 with SMTP id u8mr11596876lbo.48.1443017933642; Wed, 23 Sep 2015 07:18:53 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id s143si3043080lfe.139.2015.09.23.07.18.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 07:18:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lagj9 with SMTP id j9so52451658lag.2 for ; Wed, 23 Sep 2015 07:18:53 -0700 (PDT) X-Received: by 10.152.5.133 with SMTP id s5mr11630868las.19.1443017933489; Wed, 23 Sep 2015 07:18:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1140349lbq; Wed, 23 Sep 2015 07:18:52 -0700 (PDT) X-Received: by 10.180.90.107 with SMTP id bv11mr4587170wib.69.1443017932652; Wed, 23 Sep 2015 07:18:52 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id jf19si11659958wic.78.2015.09.23.07.18.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Sep 2015 07:18:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:48099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zeksl-0007N3-Mw for patch@linaro.org; Wed, 23 Sep 2015 10:18:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeksK-00075E-EJ for qemu-devel@nongnu.org; Wed, 23 Sep 2015 10:18:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeksH-0001oC-9U for qemu-devel@nongnu.org; Wed, 23 Sep 2015 10:18:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeksH-0001o6-4v for qemu-devel@nongnu.org; Wed, 23 Sep 2015 10:18:21 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 075D0C0B2E05; Wed, 23 Sep 2015 14:18:20 +0000 (UTC) Received: from apm-mustang-ev3-03.lab.eng.brq.redhat.com (apm-mustang-ev3-03.lab.eng.brq.redhat.com [10.34.42.82]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8NEIIS3002378; Wed, 23 Sep 2015 10:18:18 -0400 From: Andrew Jones To: qemu-devel@nongnu.org Date: Wed, 23 Sep 2015 16:18:12 +0200 Message-Id: <1443017892-15567-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: wei@redhat.com, peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: drjones@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 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 Reviewed-by: Wei Huang --- 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,