KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry
authorPaul Mackerras <paulus@samba.org>
Fri, 3 Feb 2012 00:53:21 +0000 (00:53 +0000)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 13:26:43 +0000 (18:26 +0530)
commit62ccf1e16478d5080583b67235abc1544cb0435a
treee13fa3481c503d2c3f3322d296ea1c9ca67169dd
parent07e4316afaa77a190ff40e2f46ff7e8e45d8414f
KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry

The ABI specifies that CR fields CR2--CR4 are nonvolatile across function
calls.  Currently __kvmppc_vcore_entry doesn't save and restore the CR,
leading to CR2--CR4 getting corrupted with guest values, possibly leading
to incorrect behaviour in its caller.  This adds instructions to save
and restore CR at the points where we save and restore the nonvolatile
GPRs.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kvm/book3s_hv_interrupts.S