Commit 9c864eab authored by Quentin Perret's avatar Quentin Perret Committed by Will Deacon
Browse files

ANDROID: KVM: arm64: Refcount shadow structs on vcpu_{load/put}()



Nothing currently prevents the host from tearing down a shadow VM while
a vCPU is loaded, which is likely to corrupt the hypervisor state. To
prevent this, refcount the shadow vm structs on vcpu_load() and
vcpu_put() and make sure to only allow tearing down a shadow VM when
it's refcount is 0.

Signed-off-by: default avatarQuentin Perret <qperret@google.com>
Bug: 209580772
Change-Id: I2860c3297516f8af6ff4a0d4c91127af4a34b62e
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
parent 6dbd44cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment