diff options
author | Fuad Tabba <tabba@google.com> | 2024-06-03 13:28:49 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2024-06-04 15:06:33 +0100 |
commit | 1696fc2174dbab12228ea9ec4c213d6aeea348f8 (patch) | |
tree | da3ecb9639424a06db8411eecb8235d13c6039de /arch/arm64/include/asm | |
parent | b5b9955617bc0b41546f2fa7c3dbcc048b43dc82 (diff) | |
download | linux-stable-1696fc2174dbab12228ea9ec4c213d6aeea348f8.tar.gz linux-stable-1696fc2174dbab12228ea9ec4c213d6aeea348f8.tar.bz2 linux-stable-1696fc2174dbab12228ea9ec4c213d6aeea348f8.zip |
KVM: arm64: Consolidate initializing the host data's fpsimd_state/sve in pKVM
Now that we have introduced finalize_init_hyp_mode(), lets
consolidate the initializing of the host_data fpsimd_state and
sve state.
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240603122852.3923848-8-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 90df7ccec5f4..36b8e97bf49e 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -550,8 +550,14 @@ struct cpu_sve_state { struct kvm_host_data { struct kvm_cpu_context host_ctxt; - struct user_fpsimd_state *fpsimd_state; /* hyp VA */ - struct cpu_sve_state *sve_state; /* hyp VA */ + /* + * All pointers in this union are hyp VA. + * sve_state is only used in pKVM and if system_supports_sve(). + */ + union { + struct user_fpsimd_state *fpsimd_state; + struct cpu_sve_state *sve_state; + }; /* Ownership of the FP regs */ enum { |