All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty.russell@linaro.org>
To: Alexander Graf <agraf@suse.de>, Rusty Russell <rusty.russell@linaro.org>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [kvmarm] [PATCH] target-arm: kvm: use KVM_SET_SREGS to set target to Cortex A15
Date: Mon, 16 Jul 2012 16:49:43 +0930	[thread overview]
Message-ID: <87pq7wxje8.fsf@rustcorp.com.au> (raw)
In-Reply-To: <D3EF898C-3B9C-4DE6-8FE4-F2AD1718836B@suse.de>

On Fri, 13 Jul 2012 12:06:26 +0200, Alexander Graf <agraf@suse.de> wrote:
> > struct kvm_sregs {
> > +    __u32 target;
> > +    __u32 num_features;
> > +    __u32 features[14];
> > };
> 
> Are you sure you want to use sregs? We did the mistake of reusing it
> on ppc, but that doesn't mean you need to repeat the same one :)
> 
> Basically sregs are an x86 specific struct for its segment register
> information. I'm quite sure that this is not what your use of them is
> here.

Since each arch is given a hook already, I just abused it.  I'll change
this to a fresh KVM_ARM_SET_TARGET ioctl.  

> 3) ENABLE_CAP
> 
> If you only need to enable a feature and care about backwards
> compatibility of the API (which you don't yet), this is a good one. it
> basically allows you to enable new features in newer kernel versions
> which would otherwise break compatibility. You can also pass arbitrary
> data to ENABLE_CAP to pass in additional information.

Hmm, it's not quite a clean fit: this bitmap is for guest features, not
kvm ones.  Which ones you can enable depends on the target CPU, at least
in theory.

eg. FP/NEON support and debug register support are (in theory) optional
features for an implementation.  There may be more in future, I guess.

And you really want to initialize this all at the same time; eg. the cpu
identification registers need to be initialized depending on the
presence of various features.  It's also possible that various features
may be related, so you can't turn a single one off at a time.

Currently, it's a bit theoretical, since we don't have any guest
features, but it was suggested that we'll want them in future.

Cheers,
Rusty.

  reply	other threads:[~2012-07-16  7:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13  3:37 [Qemu-devel] [PATCH] target-arm: kvm: use KVM_SET_SREGS to set target to Cortex A15 Rusty Russell
2012-07-13  3:43 ` [Qemu-devel] [PATCH 2/3] target-arm: kvm: use KVM_GET_MSRS/KVM_SET_MSRS for CP15 registers Rusty Russell
2012-07-13 14:27   ` Blue Swirl
2012-07-13  3:43 ` [Qemu-devel] [PATCH 3/3] target-arm: kvm: remove old kernel support Rusty Russell
2012-07-13  8:06 ` [Qemu-devel] [PATCH] target-arm: kvm: use KVM_SET_SREGS to set target to Cortex A15 Peter Maydell
2012-07-16  7:22   ` Rusty Russell
2012-07-13 10:06 ` [Qemu-devel] [kvmarm] " Alexander Graf
2012-07-16  7:19   ` Rusty Russell [this message]
2012-07-16  8:08     ` Alexander Graf
2012-07-16  8:09     ` Avi Kivity
2012-07-17 17:31 ` [Qemu-devel] " Peter Maydell
2012-07-17 18:19   ` Peter Maydell
2012-07-25  6:17     ` Rusty Russell
2012-07-25 15:04       ` Peter Maydell
2012-07-31 21:52       ` [Qemu-devel] [kvmarm] " Antonios Motakis
2012-08-01  1:53         ` Rusty Russell

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=87pq7wxje8.fsf@rustcorp.com.au \
    --to=rusty.russell@linaro.org \
    --cc=agraf@suse.de \
    --cc=kvmarm@lists.cs.columbia.edu \
    --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.