Commit adc6cd67 authored by Chuanxiao Dong's avatar Chuanxiao Dong Committed by Tomasz Nowicki
Browse files

ANDROID: pkvm: x86: Add pgt_override pointer in pkvm_mem_trans_desc for host



The current mem protection APIs assume to use pkvm_hyp->host_vm.ept by
default as the host EPT. The next patch will introduce a fastpath API to
provide a way to avoid doing host EPT TLB flushing during the page state
transition, and it will require to use another pgt pointer as the host
EPT which does nothing in its tlbflush callback.

To provide the capability for mem protection APIs to use different host
ept pointer, introduce this pgt_override pointer element. If the
pgt_override is NULL, will use pkvm_hyp->host_vm.ept.

Also removed unused APIs host_ept_create_idmap & host_ept_set_owner, and
move host_ept_create_idmap_locked from ept.c to mem_protect.c as an
internal API.

Bug: 395299836
Test: Boot, verify cpus are de-privileged and run a minimal protected vm.

Change-Id: I5fb67f6757c66ba663ad9b5e8c4669573362edb9
Signed-off-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-by: default avatarJason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: default avatarVineeth Pillai <vineethrp@google.com>
parent 3363423f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment