From: Alexander Graf Date: Fri, 30 Oct 2009 05:47:02 +0000 (+0000) Subject: Pass PVR in sregs X-Git-Tag: v2.6.33-rc1~293^2~86^2~25 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ec3c11aa5f9d0a7f48f46d6790c33ccc654fd6ec;p=linux-2.6-block.git Pass PVR in sregs 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 Book3s 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 Book3s_32 and Book3s_64 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 Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h index bb2de6aa5ce0..c9ca97f43bc1 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/asm/kvm.h @@ -46,6 +46,8 @@ struct kvm_regs { }; struct kvm_sregs { + __u32 pvr; + char pad[1020]; }; struct kvm_fpu {