From e7179aa7a01ad9c4f5c8a7f576c90b69ed9a1837 Mon Sep 17 00:00:00 2001 From: Shuo A Liu Date: Wed, 26 Jun 2019 16:31:50 +0800 Subject: [PATCH] dm: support VM running with more than 4 vcpus Change hardcode of vcpu number to the real value when process VM's IO request in DM, so we can handle all requests from different vcpus. Tracked-On: #3425 Signed-off-by: Shuo A Liu Acked-by: Yu Wang --- devicemodel/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devicemodel/core/main.c b/devicemodel/core/main.c index 7c829be8d..f6bb181f4 100644 --- a/devicemodel/core/main.c +++ b/devicemodel/core/main.c @@ -643,7 +643,7 @@ vm_loop(struct vmctx *ctx) if (error) break; - for (vcpu_id = 0; vcpu_id < 4; vcpu_id++) { + for (vcpu_id = 0; vcpu_id < guest_ncpus; vcpu_id++) { vhm_req = &vhm_req_buf[vcpu_id]; if ((atomic_load(&vhm_req->processed) == REQ_STATE_PROCESSING) && (vhm_req->client == ctx->ioreq_client))