mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ANDROID: KVM: arm64: Move loaded host fp state to pkvm
The state will be augmented in future patches and accessed in more than one location. It makes it easier to reason about the code. No functional change intended. Signed-off-by: Fuad Tabba <tabba@google.com> Bug: 267291591 Change-Id: If3a3a9266c201f63c126860b61da9698be9b9faa
This commit is contained in:
@@ -82,6 +82,8 @@ struct pkvm_hyp_vm {
|
||||
struct pkvm_hyp_vcpu *vcpus[];
|
||||
};
|
||||
|
||||
DECLARE_PER_CPU(struct user_fpsimd_state, loaded_host_fpsimd_state);
|
||||
|
||||
static inline struct pkvm_hyp_vm *
|
||||
pkvm_hyp_vcpu_to_hyp_vm(struct pkvm_hyp_vcpu *hyp_vcpu)
|
||||
{
|
||||
|
||||
@@ -30,14 +30,6 @@
|
||||
|
||||
#include "../../sys_regs.h"
|
||||
|
||||
/*
|
||||
* Host FPSIMD state. Written to when the guest accesses its own FPSIMD state,
|
||||
* and read when the guest state is live and we need to switch back to the host.
|
||||
*
|
||||
* Only valid when (fp_state == FP_STATE_GUEST_OWNED) in the hyp vCPU structure.
|
||||
*/
|
||||
static DEFINE_PER_CPU(struct user_fpsimd_state, loaded_host_fpsimd_state);
|
||||
|
||||
DEFINE_PER_CPU(struct kvm_nvhe_init_params, kvm_init_params);
|
||||
|
||||
void __kvm_hyp_host_forward_smc(struct kvm_cpu_context *host_ctxt);
|
||||
|
||||
@@ -31,6 +31,14 @@ unsigned int kvm_arm_vmid_bits;
|
||||
*/
|
||||
static DEFINE_PER_CPU(struct pkvm_hyp_vcpu *, loaded_hyp_vcpu);
|
||||
|
||||
/*
|
||||
* Host FPSIMD state. Written to when the guest accesses its own FPSIMD state,
|
||||
* and read when the guest state is live and we need to switch back to the host.
|
||||
*
|
||||
* Only valid when (fp_state == FP_STATE_GUEST_OWNED) in the hyp vCPU structure.
|
||||
*/
|
||||
DEFINE_PER_CPU(struct user_fpsimd_state, loaded_host_fpsimd_state);
|
||||
|
||||
/*
|
||||
* Set trap register values based on features in ID_AA64PFR0.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user