diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-23 04:21:14 +0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-05-16 17:02:11 +0400 |
commit | ffe3649282946547f1b938e02c0228aead407a18 (patch) | |
tree | bc95604d39cdefb135adc60c03fabffda4557604 /arch/powerpc/include/asm/kvm_book3s.h | |
parent | 32c7dbfd479e73684b0d23fcb0a5cb04f19d86f4 (diff) | |
download | linux-ffe3649282946547f1b938e02c0228aead407a18.tar.xz |
powerpc/kvm: Fix VSID usage in 64-bit "PR" KVM
The code forgot to scramble the VSIDs the way we normally do
and was basically using the "proto VSID" directly with the MMU.
This means that in practice, KVM used random VSIDs that could
collide with segments used by other user space programs.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[agraf: simplify ppc32 case]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_book3s.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h index aa795ccef294..fd07f43d6622 100644 --- a/arch/powerpc/include/asm/kvm_book3s.h +++ b/arch/powerpc/include/asm/kvm_book3s.h @@ -81,12 +81,13 @@ struct kvmppc_vcpu_book3s { u64 sdr1; u64 hior; u64 msr_mask; - u64 vsid_next; #ifdef CONFIG_PPC_BOOK3S_32 u32 vsid_pool[VSID_POOL_SIZE]; + u32 vsid_next; #else - u64 vsid_first; - u64 vsid_max; + u64 proto_vsid_first; + u64 proto_vsid_max; + u64 proto_vsid_next; #endif int context_id[SID_CONTEXTS]; |