From 32d851059662ef60ab98ad8d96f1c76558702c3e Mon Sep 17 00:00:00 2001 From: Conghui Chen Date: Thu, 5 Sep 2019 10:35:26 +0000 Subject: [PATCH] hv: remove pr_dbg between stac/clac As the pr_dbg will access sbuf which will call stac/clac inside, so can not put pr_dbg between stac/clac, it will case Page Fault. acrn_print_request is a debug feature, and it calls pr_dbg. when the loglevel is set to 6, there will be Page Fault. So, remove the caller for acrn_print_request and mask the function as unused, reserved for debug. Tracked-On: #3648 Signed-off-by: Conghui Chen Reviewed-by: Yonghua Huang --- hypervisor/dm/io_req.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hypervisor/dm/io_req.c b/hypervisor/dm/io_req.c index 699f85293..e30434800 100644 --- a/hypervisor/dm/io_req.c +++ b/hypervisor/dm/io_req.c @@ -18,7 +18,7 @@ static uint32_t acrn_vhm_notification_vector = VECTOR_HYPERVISOR_CALLBACK_VHM; #define MMIO_DEFAULT_VALUE_SIZE_8 (0xFFFFFFFFFFFFFFFFUL) #if defined(HV_DEBUG) -static void acrn_print_request(uint16_t vcpu_id, const struct vhm_request *req) +__unused static void acrn_print_request(uint16_t vcpu_id, const struct vhm_request *req) { switch (req->type) { case REQ_MMIO: @@ -122,12 +122,6 @@ int32_t acrn_insert_request(struct acrn_vcpu *vcpu, const struct io_request *io_ */ set_vhm_req_state(vcpu->vm, vcpu->vcpu_id, REQ_STATE_PENDING); -#if defined(HV_DEBUG) - stac(); - acrn_print_request(vcpu->vcpu_id, vhm_req); - clac(); -#endif - /* signal VHM */ arch_fire_vhm_interrupt();