OSDN Git Service

KVM: MIPS: Add vcpu_run() & vcpu_reenter() callbacks
authorJames Hogan <james.hogan@imgtec.com>
Fri, 18 Nov 2016 13:14:37 +0000 (13:14 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:20:46 +0000 (15:20 +0000)
commita2c046e40ff16ef6c20d534b0d77d526bc02a684
treea016109fa9b7cbcdf636924f30d4972371f5621f
parentc550d53934d821dbdd867ca314d417f2e918c72c
KVM: MIPS: Add vcpu_run() & vcpu_reenter() callbacks

Add implementation callbacks for entering the guest (vcpu_run()) and
reentering the guest (vcpu_reenter()), allowing implementation specific
operations to be performed before entering the guest or after returning
to the host without cluttering kvm_arch_vcpu_ioctl_run().

This allows the T&E specific lazy user GVA flush to be moved into
trap_emul.c, along with disabling of the HTW. We also move
kvm_mips_deliver_interrupts() as VZ will need to restore the guest timer
state prior to delivering interrupts.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
arch/mips/include/asm/kvm_host.h
arch/mips/kvm/mips.c
arch/mips/kvm/trap_emul.c