summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/include/nvhe/trap_handler.h
blob: 1e6d995968a1fbd1c93cc80bfe3693da917a4adb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Trap handler helpers.
 *
 * Copyright (C) 2020 - Google LLC
 * Author: Marc Zyngier <maz@kernel.org>
 */

#ifndef __ARM64_KVM_NVHE_TRAP_HANDLER_H__
#define __ARM64_KVM_NVHE_TRAP_HANDLER_H__

#include <asm/kvm_host.h>

#define cpu_reg(ctxt, r)	(ctxt)->regs.regs[r]
#define DECLARE_REG(type, name, ctxt, reg)	\
				type name = (type)cpu_reg(ctxt, (reg))

#endif /* __ARM64_KVM_NVHE_TRAP_HANDLER_H__ */