1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2012-2015 - ARM Ltd
4 * Author: Marc Zyngier <marc.zyngier@arm.com>
7 #include <hyp/sysreg-sr.h>
9 #include <linux/compiler.h>
10 #include <linux/kvm_host.h>
12 #include <asm/kprobes.h>
13 #include <asm/kvm_asm.h>
14 #include <asm/kvm_emulate.h>
15 #include <asm/kvm_hyp.h>
18 * Non-VHE: Both host and guest must save everything.
21 void __sysreg_save_state_nvhe(struct kvm_cpu_context *ctxt)
23 __sysreg_save_el1_state(ctxt);
24 __sysreg_save_common_state(ctxt);
25 __sysreg_save_user_state(ctxt);
26 __sysreg_save_el2_return_state(ctxt);
29 void __sysreg_restore_state_nvhe(struct kvm_cpu_context *ctxt)
31 __sysreg_restore_el1_state(ctxt);
32 __sysreg_restore_common_state(ctxt);
33 __sysreg_restore_user_state(ctxt);
34 __sysreg_restore_el2_return_state(ctxt);