From patchwork Fri Oct 16 13:57:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 55115 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 8E79322EAC for ; Fri, 16 Oct 2015 14:04:52 +0000 (UTC) Received: by wiyb4 with SMTP id b4sf3004641wiy.2 for ; Fri, 16 Oct 2015 07:04:51 -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:in-reply-to:references: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=5Sx+tGED7ndxPxEAJLDoUHKAZFonEX1lhYs+qG3RSaM=; b=N1My6/bWsot2LofpVwSdwN+2goTJHflOyEPhJ2ctDoCdECttexNtvthOsrlIr7jesf ryZdVoE1EJjYeJX8stZ+afWjDZdBd43QMPANUVVtX891w8mQHJA4IjBL6sTVY9oTA12m ViglCF83lr1VjOMwsWEn5Jzm0TYVeJDexwBS5m/PMC35Vx9EqAXz8QPOFR1IX+k0Z5dY eBpttCTqWqFapsjXU6Q7O46NrgOxD0qA8v6p9cxVpDF6OgUnyZOHAnkKnEinOdJfzxFi bCdnElAg4IQlkgyPDCJyKvzPghfqrWYTCdqROeg5Cr5lpYl76cwuJsuozhabXZOMVlsJ iC6g== X-Gm-Message-State: ALoCoQlM4j2OxhAVL6Y0V7ljqcfGNpSfyamreLAYpxWvqa8WxyC4zolUWVV/Uh6WJJMlIbaIsayE X-Received: by 10.112.209.73 with SMTP id mk9mr3599085lbc.14.1445004291849; Fri, 16 Oct 2015 07:04:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.37.144 with SMTP id l138ls344860lfl.8.gmail; Fri, 16 Oct 2015 07:04:51 -0700 (PDT) X-Received: by 10.25.85.202 with SMTP id j193mr5371576lfb.2.1445004291710; Fri, 16 Oct 2015 07:04:51 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id l18si13009877lfe.132.2015.10.16.07.04.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Oct 2015 07:04:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbes7 with SMTP id es7so11558515lbb.2 for ; Fri, 16 Oct 2015 07:04:51 -0700 (PDT) X-Received: by 10.112.202.35 with SMTP id kf3mr8425057lbc.19.1445004291577; Fri, 16 Oct 2015 07:04:51 -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 w3csp1311631lbq; Fri, 16 Oct 2015 07:04:50 -0700 (PDT) X-Received: by 10.55.19.14 with SMTP id d14mr18520766qkh.54.1445004289654; Fri, 16 Oct 2015 07:04:49 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 15si5973715qgx.123.2015.10.16.07.04.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 16 Oct 2015 07:04:49 -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]:53874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn5cn-0002fB-9q for patch@linaro.org; Fri, 16 Oct 2015 10:04:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn5WP-00021k-3w for qemu-devel@nongnu.org; Fri, 16 Oct 2015 09:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn5WN-0000mx-Up for qemu-devel@nongnu.org; Fri, 16 Oct 2015 09:58:13 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn5WN-0000ht-MV for qemu-devel@nongnu.org; Fri, 16 Oct 2015 09:58:11 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Zn5WJ-0003mC-M8 for qemu-devel@nongnu.org; Fri, 16 Oct 2015 14:58:07 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 16 Oct 2015 14:57:58 +0100 Message-Id: <1445003887-14475-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1445003887-14475-1-git-send-email-peter.maydell@linaro.org> References: <1445003887-14475-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 04/13] 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: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 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 From: Andrew Jones 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 Message-id: 1443017892-15567-1-git-send-email-drjones@redhat.com Signed-off-by: Peter Maydell --- 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 d25d6cf..5ac5178 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -884,12 +884,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,