aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-08-03 01:06:11 +0200
committerAvi Kivity <avi@redhat.com>2010-10-24 10:52:11 +0200
commit8e8651783ff2458f31098be7c2abacf2fcab054a (patch)
treea8afc1f2093faa9b85bda703e846ed461630f88d /arch/powerpc/kvm/book3s.c
parentc1c88e2fa16f979ba3e99018a53962abe852b30f (diff)
downloadkernel_samsung_smdk4412-8e8651783ff2458f31098be7c2abacf2fcab054a.zip
kernel_samsung_smdk4412-8e8651783ff2458f31098be7c2abacf2fcab054a.tar.gz
kernel_samsung_smdk4412-8e8651783ff2458f31098be7c2abacf2fcab054a.tar.bz2
KVM: PPC: Interpret SR registers on demand
Right now we're examining the contents of Book3s_32's segment registers when the register is written and put the interpreted contents into a struct. There are two reasons this is bad. For starters, the struct has worse real-time performance, as it occupies more ram. But the more important part is that with segment registers being interpreted from their raw values, we can put them in the shared page, allowing guests to mess with them directly. This patch makes the internal representation of SRs be u32s. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r--arch/powerpc/kvm/book3s.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 2fb528f..34472af 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -1162,8 +1162,8 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
}
} else {
for (i = 0; i < 16; i++) {
- sregs->u.s.ppc32.sr[i] = vcpu3s->sr[i].raw;
- sregs->u.s.ppc32.sr[i] = vcpu3s->sr[i].raw;
+ sregs->u.s.ppc32.sr[i] = vcpu3s->sr[i];
+ sregs->u.s.ppc32.sr[i] = vcpu3s->sr[i];
}
for (i = 0; i < 8; i++) {
sregs->u.s.ppc32.ibat[i] = vcpu3s->ibat[i].raw;