All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Andrew Jones <drjones@redhat.com>,
	"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>,
	"Ian.Campbell@citrix.com" <Ian.Campbell@citrix.com>,
	"stefano.stabellini@eu.citrix.com"
	<stefano.stabellini@eu.citrix.com>, "tim@xen.org" <tim@xen.org>
Cc: "wei@redhat.com" <wei@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"rjones@redhat.com" <rjones@redhat.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: ARM: KVM/XEN: how should we support virt-what?
Date: Wed, 25 Mar 2015 12:03:58 +0000	[thread overview]
Message-ID: <5512A42E.2070300__40438.6162561879$1427285159$gmane$org@arm.com> (raw)
In-Reply-To: <20150325094440.GB3163@hawk.usersys.redhat.com>

On 25/03/15 09:44, Andrew Jones wrote:
> Hello ARM virt maintainers,
> 
> I'd like to start a discussion about supporting virt-what[1]. virt-what
> allows userspace to determine if the system it's running on is running
> in a guest, and of what type (KVM, Xen, etc.). Despite it being a best
> effort tool, see the Caveat emptor in [1], it has become quite a useful
> tool, and is showing up in different places, such as OpenStack. If you
> look at the code[2], specifically [3], then you'll see how it works on
> x86, which is to use the dedicated hypervisor cpuid leaves. I'm
> wondering what equivalent we have, or can develop, for arm.
> Here are some thoughts;
> 0) there's already something we can use, and I just need to be told
>    about it.
> 1) be as similar as possible to x86 by dedicating some currently
>    undefined sysreg bits. This would take buy-in from lots of parties,
>    so is not likely the way to go.
> 2) create a specific DT node that will get exposed through sysfs, or
>    somewhere.
> 3) same as (2), but just use the nodes currently in mach-virt's DT
>    as the indication we're a guest. This would just be a heuristic,
>    i.e. "have virtio mmio" && psci.method == hvc, or something,
>    and we'd still need a way to know if we're kvm vs. xen vs. ??.

KVM doesn't have any specific DT node so far (at least kvmtool doesn't
expose anything, and QEMU doesn't seem to do it either).

You could define KVM as being !Xen by looking for the Xen hypervisor
node, but that's quite a heuristic.

Overall, I'm quite reluctant to introduce things that would immediately
become an ABI (cue the recent bogomips flame wars), forming a contract
between the host userspace and the guest userspace.

	M.
-- 
Jazz is not dead. It just smells funny...

  parent reply	other threads:[~2015-03-25 12:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  9:44 ARM: KVM/XEN: how should we support virt-what? Andrew Jones
2015-03-25  9:44 ` Andrew Jones
2015-03-25 10:56 ` Paolo Bonzini
2015-03-25 10:56 ` Paolo Bonzini
2015-03-25 10:56   ` Paolo Bonzini
2015-03-25 11:08 ` [Xen-devel] " Ian Campbell
2015-03-25 11:08   ` Ian Campbell
2015-03-25 11:08   ` Ian Campbell
2015-03-25 17:19   ` Stefano Stabellini
2015-03-25 17:19   ` [Xen-devel] " Stefano Stabellini
2015-03-25 17:19     ` Stefano Stabellini
2015-03-25 17:19     ` Stefano Stabellini
2015-03-25 11:08 ` Ian Campbell
2015-03-25 12:03 ` Marc Zyngier [this message]
2015-03-25 12:03 ` Marc Zyngier
2015-03-25 12:03   ` Marc Zyngier
2015-03-26  9:01 ` Andrew Jones
2015-03-26  9:01 ` Andrew Jones
2015-03-26  9:01   ` Andrew Jones
2015-03-26 18:45   ` Stefano Stabellini
2015-03-26 18:45   ` Stefano Stabellini
2015-03-26 18:45     ` Stefano Stabellini
2015-03-26 18:45     ` Stefano Stabellini
2015-03-26 18:49     ` Ard Biesheuvel
2015-03-26 18:49     ` Ard Biesheuvel
2015-03-26 18:49       ` Ard Biesheuvel
2015-03-26 18:50       ` Ard Biesheuvel
2015-03-26 18:50       ` Ard Biesheuvel
2015-03-26 18:50         ` Ard Biesheuvel
2015-03-27 10:25         ` Andrew Jones
2015-03-27 10:25           ` Andrew Jones
2015-03-27 10:25         ` Andrew Jones
2015-03-25  9:44 Andrew Jones

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='5512A42E.2070300__40438.6162561879$1427285159$gmane$org@arm.com' \
    --to=marc.zyngier@arm.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=christoffer.dall@linaro.org \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=rjones@redhat.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=wei@redhat.com \
    --cc=xen-devel@lists.xen.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: link
Be 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.