Thread (7 messages) 7 messages, 4 authors, 2021-01-07

RE: [RFC PATCH 1/1] platform-msi: Add platform check for subdevice irq domain

From: "Tian, Kevin" <kevin.tian@intel.com>
Date: 2021-01-07 07:04:07
Also in: kvm, linux-pci, lkml

From: David Woodhouse <dwmw2@infradead.org>
Sent: Thursday, December 10, 2020 4:23 PM

On Thu, 2020-12-10 at 08:46 +0800, Lu Baolu wrote:
quoted
+/*
+ * We want to figure out which context we are running in. But the
hardware
quoted
+ * does not introduce a reliable way (instruction, CPUID leaf, MSR,
whatever)
quoted
+ * which can be manipulated by the VMM to let the OS figure out where it
runs.
quoted
+ * So we go with the below probably_on_bare_metal() function as a
replacement
quoted
+ * for definitely_on_bare_metal() to go forward only for the very simple
reason
quoted
+ * that this is the only option we have.
+ */
+static const char * const possible_vmm_vendor_name[] = {
+       "QEMU", "Bochs", "KVM", "Xen", "VMware", "VMW", "VMware Inc.",
+       "innotek GmbH", "Oracle Corporation", "Parallels", "BHYVE",
+       "Microsoft Corporation"
+};
People do use SeaBIOS ("Bochs") on bare metal.

You'll also see "Amazon EC2" on virt instances as well as bare metal
instances. Although in that case I believe the virt instances do have
the 'virtual machine' flag set in bit 4 of the BIOS Characteristics
Extension Byte 2, and the bare metal obviously don't.
Are those virtual instances having CPUID hypervisor bit set? If yes,
they can be differentiated from bare metal instances w/o checking
the vendor list.

btw do you know whether this 'virtual machine' flag is widely used
in virtualization environments? If yes, we probably should add check
on this flag even before checking DMI_SYS_VENDOR. It sounds more
general...

Thanks
Kevin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help