linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: David Woodhouse <dwmw2@infradead.org>,
	tglx@linutronix.de, ashok.raj@intel.com, kevin.tian@intel.com,
	dave.jiang@intel.com, megha.dey@intel.com
Cc: baolu.lu@linux.intel.com, alex.williamson@redhat.com,
	bhelgaas@google.com, dan.j.williams@intel.com,
	dmaengine@vger.kernel.org, eric.auger@redhat.com,
	jacob.jun.pan@intel.com, jgg@mellanox.com, jing.lin@intel.com,
	kvm@vger.kernel.org, kwankhede@nvidia.com,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	maz@kernel.org, mona.hossain@intel.com, netanelg@mellanox.com,
	parav@mellanox.com, pbonzini@redhat.com, rafael@kernel.org,
	samuel.ortiz@intel.com, sanjay.k.kumar@intel.com,
	shahafs@mellanox.com, tony.luck@intel.com, vkoul@kernel.org,
	yan.y.zhao@linux.intel.com, yi.l.liu@intel.com
Subject: Re: [RFC PATCH 1/1] platform-msi: Add platform check for subdevice irq domain
Date: Wed, 16 Dec 2020 09:42:54 +0800	[thread overview]
Message-ID: <7729a278-1734-5f3e-6183-50670ddb8820@linux.intel.com> (raw)
In-Reply-To: <dad0bf6e271532badd84f2a811449be566f537a9.camel@infradead.org>

Hi David,

On 12/10/20 4:22 PM, David Woodhouse wrote:
> On Thu, 2020-12-10 at 08:46 +0800, Lu Baolu wrote:
>> +/*
>> + * We want to figure out which context we are running in. But the hardware
>> + * does not introduce a reliable way (instruction, CPUID leaf, MSR, whatever)
>> + * which can be manipulated by the VMM to let the OS figure out where it runs.
>> + * So we go with the below probably_on_bare_metal() function as a replacement
>> + * for definitely_on_bare_metal() to go forward only for the very simple reason
>> + * 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.

Is there any unique way to distinguish between running on bare metal and
VM?

> 
> 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.
> 

So for Amazon EC2 case, we can use this byte to distinguish. Can you
please point me to the references of this Extension Byte (reference
code/spec or anything else) ?

Best regards,
baolu

  reply	other threads:[~2020-12-16  1:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  0:46 [RFC PATCH 1/1] platform-msi: Add platform check for subdevice irq domain Lu Baolu
2020-12-10  8:22 ` David Woodhouse
2020-12-16  1:42   ` Lu Baolu [this message]
2021-01-07  7:01   ` Tian, Kevin
2020-12-10 18:57 ` Bjorn Helgaas
2020-12-10 19:15   ` David Woodhouse
2020-12-16  1:48   ` Lu Baolu

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=7729a278-1734-5f3e-6183-50670ddb8820@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=ashok.raj@intel.com \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=eric.auger@redhat.com \
    --cc=jacob.jun.pan@intel.com \
    --cc=jgg@mellanox.com \
    --cc=jing.lin@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=megha.dey@intel.com \
    --cc=mona.hossain@intel.com \
    --cc=netanelg@mellanox.com \
    --cc=parav@mellanox.com \
    --cc=pbonzini@redhat.com \
    --cc=rafael@kernel.org \
    --cc=samuel.ortiz@intel.com \
    --cc=sanjay.k.kumar@intel.com \
    --cc=shahafs@mellanox.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vkoul@kernel.org \
    --cc=yan.y.zhao@linux.intel.com \
    --cc=yi.l.liu@intel.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).