Skip to contentSkip to conversation

KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry

PATCH Alexander Graf 1 participant 1 message Mar 5, 2012

lore
Share & tools
lore

Alexander Graf

author Applied
#0 lore raw
Quoted 8 lines · Paul Mackerras

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.

Thanks, applied all to kvm-ppc-next. Please CC kvm@vger when you send patches. Failing to do so might mean the whole pull request gets blocked by Avi when it gets to him, because he doesn't read kvm-ppc@vger.

Alex