mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
hv:remove accessing shared log buffer cases between stac/clac
Shared buffer is allocated by VM and is protected by SMAP. Accessing to shared buffer between stac/clac pair will invalidate SMAP protection.This patch is to remove these cases. Fix minor stac/clac mis-usage,and add comments as stac/clac usage BKM Tracked-On: #2526 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -49,11 +49,8 @@ uint64_t local_gpa2hpa(struct acrn_vm *vm, uint64_t gpa, uint32_t *size)
|
||||
if (pgentry != NULL) {
|
||||
hpa = ((*pgentry & (~(pg_size - 1UL)))
|
||||
| (gpa & (pg_size - 1UL)));
|
||||
pr_dbg("GPA2HPA: 0x%llx->0x%llx", gpa, hpa);
|
||||
} else {
|
||||
pr_err("VM %d GPA2HPA: failed for gpa 0x%llx",
|
||||
vm->vm_id, gpa);
|
||||
}
|
||||
|
||||
/**
|
||||
* If specified parameter size is not NULL and
|
||||
* the HPA of parameter gpa is found, pg_size shall
|
||||
|
@@ -94,7 +94,6 @@ bool parse_seed_sbl(uint64_t addr, struct physical_seed *phy_seed)
|
||||
*/
|
||||
if ((entry->index != dseed_index) ||
|
||||
(entry->index >= BOOTLOADER_SEED_MAX_ENTRIES)) {
|
||||
pr_warn("%s: Invalid seed index.", __func__);
|
||||
status = false;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user