]> 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)
commitf5188dabd84751d651796a6913a3cd29aa0cb8f8
treeb6a2787a9b99078a7387c90a2f8ddaee63840830
parentbc8a04249b32f391d7b1452a9f1ca0a386cf531a
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