Skip to content

Commit e7179aa

Browse files
Shuo A Liuwenlingz
authored andcommitted
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 <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
1 parent adf3a59 commit e7179aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

devicemodel/core/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ vm_loop(struct vmctx *ctx)
643643
if (error)
644644
break;
645645

646-
for (vcpu_id = 0; vcpu_id < 4; vcpu_id++) {
646+
for (vcpu_id = 0; vcpu_id < guest_ncpus; vcpu_id++) {
647647
vhm_req = &vhm_req_buf[vcpu_id];
648648
if ((atomic_load(&vhm_req->processed) == REQ_STATE_PROCESSING)
649649
&& (vhm_req->client == ctx->ioreq_client))

0 commit comments

Comments
 (0)