From: "Sironi, Filippo" <sironi@amazon.de> To: "Graf, Alexander" <graf@amazon.com> Cc: LKML <linux-kernel@vger.kernel.org>, KVM list <kvm@vger.kernel.org>, Christian Borntraeger <borntraeger@de.ibm.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, "cohuck@redhat.com" <cohuck@redhat.com>, "konrad.wilk@oracle.com" <konrad.wilk@oracle.com>, "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>, "vasu.srinivasan@oracle.com" <vasu.srinivasan@oracle.com> Subject: Re: [PATCH v2 2/2] KVM: x86: Implement the arch-specific hook to report the VM UUID Date: Thu, 16 May 2019 15:25:00 +0000 [thread overview] Message-ID: <7395EFE9-0B38-4B61-81D4-E8450561AABE@amazon.de> (raw) In-Reply-To: <f51a6a84-b21c-ab75-7e30-bfbe2ac6b98b@amazon.com> > On 16. May 2019, at 15:56, Graf, Alexander <graf@amazon.com> 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 <sironi@amazon.de> >> --- >> 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 <linux/kernel.h> >> #include <linux/kvm_para.h> >> #include <linux/cpu.h> >> +#include <linux/dmi.h> >> #include <linux/mm.h> >> #include <linux/highmem.h> >> #include <linux/hardirq.h> >> @@ -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 "<denied>" like in Xen. If then, we can have the check in the generic code to turn NULL into "<denied>". 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
WARNING: multiple messages have this Message-ID (diff)
From: "Sironi, Filippo" <sironi@amazon.de> To: "Graf, Alexander" <graf@amazon.com> Cc: KVM list <kvm@vger.kernel.org>, "konrad.wilk@oracle.com" <konrad.wilk@oracle.com>, "cohuck@redhat.com" <cohuck@redhat.com>, LKML <linux-kernel@vger.kernel.org>, Christian Borntraeger <borntraeger@de.ibm.com>, "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, "vasu.srinivasan@oracle.com" <vasu.srinivasan@oracle.com> Subject: Re: [Xen-devel] [PATCH v2 2/2] KVM: x86: Implement the arch-specific hook to report the VM UUID Date: Thu, 16 May 2019 15:25:00 +0000 [thread overview] Message-ID: <7395EFE9-0B38-4B61-81D4-E8450561AABE@amazon.de> (raw) In-Reply-To: <f51a6a84-b21c-ab75-7e30-bfbe2ac6b98b@amazon.com> > On 16. May 2019, at 15:56, Graf, Alexander <graf@amazon.com> 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 <sironi@amazon.de> >> --- >> 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 <linux/kernel.h> >> #include <linux/kvm_para.h> >> #include <linux/cpu.h> >> +#include <linux/dmi.h> >> #include <linux/mm.h> >> #include <linux/highmem.h> >> #include <linux/hardirq.h> >> @@ -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 "<denied>" like in Xen. If then, we can have the check in the generic code to turn NULL into "<denied>". 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-05-16 15:25 UTC|newest] Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-09 9:54 [PATCH] KVM: Start populating /sys/hypervisor with KVM entries Filippo Sironi 2018-10-09 10:41 ` Christian Borntraeger 2018-10-09 16:21 ` Boris Ostrovsky 2018-10-09 16:21 ` Boris Ostrovsky 2018-10-09 17:50 ` Cornelia Huck 2018-10-09 17:50 ` Cornelia Huck 2018-10-09 15:00 ` Konrad Rzeszutek Wilk 2018-10-10 5:19 ` kbuild test robot 2019-05-14 15:16 ` Filippo Sironi 2019-05-14 15:16 ` [Xen-devel] " Filippo Sironi 2019-05-14 15:16 ` [PATCH v2 1/2] " Filippo Sironi 2019-05-14 15:16 ` [Xen-devel] " Filippo Sironi 2019-05-14 15:26 ` Christian Borntraeger 2019-05-14 15:26 ` [Xen-devel] " Christian Borntraeger 2019-05-14 16:09 ` Sironi, Filippo 2019-05-14 16:09 ` Sironi, Filippo 2019-05-14 16:09 ` [Xen-devel] " Sironi, Filippo 2019-05-14 16:31 ` Christian Borntraeger 2019-05-14 16:31 ` Christian Borntraeger 2019-05-14 16:31 ` [Xen-devel] " Christian Borntraeger 2019-05-14 22:08 ` Sironi, Filippo 2019-05-14 22:08 ` Sironi, Filippo 2019-05-14 22:08 ` [Xen-devel] " Sironi, Filippo 2019-05-14 15:26 ` Christian Borntraeger 2019-05-16 13:50 ` Alexander Graf 2019-05-16 13:50 ` [Xen-devel] " Alexander Graf 2019-05-16 14:02 ` Andrew Cooper 2019-05-16 14:02 ` Andrew Cooper 2019-05-16 14:02 ` Andrew Cooper 2019-05-16 14:08 ` Alexander Graf 2019-05-16 14:08 ` [Xen-devel] " Alexander Graf 2019-05-16 14:08 ` Alexander Graf 2019-05-16 15:02 ` Boris Ostrovsky 2019-05-16 15:02 ` Boris Ostrovsky 2019-05-16 15:14 ` Sironi, Filippo 2019-05-16 15:14 ` [Xen-devel] " Sironi, Filippo 2019-05-16 15:14 ` Sironi, Filippo 2019-05-16 15:02 ` Boris Ostrovsky 2019-05-17 15:41 ` Sironi, Filippo 2019-05-17 15:41 ` [Xen-devel] " Sironi, Filippo 2019-05-31 9:06 ` Alexander Graf 2019-05-31 9:06 ` [Xen-devel] " Alexander Graf 2019-05-31 9:12 ` Raslan, KarimAllah 2019-05-31 9:12 ` [Xen-devel] " Raslan, KarimAllah 2019-05-31 9:26 ` Alexander Graf 2019-05-31 9:26 ` [Xen-devel] " Alexander Graf 2019-05-31 9:26 ` Alexander Graf 2019-05-31 9:38 ` Marc Zyngier 2019-05-31 9:38 ` [Xen-devel] " Marc Zyngier 2019-05-31 9:38 ` Marc Zyngier 2019-05-31 9:12 ` Raslan, KarimAllah 2019-05-31 9:06 ` Alexander Graf 2019-05-17 15:41 ` Sironi, Filippo 2019-05-16 13:50 ` Alexander Graf 2019-05-14 15:16 ` Filippo Sironi 2019-05-14 15:16 ` [PATCH v2 2/2] KVM: x86: Implement the arch-specific hook to report the VM UUID Filippo Sironi 2019-05-14 15:16 ` [Xen-devel] " Filippo Sironi 2019-05-16 13:56 ` Alexander Graf 2019-05-16 13:56 ` [Xen-devel] " Alexander Graf 2019-05-16 15:25 ` Sironi, Filippo [this message] 2019-05-16 15:25 ` Sironi, Filippo 2019-05-16 15:33 ` Alexander Graf 2019-05-16 15:33 ` [Xen-devel] " Alexander Graf 2019-05-16 16:40 ` Boris Ostrovsky 2019-05-16 16:40 ` [Xen-devel] " Boris Ostrovsky 2019-05-16 17:41 ` Sironi, Filippo 2019-05-16 17:41 ` [Xen-devel] " Sironi, Filippo 2019-05-16 17:49 ` Alexander Graf 2019-05-16 17:49 ` [Xen-devel] " Alexander Graf 2019-05-16 17:49 ` Alexander Graf 2019-05-16 17:41 ` Sironi, Filippo 2019-05-16 16:40 ` Boris Ostrovsky 2019-05-16 15:33 ` Alexander Graf 2019-05-16 15:25 ` Sironi, Filippo 2019-05-16 13:56 ` Alexander Graf 2019-05-14 15:16 ` Filippo Sironi 2019-05-14 15:16 ` KVM: Start populating /sys/hypervisor with KVM entries Filippo Sironi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7395EFE9-0B38-4B61-81D4-E8450561AABE@amazon.de \ --to=sironi@amazon.de \ --cc=boris.ostrovsky@oracle.com \ --cc=borntraeger@de.ibm.com \ --cc=cohuck@redhat.com \ --cc=graf@amazon.com \ --cc=konrad.wilk@oracle.com \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=vasu.srinivasan@oracle.com \ --cc=xen-devel@lists.xenproject.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.