ANDROID: pkvm: x86: Fix a minor calculating issue
check_and_init_iommu() tries to get a common set of page level and page size mask between ept and dmar units. Both page level and size are with mask value. The current code used min() to calculate mask value which is not correct. For example, if EPT only supports 5-level while dmar supports 4-level, the current logic will get the result of 4-level but the correct result should be 0. This may not happen in reality, though, as the 5-level capability most likely implies 4-level as well. Still have the small fix to make the code looking more right. Bug: 395299836 Test: Boot, verify cpus are de-privileged and run a minimal protected vm. Change-Id: Ia42541900e9bf6f05ae567664e986f136f1a2cc8 Signed-off-by:Zhiyuan Lv <zhiyuan.lv@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