Skip to content
Snippets Groups Projects
Commit d4abeb0b authored by Will Deacon's avatar Will Deacon Committed by Fuad Tabba
Browse files

ANDROID: KVM: arm64: Introduce new spinlock for hypervisor VM vCPUs[] array


The vCPU structures of the hypervisor VM struct claim to be protected
by 'vm_table_lock', however:

  1. This doesn't appear to be the case on the PSCI paths, where the
     array is walked locklessly when accessing the target vCPU

  2. The 'vm_table_lock' serialises across all VMs, so is overkill

Introduce a new per-VM spinlock for the vCPU array and ensure that it is
held whilst accessing the data structure.

Signed-off-by: default avatarWill Deacon <will@kernel.org>
Bug: 278749606
Change-Id: I821639f0c698696e07bf0c228c18beea83434a03
parent 34ef2a3a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment