diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2016-11-07 15:09:58 +1100 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-01-12 20:56:54 -0500 |
commit | ec05ce11c1e99a4c34f0c9937dc6abe00c7a43de (patch) | |
tree | ce144fe1cfab5e1e84399dd473401a724e4f7a14 /arch/powerpc/include/asm/kvm_host.h | |
parent | b1a75800973969f7bdbfd53f6cbfdad5fdd76fb3 (diff) |
KVM: PPC: Book3S HV: Save/restore XER in checkpointed register state
[ Upstream commit 0d808df06a44200f52262b6eb72bcb6042f5a7c5 ]
When switching from/to a guest that has a transaction in progress,
we need to save/restore the checkpointed register state. Although
XER is part of the CPU state that gets checkpointed, the code that
does this saving and restoring doesn't save/restore XER.
This fixes it by saving and restoring the XER. To allow userspace
to read/write the checkpointed XER value, we also add a new ONE_REG
specifier.
The visible effect of this bug is that the guest may see its XER
value being corrupted when it uses transactions.
Fixes: e4e38121507a ("KVM: PPC: Book3S HV: Add transactional memory support")
Fixes: 0a8eccefcb34 ("KVM: PPC: Book3S HV: Add missing code for transaction reclaim on guest exit")
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index a193a13cf08b..7fe65af0035d 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -532,6 +532,7 @@ struct kvm_vcpu_arch { u64 tfiar; u32 cr_tm; + u64 xer_tm; u64 lr_tm; u64 ctr_tm; u64 amr_tm; |