Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6484254yba; Tue, 14 May 2019 08:18:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy8iHh5Nl+7OIVz2B4EKR0p6cDtX3kCQXrkBvB1/c6wKo2jBjOMC/G6II5dv0go1XEe1Q5 X-Received: by 2002:a17:902:1cb:: with SMTP id b69mr11836998plb.158.1557847109234; Tue, 14 May 2019 08:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557847109; cv=none; d=google.com; s=arc-20160816; b=x6DI7S5iXNrxj8vaT+EaRHy90oaNaQZoUkhjBoBNgLd1DWmWZNyvomV1dzxEivztGX hMM1Gzpenhfrh+iihktz+v4hrsLXFfHW+RN0xILf3ROYST1rltTnxaFT8wP1oy2nECnR TDir8my1hkoc1jlLPaD2S2ktA5XqoJLoK5pB1ll+Y6xmFt/alLs6DsWOr4vmaGzXZAhq xJf0+Wc18aFlMrLsqGyAy3h47NMtTeCamKcAk6NS5JzGgh7WzU3v5qDLAZ3AVk1ZRGmk jPB2/vXQv0Cs4JIyApeRrwR+++48dMEXYR7/fXfvEod2pCezgVkFGlsx7zrEEMFdQACx TIdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=52wCeBOwauHSQlDrGetPA9MN4QQCshjnt1eWacd/EZk=; b=rMJCN/5tMvL/XBqRoFkoP7RhuDbLFIAqjV9kO60VNHVMd347HUMlPLxDeIwA51xyuP QyxQOXRkq7K3Dr/3fEywetS3X916Es1l9LOwRltGxnK0SzQploiMj8P2Vrf45MUp1IJD yO8fztxJBkt707UzrvtG9e4ZE5la248/dkNNG1kmYBVTfZ7WVo7EoLdlLRKckfDCskDX XnozCKCUm+yGefWwLzF1RTm1bRPY6iDZQpOiT7dLhpsME0JExnklkAYyjy1xSZ1mVnL9 1yXiRHP/puIZcTxM8gibDwM7gqt6g9yI6mQe8RBhyZA8XlGnUUbjvGYALSxZGFo7PCof g2lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=r1W6ukYY; 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 l7si21906508pgh.79.2019.05.14.08.18.12; Tue, 14 May 2019 08:18:29 -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=r1W6ukYY; 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 S1726449AbfENPQ5 (ORCPT + 99 others); Tue, 14 May 2019 11:16:57 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:4725 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfENPQ4 (ORCPT ); Tue, 14 May 2019 11:16:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1557847016; x=1589383016; h=from:to:subject:date:message-id:in-reply-to:references; bh=52wCeBOwauHSQlDrGetPA9MN4QQCshjnt1eWacd/EZk=; b=r1W6ukYYLs0xIUS53B2N35NqaGhy9z+doxVSEYL13cuPRIvjTHfLm/KK 96+FBt6iuk7LGIieFSnLgWYmBYTUOot1zcTRAR8UI07qDxl7aVihNME9C 8e3acta5Y4VxptSSk/5bHqAHNHERVyZhW6NtkvLnesHQ172xZ1SVzDDwD o=; X-IronPort-AV: E=Sophos;i="5.60,469,1549929600"; d="scan'208";a="674278996" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2b-4ff6265a.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 May 2019 15:16:50 +0000 Received: from uf8b156e456a5587c9af4.ant.amazon.com (pdx2-ws-svc-lb17-vlan2.amazon.com [10.247.140.66]) by email-inbound-relay-2b-4ff6265a.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id x4EFGmBv009206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 May 2019 15:16:49 GMT Received: from uf8b156e456a5587c9af4.ant.amazon.com (localhost [127.0.0.1]) by uf8b156e456a5587c9af4.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id x4EFGl86027925; Tue, 14 May 2019 17:16:47 +0200 Received: (from sironi@localhost) by uf8b156e456a5587c9af4.ant.amazon.com (8.15.2/8.15.2/Submit) id x4EFGkaB027921; Tue, 14 May 2019 17:16:46 +0200 From: Filippo Sironi To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, borntraeger@de.ibm.com, boris.ostrovsky@oracle.com, cohuck@redhat.com, konrad.wilk@oracle.com, xen-devel@lists.xenproject.org, vasu.srinivasan@oracle.com Subject: KVM: Start populating /sys/hypervisor with KVM entries Date: Tue, 14 May 2019 17:16:40 +0200 Message-Id: <1557847002-23519-1-git-send-email-sironi@amazon.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539078879-4372-1-git-send-email-sironi@amazon.de> References: <1539078879-4372-1-git-send-email-sironi@amazon.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Long-time Xen HVM and Xen PV users are missing /sys/hypervisor entries when moving to KVM. One report is about getting the VM UUID. The VM UUID can already be retrieved using /sys/devices/virtual/dmi/id/product_uuid. This has two downsides: (1) it requires root privileges and (2) it is only available on KVM and Xen HVM. By exposing /sys/hypervisor/uuid when running on KVM as well, we provide an interface that's functional for KVM, Xen HVM, and Xen PV. Let's do so by providing arch-specific hooks so that different architectures can implement the hooks in different ways. Further work can be done by consolidating the creation of the basic /sys/hypervisor across hypervisors. Filippo Sironi (2): KVM: Start populating /sys/hypervisor with KVM entries KVM: x86: Implement the arch-specific hook to report the VM UUID