]> git.dujemihanovic.xyz Git - linux.git/commit
KVM: arm64: Allocate memory mapped at hyp for host sve state in pKVM
authorFuad Tabba <tabba@google.com>
Mon, 3 Jun 2024 12:28:47 +0000 (13:28 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 4 Jun 2024 14:06:33 +0000 (15:06 +0100)
commit66d5b53e20a6e00b7ce3b652a3e2db967f7b33d0
tree18f77f59a02c28da6abe85df94d16d2dbde15c03
parente511e08a9f496948b13aac50610f2d17335f56c3
KVM: arm64: Allocate memory mapped at hyp for host sve state in pKVM

Protected mode needs to maintain (save/restore) the host's sve
state, rather than relying on the host kernel to do that. This is
to avoid leaking information to the host about guests and the
type of operations they are performing.

As a first step towards that, allocate memory mapped at hyp, per
cpu, for the host sve state. The following patch will use this
memory to save/restore the host state.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20240603122852.3923848-6-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/include/asm/kvm_pkvm.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/nvhe/pkvm.c
arch/arm64/kvm/hyp/nvhe/setup.c
arch/arm64/kvm/reset.c