mirror of https://github.com/Qortal/Brooklyn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
807 B
35 lines
807 B
// SPDX-License-Identifier: GPL-2.0-only |
|
/* |
|
* Copyright (C) 2012-2015 - ARM Ltd |
|
* Author: Marc Zyngier <[email protected]> |
|
*/ |
|
|
|
#include <hyp/sysreg-sr.h> |
|
|
|
#include <linux/compiler.h> |
|
#include <linux/kvm_host.h> |
|
|
|
#include <asm/kprobes.h> |
|
#include <asm/kvm_asm.h> |
|
#include <asm/kvm_emulate.h> |
|
#include <asm/kvm_hyp.h> |
|
|
|
/* |
|
* Non-VHE: Both host and guest must save everything. |
|
*/ |
|
|
|
void __sysreg_save_state_nvhe(struct kvm_cpu_context *ctxt) |
|
{ |
|
__sysreg_save_el1_state(ctxt); |
|
__sysreg_save_common_state(ctxt); |
|
__sysreg_save_user_state(ctxt); |
|
__sysreg_save_el2_return_state(ctxt); |
|
} |
|
|
|
void __sysreg_restore_state_nvhe(struct kvm_cpu_context *ctxt) |
|
{ |
|
__sysreg_restore_el1_state(ctxt); |
|
__sysreg_restore_common_state(ctxt); |
|
__sysreg_restore_user_state(ctxt); |
|
__sysreg_restore_el2_return_state(ctxt); |
|
}
|
|
|