aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-02-09 11:35:20 -0500
committerJames Hogan <james.hogan@imgtec.com>2015-03-27 17:25:13 -0400
commitb86ecb3766abd9138289ff2a18381d25b73f4622 (patch)
treefd0ca41fd27fd00c94a6d2022ecd04c8266ed9f8 /arch/mips/include
parentc771607af959f282704268a209743560d3264eb3 (diff)
MIPS: KVM: Add vcpu_get_regs/vcpu_set_regs callback
Add a vcpu_get_regs() and vcpu_set_regs() callbacks for loading and restoring context which may be in hardware registers. This may include floating point and MIPS SIMD Architecture (MSA) state which may be accessed directly by the guest (but restored lazily by the hypervisor), and also dedicated guest registers as provided by the VZ ASE. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gleb Natapov <gleb@kernel.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/kvm_host.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h
index 3f58ee1ebfab..fb79d67de192 100644
--- a/arch/mips/include/asm/kvm_host.h
+++ b/arch/mips/include/asm/kvm_host.h
@@ -585,6 +585,8 @@ struct kvm_mips_callbacks {
585 const struct kvm_one_reg *reg, s64 *v); 585 const struct kvm_one_reg *reg, s64 *v);
586 int (*set_one_reg)(struct kvm_vcpu *vcpu, 586 int (*set_one_reg)(struct kvm_vcpu *vcpu,
587 const struct kvm_one_reg *reg, s64 v); 587 const struct kvm_one_reg *reg, s64 v);
588 int (*vcpu_get_regs)(struct kvm_vcpu *vcpu);
589 int (*vcpu_set_regs)(struct kvm_vcpu *vcpu);
588}; 590};
589extern struct kvm_mips_callbacks *kvm_mips_callbacks; 591extern struct kvm_mips_callbacks *kvm_mips_callbacks;
590int kvm_mips_emulation_init(struct kvm_mips_callbacks **install_callbacks); 592int kvm_mips_emulation_init(struct kvm_mips_callbacks **install_callbacks);