Commit b48b4766 authored by Fuad Tabba's avatar Fuad Tabba Committed by Gina Ko
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: 428045681
Bug: 278749606
Bug: 417970855
Bug: 420967829
Bug: 427128726
Reported-by: default avatarShikha Panwar <shikhapanwar@google.com>
Signed-off-by: default avatarFuad Tabba <tabba@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:3a0107a38e48bff9057d369c63b0789b945bbef0)
Merged-In: Ia82bb409d83bdc7560589152ec6cf50f54eebefe
Change-Id: Ia82bb409d83bdc7560589152ec6cf50f54eebefe
parent 9d909fc8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment