Skip to content

Commit

Permalink
Pass PVR in sregs
Browse files Browse the repository at this point in the history
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 <agraf@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Alexander Graf authored and Benjamin Herrenschmidt committed Nov 5, 2009
1 parent 4e75575 commit ec3c11a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ struct kvm_regs {
};

struct kvm_sregs {
__u32 pvr;
char pad[1020];
};

struct kvm_fpu {
Expand Down

0 comments on commit ec3c11a

Please sign in to comment.