aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/trace_pr.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-04-24 13:46:24 +0200
committerAlexander Graf <agraf@suse.de>2014-05-30 14:26:21 +0200
commit5deb8e7ad8ac7e3fcdfa042acff617f461b361c2 (patch)
treeccfc251ffbadfa4297aefcfe17dee807eba7ce73 /arch/powerpc/kvm/trace_pr.h
parentKVM: PPC: PR: Fill pvinfo hcall instructions in big endian (diff)
downloadlinux-dev-5deb8e7ad8ac7e3fcdfa042acff617f461b361c2.tar.xz
linux-dev-5deb8e7ad8ac7e3fcdfa042acff617f461b361c2.zip
KVM: PPC: Make shared struct aka magic page guest endian
The shared (magic) page is a data structure that contains often used supervisor privileged SPRs accessible via memory to the user to reduce the number of exits we have to take to read/write them. When we actually share this structure with the guest we have to maintain it in guest endianness, because some of the patch tricks only work with native endian load/store operations. Since we only share the structure with either host or guest in little endian on book3s_64 pr mode, we don't have to worry about booke or book3s hv. For booke, the shared struct stays big endian. For book3s_64 hv we maintain the struct in host native endian, since it never gets shared with the guest. For book3s_64 pr we introduce a variable that tells us which endianness the shared struct is in and route every access to it through helper inline functions that evaluate this variable. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/trace_pr.h')
-rw-r--r--arch/powerpc/kvm/trace_pr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/trace_pr.h b/arch/powerpc/kvm/trace_pr.h
index 8b22e4748344..e1357cd8dc1f 100644
--- a/arch/powerpc/kvm/trace_pr.h
+++ b/arch/powerpc/kvm/trace_pr.h
@@ -255,7 +255,7 @@ TRACE_EVENT(kvm_exit,
__entry->exit_nr = exit_nr;
__entry->pc = kvmppc_get_pc(vcpu);
__entry->dar = kvmppc_get_fault_dar(vcpu);
- __entry->msr = vcpu->arch.shared->msr;
+ __entry->msr = kvmppc_get_msr(vcpu);
__entry->srr1 = vcpu->arch.shadow_srr1;
__entry->last_inst = vcpu->arch.last_inst;
),