From 2fa810076b57d7b12863bf8c67813bdb29685e7b Mon Sep 17 00:00:00 2001 From: Zhi Jin Date: Fri, 22 Feb 2019 09:53:38 +0800 Subject: [PATCH] hv: debug: mark the mmio address for npk log as hv owned Otherwise, page fault will be triggered when writing npk log to these mmio addresses. Tracked-On: #2589 Signed-off-by: Zhi Jin Reviewed-by: Yonghua Huang Acked-by: Eddie Dong --- hypervisor/debug/npk_log.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hypervisor/debug/npk_log.c b/hypervisor/debug/npk_log.c index 3a05b1f26..bb7e7f5db 100644 --- a/hypervisor/debug/npk_log.c +++ b/hypervisor/debug/npk_log.c @@ -93,6 +93,10 @@ void npk_log_setup(struct hv_npk_log_param *param) for (i = 0U; i < phys_cpu_num; i++) { per_cpu(npk_log_ref, i) = 0U; } + hv_access_memory_region_update(base, + phys_cpu_num * (HV_NPK_LOG_REF_MASK + + 1U) * sizeof(struct npk_chan)); + } param->res = HV_NPK_LOG_RES_OK; npk_log_enabled = 1;