Commit 3a0107a3 authored by Fuad Tabba's avatar Fuad Tabba
Browse files

ANDROID: KVM: arm64: Ensure SVE initialization precedes PSCI for protected VCPUs



Reorder the initialization sequence for protected KVM VCPUs on arm64.
Specifically, ensure that SVE state is initialized *before* PSCI (and
PVM Firmare).

The current order presents a problem: PSCI initialization triggers the
bring-up of the PVM (Protected Virtual Machine) firmware. Should SVE
initialization then fail due to insufficient memory, there is no reliable
mechanism to roll back or clean up the already-initialized PVM firmware.
This can lead to an undesirable and unrecoverable state for the protected
VCPU. By initializing SVE first, any memory allocation failures will occur
prior to the PVM firmware becoming active, allowing for a more controlled
failure scenario.

Bug: 278749606
Bug: 417970855
Bug: 420967829
Bug: 427128726
Reported-by: default avatarShikha Panwar <shikhapanwar@google.com>
Change-Id: Ia82bb409d83bdc7560589152ec6cf50f54eebefe
Signed-off-by: default avatarFuad Tabba <tabba@google.com>
parent 3b751033
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment