diff options
author | Scott Wood <scottwood@freescale.com> | 2011-06-14 19:34:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-07-12 06:16:32 -0400 |
commit | 4cd35f675ba41a99a477e28a6add4a66833325f2 (patch) | |
tree | d4b26dadccbad63b63ce90b358efa5903c4e075e /arch/powerpc/kernel/asm-offsets.c | |
parent | ecee273fc48f7f48f0c2f074335c43aaa790c308 (diff) |
KVM: PPC: e500: Save/restore SPE state
This is done lazily. The SPE save will be done only if the guest has
used SPE since the last preemption or heavyweight exit. Restore will be
done only on demand, when enabling MSR_SPE in the shadow MSR, in response
to an SPE fault or mtmsr emulation.
For SPEFSCR, Linux already switches it on context switch (non-lazily), so
the only remaining bit is to save it between qemu and the guest.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kernel/asm-offsets.c')
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 25de8e4808a4..ecd2b3ad7ff6 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -497,6 +497,13 @@ int main(void) | |||
497 | DEFINE(TLBCAM_MAS7, offsetof(struct tlbcam, MAS7)); | 497 | DEFINE(TLBCAM_MAS7, offsetof(struct tlbcam, MAS7)); |
498 | #endif | 498 | #endif |
499 | 499 | ||
500 | #if defined(CONFIG_KVM) && defined(CONFIG_SPE) | ||
501 | DEFINE(VCPU_EVR, offsetof(struct kvm_vcpu, arch.evr[0])); | ||
502 | DEFINE(VCPU_ACC, offsetof(struct kvm_vcpu, arch.acc)); | ||
503 | DEFINE(VCPU_SPEFSCR, offsetof(struct kvm_vcpu, arch.spefscr)); | ||
504 | DEFINE(VCPU_HOST_SPEFSCR, offsetof(struct kvm_vcpu, arch.host_spefscr)); | ||
505 | #endif | ||
506 | |||
500 | #ifdef CONFIG_KVM_EXIT_TIMING | 507 | #ifdef CONFIG_KVM_EXIT_TIMING |
501 | DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu, | 508 | DEFINE(VCPU_TIMING_EXIT_TBU, offsetof(struct kvm_vcpu, |
502 | arch.timing_exit.tv32.tbu)); | 509 | arch.timing_exit.tv32.tbu)); |