2020-01-10 00:27:19 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jian Jun Chen <jian.jun.chen@intel.com>
|
|
|
|
Date: Fri, 20 Sep 2019 11:09:24 +0800
|
|
|
|
Subject: [PATCH] acrn/vhm: continue with the next VM if req_buf is NULL
|
|
|
|
|
|
|
|
When /dev/acrn_vhm is opened a vhm_vm is added to the head of
|
|
|
|
vhm_vm_list. At this time the ioreq_buffer of the vm is not set yet.
|
|
|
|
If a failure happens for example hcall_create_vm failed due to some
|
|
|
|
reason, this vm is left in the vhm_vm_list without a ioreq_buffer.
|
|
|
|
io_req_tasklet will stop to iterate the vm list and io_req from
|
|
|
|
hyervisor cannot be delivered to ioreq_client. In this case failure
|
|
|
|
of creating a new VM will cause all the existing created/started VMs
|
|
|
|
hang.
|
|
|
|
|
|
|
|
v1->v2:
|
|
|
|
Revise the commit message.
|
|
|
|
|
|
|
|
Tracked-On: PKT-2793
|
|
|
|
Tracked-On: projectacrn/acrn-hypervisor#3718
|
|
|
|
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
|
|
|
|
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
|
|
|
|
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
---
|
|
|
|
drivers/char/vhm/vhm_dev.c | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/drivers/char/vhm/vhm_dev.c b/drivers/char/vhm/vhm_dev.c
|
2020-05-05 09:02:46 +08:00
|
|
|
index 7018e7654..f8117e614 100644
|
2020-01-10 00:27:19 +08:00
|
|
|
--- a/drivers/char/vhm/vhm_dev.c
|
|
|
|
+++ b/drivers/char/vhm/vhm_dev.c
|
|
|
|
@@ -687,7 +687,7 @@ static void io_req_tasklet(unsigned long data)
|
|
|
|
read_lock(&vhm_vm_list_lock);
|
|
|
|
list_for_each_entry(vm, &vhm_vm_list, list) {
|
|
|
|
if (!vm || !vm->req_buf)
|
|
|
|
- break;
|
|
|
|
+ continue;
|
|
|
|
|
|
|
|
acrn_ioreq_distribute_request(vm);
|
|
|
|
}
|
|
|
|
--
|
|
|
|
https://clearlinux.org
|
|
|
|
|