ANDROID: BACKPORT: KVM: arm64: Use guest VMID as owner id
We currently track page-ownership in nVHE protected mode with a rather coarse granularity -- all guests share a unique owner id. But a finer grain tracking will be useful soon, to e.g. handle host stage-2 faults caused by an access to guest memory. To prepare the ground for this, let's use the guest VMIDs as owner ids, hence allowing to distinguish between all of them. This only works since the pKVM EL2 hypervisor guarantees the stability of the VMIDs for the entire lifetime of a guest VM. This will need some rework when/if we attempt to run more than 255 guests concurrently in protected mode as we'll have to handle VMID rollovers, but there is no clear need for now, so let's keep it simple to start. Signed-off-by:Quentin Perret <qperret@google.com> [willdeacon@: Update constants in mem_protect.h] Bug: 209580772 Change-Id: I5c5c8061617d7dc481ae5e25a0391b306aabbd8c Signed-off-by:
Will Deacon <willdeacon@google.com>
Loading
Please sign in to comment