From c992a4f6a9b0a37c8bd7dfc727ecc3fed125c16b Mon Sep 17 00:00:00 2001 From: James Hogan Date: Tue, 14 Mar 2017 10:15:31 +0000 Subject: KVM: MIPS: Implement VZ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the main support for the MIPS Virtualization ASE (A.K.A. VZ) to MIPS KVM. The bulk of this work is in vz.c, with various new state and definitions elsewhere. Enough is implemented to be able to run on a minimal VZ core. Further patches will fill out support for guest features which are optional or can be disabled. Signed-off-by: James Hogan Acked-by: Ralf Baechle Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Steven Rostedt Cc: Ingo Molnar Cc: Jonathan Corbet Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: linux-doc@vger.kernel.org --- arch/mips/kvm/mips.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/mips/kvm/mips.c') diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 8c10148a345c..1bb5d01d5dec 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c @@ -113,7 +113,11 @@ void kvm_arch_check_processor_compat(void *rtn) int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) { switch (type) { +#ifdef CONFIG_KVM_MIPS_VZ + case KVM_VM_MIPS_VZ: +#else case KVM_VM_MIPS_TE: +#endif break; default: /* Unsupported KVM type */ @@ -378,6 +382,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) /* Init */ vcpu->arch.last_sched_cpu = -1; + vcpu->arch.last_exec_cpu = -1; return vcpu; -- cgit v1.2.3