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:Chuanxiao Dong <chuanxiao.dong@intel.com> Reviewed-by:
Jason Chen CJ <jason.cj.chen@intel.com> Signed-off-by:
Vineeth Pillai <vineethrp@google.com>
Loading
Please sign in to comment