All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
	"Patch Tracking" <patches@linaro.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	"Alexander Graf" <agraf@suse.de>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [RFC 0/2] target-arm: Provide '-cpu host' when running KVM
Date: Mon, 26 Aug 2013 14:18:32 +0300	[thread overview]
Message-ID: <20130826111832.GC8218@redhat.com> (raw)
In-Reply-To: <CAFEAcA_aU=Kf5TNSvZ220G+7WoFy3Sm=63_N7PKz8fV6N8fRtw@mail.gmail.com>

On Sun, Aug 25, 2013 at 04:11:51PM +0100, Peter Maydell wrote:
> On 25 August 2013 15:42, Gleb Natapov <gleb@redhat.com> wrote:
> > Are ARM cpu features not enumerable and the only way to know what is
> > supported by a core is by its id? I do see feature registers in the
> > spec, so why wouldn't we want to be able to disable/enable features
> > individually?
> 
> It's complicated. There are feature registers which have various
> bits, but only some combinations are architecturally valid. In any
> case a guest might reasonably legitimately assume "this is an A15
> so it will have architected timers", for example, and not bother
> testing feature bits.
That's sad. If feature bit is available I would expect well behaved
guest to test it. BTW is there architectural way to tell OS that it
runs as a guest? There is dedicated CPUID bit on x86 for that which is
obviously never set on real CPUs.

>                       Some feature bits really do have to match the
> real hardware, like ones that say "you need to explicitly flush the
> branch predictor". A lot are feature bits that are simply mandatory
> for any ARMv7 or later processor (which is what you need for KVM
> to work at all).
What if you want to emulate older arm arch for a guest?

>                   And buried in there might possibly be a few features
> that it might actually make sense to enable/disable separately (like
> "do we have Neon?").
> 
> So what we have for now is that the INIT_VCPU ioctl has space
> for feature flags (currently unused in v7; in v8 there's a "make the
> VM be a 32 bit VM on a 64 bit CPU" flag), so we could wire those
> up some day. (We don't have any support in QEMU for saying
> "I want an ARM CPU with features X and Y but not Z" yet either.)
> 
Do we have a way to ask KVM if it can support those features?

--
			Gleb.

  reply	other threads:[~2013-08-26 11:18 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 18:03 [Qemu-devel] [RFC 0/2] target-arm: Provide '-cpu host' when running KVM Peter Maydell
2013-08-13 18:03 ` [Qemu-devel] [RFC 1/2] target-arm: Don't hardcode KVM target CPU to be A15 Peter Maydell
2013-08-13 18:03 ` [Qemu-devel] [RFC 2/2] target-arm: Provide '-cpu host' when running KVM Peter Maydell
2013-08-14  6:32 ` [Qemu-devel] [RFC 0/2] " Alexander Graf
2013-08-14  8:11   ` Marc Zyngier
2013-08-14  8:16     ` Alexander Graf
2013-08-14  8:27       ` Marc Zyngier
2013-08-14  8:46         ` Alexander Graf
2013-08-14  9:07           ` Peter Maydell
2013-08-14  9:11             ` Alexander Graf
2013-08-14  9:23               ` Peter Maydell
2013-08-14  9:30                 ` Alexander Graf
2013-08-14 17:26                   ` Christoffer Dall
2013-08-14 17:31                     ` Alexander Graf
2013-08-14 17:39                       ` Christoffer Dall
2013-08-14 17:44                         ` Alexander Graf
2013-08-14 18:18                           ` Christoffer Dall
2013-08-14 18:21                             ` Alexander Graf
2013-08-14 18:27                               ` Peter Maydell
2013-08-14 19:23                                 ` Alexander Graf
2013-08-14 18:28                               ` Christoffer Dall
2013-08-14 19:28                                 ` Alexander Graf
2013-08-14 20:33                                   ` Christoffer Dall
2013-08-14 20:47                                     ` Alexander Graf
2013-08-14 20:56                                       ` Christoffer Dall
2013-08-14 21:00                                         ` Alexander Graf
2013-08-25 14:42                                   ` Gleb Natapov
2013-08-25 15:11                                     ` Peter Maydell
2013-08-26 11:18                                       ` Gleb Natapov [this message]
2013-08-26 12:17                                         ` Peter Maydell
2013-08-14 18:11                       ` Peter Maydell
2013-08-14 18:15                         ` Alexander Graf
2013-08-14 18:24                           ` Peter Maydell
2013-08-14  9:06   ` Peter Maydell

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=20130826111832.GC8218@redhat.com \
    --to=gleb@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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.