From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Date: Tue, 07 Jul 2009 15:40:45 +0000 Subject: Re: [PATCH 01/23] Pass PVR in sregs Message-Id: <4A536C7D.8080100@redhat.com> List-Id: References: <1246976262-4826-2-git-send-email-agraf@suse.de> In-Reply-To: <1246976262-4826-2-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org 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 > --- > 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