From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH] KVM: Start populating /sys/hypervisor with KVM entries Date: Tue, 9 Oct 2018 19:50:57 +0200 Message-ID: <20181009195057.2dc8fd7b.cohuck@redhat.com> References: <1539078879-4372-1-git-send-email-sironi@amazon.de> <61740f41-c7e3-edaf-68ac-2e4c4a99523b@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Christian Borntraeger , Filippo Sironi , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, xen-devel , vasu.srinivasan@oracle.com, Konrad Rzeszutek Wilk To: Boris Ostrovsky Return-path: In-Reply-To: <61740f41-c7e3-edaf-68ac-2e4c4a99523b@oracle.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, 9 Oct 2018 12:21:46 -0400 Boris Ostrovsky wrote: > On 10/9/18 6:41 AM, Christian Borntraeger wrote: > > > > > > On 10/09/2018 11:54 AM, Filippo Sironi wrote: > >> Start populating /sys/hypervisor with KVM entries when we're running on > >> KVM. This is to replicate functionality that's available when we're > >> running on Xen. > >> > >> Let's start with /sys/hypervisor/uuid, which users prefer over > >> /sys/devices/virtual/dmi/id/product_uuid as a way to recognize a virtual > >> machine, since it's also available when running on Xen HVM and on Xen PV > >> and, on top of that doesn't require root privileges by default. > > > > Can you make this an arch hook? On s390 it is possible to get the uuid with > > the stsi instruction. > > See > > https://git.kernel.org/pub/scm/virt/kvm/kvm.git/tree/arch/s390/kernel/sysinfo.c#n248 > > > > > > We do use uuid_t, but we can certainly return a char*. > > > I would suggest having a top-level sys-hypervisor.c that will create > common files that all hypervisors should have (uuid, type, version, etc) > and then have hypervisor- and/or arch-specific hooks. I think we really need *both* hypervisor- and arch-specific hooks.