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)
committerPaul Mackerras <paulus@samba.org>
Tue, 3 Apr 2012 06:42:30 +0000 (16:42 +1000)
commita5ddea0e78e76aa8d6354b9b0e51e652e21b8137
tree2cd3177d94017cbc2e3cc03186eed8ae281dd86f
parentb4e51229d8a1e499fe65153766437152cca42053
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