All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 01/23] Pass PVR in sregs
Date: Tue, 07 Jul 2009 15:40:45 +0000	[thread overview]
Message-ID: <4A536C7D.8080100@redhat.com> (raw)
In-Reply-To: <1246976262-4826-2-git-send-email-agraf@suse.de>

On 07/07/2009 05:17 PM, Alexander Graf wrote:
> Right now sregs is unused on PPC, so we can use it for initialization
> of the CPU.
>
> KVM on BookE always virtualizes the host CPU. On PPC64 we go a step further
> and take the PVR from userspace that tells us what kind of CPU we are supposed
> to virtualize, because we support PPC32 and PPC64 guests.
>
> In order to get that information, we use the sregs ioctl, because we don't
> want to reset the guest CPU on every normal register set.
>
> Signed-off-by: Alexander Graf<agraf@suse.de>
> ---
>   arch/powerpc/include/asm/kvm.h |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h
> index bb2de6a..96b02cd 100644
> --- a/arch/powerpc/include/asm/kvm.h
> +++ b/arch/powerpc/include/asm/kvm.h
> @@ -46,6 +46,7 @@ struct kvm_regs {
>   };
>
>   struct kvm_sregs {
> +	__u64 pvr;
>   };
>    

You can only do that if existing userspace never calls KVM_SET_SREGS.  
Hollis?

Also, make sure to reserve a bunch of space in there so you if you 
forget something you can add it later.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2009-07-07 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 14:17 [PATCH 01/23] Pass PVR in sregs Alexander Graf
2009-07-07 15:40 ` Avi Kivity [this message]
2009-07-07 22:50 ` Hollis Blanchard
2009-07-07 23:22 ` Alexander Graf
2009-07-08  2:28 ` Liu Yu-B13201
2009-07-10  0:52 ` Hollis Blanchard
2009-07-10  2:50 ` Liu Yu-B13201
2009-07-16 13:29 ` Alexander Graf
2009-09-11 23:03 ` Hollis Blanchard

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=4A536C7D.8080100@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm-ppc@vger.kernel.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.