Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e685c689 authored by Sanjay Lal's avatar Sanjay Lal Committed by Ralf Baechle
Browse files

KVM/MIPS32: Privileged instruction/target branch emulation.



- The Guest kernel is run in UM and privileged instructions cause a trap.
- If the instruction causing the trap is in a branch delay slot, the branch
  needs to be emulated to figure out the PC @ which the guest will resume
  execution.

Signed-off-by: default avatarSanjay Lal <sanjayl@kymasys.com>
Cc: kvm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 9843b030
Loading
Loading
Loading
Loading
+1829 −0

File added.

Preview size limit exceeded, changes collapsed.

+24 −0
Original line number Diff line number Diff line
/*
* This file is subject to the terms and conditions of the GNU General Public
* License.  See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2012  MIPS Technologies, Inc.  All rights reserved.
* Authors: Sanjay Lal <sanjayl@kymasys.com>
*/

/*
 * Define opcode values not defined in <asm/isnt.h>
 */

#ifndef __KVM_MIPS_OPCODE_H__
#define __KVM_MIPS_OPCODE_H__

/* COP0 Ops */
#define     mfmcz_op         0x0b	/*  01011  */
#define     wrpgpr_op        0x0e	/*  01110  */

/*  COP0 opcodes (only if COP0 and CO=1):  */
#define     wait_op               0x20	/*  100000  */

#endif /* __KVM_MIPS_OPCODE_H__ */