]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MIPS: Implement HYPCALL emulation
authorJames Hogan <james.hogan@imgtec.com>
Tue, 14 Mar 2017 10:15:14 +0000 (10:15 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Tue, 28 Mar 2017 13:53:33 +0000 (14:53 +0100)
commit58b11c89161153d9f773943662a11be645b3c0cc
treeb6a2787a9b99078a7387c90a2f8ddaee63840830
parentdaf691e058d43ac68e412e8151a79ec03c2dee50
KVM: MIPS: Implement HYPCALL emulation

Emulate the HYPCALL instruction added in the VZ ASE and used by the MIPS
paravirtualised guest support that is already merged. The new hypcall.c
handles arguments and the return value. No actual hypercalls are yet
supported, but this still allows us to safely step over hypercalls and
set an error code in the return value for forward compatibility.

Non-zero HYPCALL codes are not handled.

We also document the hypercall ABI which asm/kvm_para.h uses.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Documentation/virtual/kvm/hypercalls.txt
arch/mips/include/asm/kvm_host.h
arch/mips/include/uapi/asm/inst.h
arch/mips/kvm/Makefile
arch/mips/kvm/emulate.c
arch/mips/kvm/hypcall.c [new file with mode: 0644]
arch/mips/kvm/trap_emul.c