1 Mar 2012 02:20
[PATCH v2 2/2] KVM: booke: Improve SPE switch
Olivia Yin <hong-hua.yin <at> freescale.com>
2012-03-01 01:20:33 GMT
2012-03-01 01:20:33 GMT
From: Liu Yu <yu.liu <at> freescale.com> Like book3s did for fp switch, instead of switch SPE between host and guest, the patch switch SPE state between qemu and guest. In this way, we can simulate a host loadup SPE when load guest SPE state, and let host to decide when to giveup SPE state. Therefor it cooperates better with host SPE usage, and so that has some performance benifit in UP host(lazy SPE). Moreover, since the patch save guest SPE state into linux thread field, it creates the condition to emulate guest SPE instructions in host, so that we can avoid injecting SPE exception to guest. The patch also turns all asm code into C code, and add SPE stat counts. Signed-off-by: Liu Yu <yu.liu <at> freescale.com> Signed-off-by: Olivia Yin <hong-hua.yin <at> freescale.com> --- v2: Keep shadow MSR[SPE] consistent with thread MSR[SPE] in kvmppc_core_vcpu_load arch/powerpc/include/asm/kvm_host.h | 11 +++++- arch/powerpc/kernel/asm-offsets.c | 7 ---- arch/powerpc/kvm/booke.c | 63 +++++++++++++++++++++++++++++++---- arch/powerpc/kvm/booke.h | 8 +---- arch/powerpc/kvm/booke_interrupts.S | 37 -------------------- arch/powerpc/kvm/e500.c | 13 ++++---(Continue reading)
RSS Feed