Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp877298yba; Thu, 16 May 2019 10:16:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvxjf6jQhS7wyg1NRPfP7SJ0zIgl23RcZjHKh0O5DaV9wqEgZZO3ehFPS0y7VjquVTs6GQ X-Received: by 2002:a62:5f02:: with SMTP id t2mr15271382pfb.7.1558027008145; Thu, 16 May 2019 10:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558027008; cv=none; d=google.com; s=arc-20160816; b=ppRCrHcJqMAybZG1Bni3quustuWEBfKwuKIBeUG5E6fTYsmDju9K3jo70MbelPKkoE CopU7962nnsRuwV0YB+wE3b8Yq5S9wuLRFuSs/5TTHGAM56YkPtPFov/whHLV8svsXxV 2EyJHnX77yl8Aq1mrfNB7og4XMiCMvhe8HG1kZpnlrt4MwqSegQRQAXOdz2eWfwg7H0T /G/zocDEAfCXCoRH6L7O+Z+NkbGlimCO4B5fw99+3IDjfdOJsyHZeIDXyvQ61G9ZIVaH 7v+DIZECj1ERKEXa9x1vOgXEJ8gzZKeWi9axhF432eMzzctQviKrwanOOIP4iGURinI8 3FPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=kUZ9rEq+loBEpuV/agF7lMwxuKWMwuSBBWGCLZkR43o=; b=U2TTfMdeehpav8qAHSPfkkDk6YK9cLry10nkCPt5b38fkPYtF7RLc/WUgJUZTdBbKI oylT7+91Ia8OedUzxx4UJQKIWNtDhNXEsS4doH9I4m+Op33CfUPdVbU+ejz5Wb1VEH6m O6aSvVuYMhX3u8lfxVYtqXP+htQ3dMMJXXr7AbM2U/5CvX3yzl9aR3zDpTyhIhwNNhLx FWLYpXENqtY8JwNNAnoh7gm3RIwcckAZrWS5fnl26PT/rJiXa0M43lMeZ+Q1a/edkURn VM8GkBk4auegBJH60UHriSgSTJZNRkmFz2YOpdSTm/b1QQcT9crPRaXwury4wXzh5Rq5 SArQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b="gj0/FSOv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si5230317plr.321.2019.05.16.10.16.31; Thu, 16 May 2019 10:16:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b="gj0/FSOv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727584AbfEPPZH (ORCPT + 99 others); Thu, 16 May 2019 11:25:07 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:25987 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbfEPPZH (ORCPT ); Thu, 16 May 2019 11:25:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1558020306; x=1589556306; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:mime-version: content-transfer-encoding; bh=kUZ9rEq+loBEpuV/agF7lMwxuKWMwuSBBWGCLZkR43o=; b=gj0/FSOvM4dQoxmEbvnqIs8YNp1mgLWUaf3Vp92IlAIsZ6DjphFkww0s JEUFn/d5bhbxCp0y/SW7k89wFTjNgywB/rU/oKeoAFdLatmU5PgZEBgkv /VinmJlon51HeH1HGBZoqVTLlqxBzNpQ7GUK23WhqWwveNz/a81QxxPpP g=; X-IronPort-AV: E=Sophos;i="5.60,477,1549929600"; d="scan'208";a="733383237" Received: from iad6-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2b-3714e498.us-west-2.amazon.com) ([10.124.125.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 May 2019 15:25:03 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2b-3714e498.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id x4GFOu5J042984 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 16 May 2019 15:25:02 GMT Received: from EX13D02EUC002.ant.amazon.com (10.43.164.14) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 16 May 2019 15:25:01 +0000 Received: from EX13D02EUC001.ant.amazon.com (10.43.164.92) by EX13D02EUC002.ant.amazon.com (10.43.164.14) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 16 May 2019 15:25:00 +0000 Received: from EX13D02EUC001.ant.amazon.com ([10.43.164.92]) by EX13D02EUC001.ant.amazon.com ([10.43.164.92]) with mapi id 15.00.1367.000; Thu, 16 May 2019 15:25:00 +0000 From: "Sironi, Filippo" To: "Graf, Alexander" CC: LKML , KVM list , Christian Borntraeger , Boris Ostrovsky , "cohuck@redhat.com" , "konrad.wilk@oracle.com" , "xen-devel@lists.xenproject.org" , "vasu.srinivasan@oracle.com" Subject: Re: [PATCH v2 2/2] KVM: x86: Implement the arch-specific hook to report the VM UUID Thread-Topic: [PATCH v2 2/2] KVM: x86: Implement the arch-specific hook to report the VM UUID Thread-Index: AQHVCmgxSNZRVPU/lkacpReSlg9JAaZtyWCAgAAY24A= Date: Thu, 16 May 2019 15:25:00 +0000 Message-ID: <7395EFE9-0B38-4B61-81D4-E8450561AABE@amazon.de> References: <1539078879-4372-1-git-send-email-sironi@amazon.de> <1557847002-23519-1-git-send-email-sironi@amazon.de> <1557847002-23519-3-git-send-email-sironi@amazon.de> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.166.108] Content-Type: text/plain; charset="us-ascii" Content-ID: <322B72780715F949BC86D7AC0C1B0C37@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 16. May 2019, at 15:56, Graf, Alexander wrote: > = > On 14.05.19 08:16, Filippo Sironi wrote: >> On x86, we report the UUID in DMI System Information (i.e., DMI Type 1) >> as VM UUID. >> = >> Signed-off-by: Filippo Sironi >> --- >> arch/x86/kernel/kvm.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> = >> diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c >> index 5c93a65ee1e5..441cab08a09d 100644 >> --- a/arch/x86/kernel/kvm.c >> +++ b/arch/x86/kernel/kvm.c >> @@ -25,6 +25,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -694,6 +695,12 @@ bool kvm_para_available(void) >> } >> EXPORT_SYMBOL_GPL(kvm_para_available); >> = >> +const char *kvm_para_get_uuid(void) >> +{ >> + return dmi_get_system_info(DMI_PRODUCT_UUID); > = > This adds a new dependency on CONFIG_DMI. Probably best to guard it with > an #if IS_ENABLED(CONFIG_DMI). > = > The concept seems sound though. > = > Alex include/linux/dmi.h contains a dummy implementation of dmi_get_system_info that returns NULL if CONFIG_DMI isn't defined. This is enough unless we decide to return "" like in Xen. If then, we can have the check in the generic code to turn NULL into "". Filippo >> +} >> +EXPORT_SYMBOL_GPL(kvm_para_get_uuid); >> + >> unsigned int kvm_arch_para_features(void) >> { >> return cpuid_eax(kvm_cpuid_base() | KVM_CPUID_FEATURES); Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich Ust-ID: DE 289 237 879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B