-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qdevices: refreshes the device_add params for QMP hotplug #4053
base: master
Are you sure you want to change the base?
qdevices: refreshes the device_add params for QMP hotplug #4053
Conversation
The dimm device need the |
f0fe314
to
7cad78b
Compare
@yanan-fu so you mean I should only send the patch for the 'node' option? |
Here the affected test cases now pass (hotplug_virtio_mem includes the needed changes in tp-qemu)
|
No, i do not mean that, i missed the L3507~3508 in the pre review, it already be added for dimm device, that's good ^^ |
IMO, it is more reasonable to change it in the |
@yanan-fu but should I keep the Flags implementation? Or just cast to int the 'node' and 'requested-size' values? |
Yes, but not the Flag implementation in this PR, you can refer the approach for |
@yanan-fu I see the functions using |
FYI, this is not the only change for mem, QEMU aligns the create_cli_devices with qmp_device_add, for most opts, we should follow json format, see: [PULL,7/8] qdev-monitor: avoid QemuOpts in QMP device_add and [PULL,8/8] vl: use qmp_device_add() in qemu_create_cli_devices(). @yanglei-rh ping me that the NIC device opt |
I means you can refer the approach, and |
Yes, that's the reason that i think it need be changed in the QDevice side for the qmp_hotplug instead of current approach. |
Hi @nickzhq |
IMO, no effect for the json format which be used to generate qemu command line, this one is for the hotplug. |
Hi, avocado-vt/virttest/qemu_vm.py Lines 1146 to 1158 in fef8380
Please correct me if I am wrong. CC @nickzhq Thanks. |
Hello @YongxueHong @yanan-fu , #4050 has the same issue with this patch. |
@YongxueHong When i talking about it is not related with json format, i do not mean the solution in the current MR now. I suggest change QDevice, for qmp hotplug, it is not related with the json format. And json_format works well with both test result and code review, take avocado-vt/virttest/qemu_devices/qdevices.py Line 1280 in fef8380
|
7cad78b
to
e4e648f
Compare
device_add no longer accept string values in QMP command. Casts the node and requested-size values to integer before doing the QMP hotplug. Signed-off-by: mcasquer <mcasquer@redhat.com>
e4e648f
to
0d91c38
Compare
@yanan-fu I was misunderstanding the idea, code updated ! :) |
|
@yanan-fu please could you review again this PR? Thanks ! |
for option in ["node", "requested-size"]: | ||
value = params.get(option) | ||
if value: | ||
params[option] = int(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic with L1165~L1168 belong to the refresh_hotplug_procs
function. And for node, it already be covered in the Dimm
class.
@mcasquer could you please also considering the And, to be more broadly, I guess all the conversion in the By now, I do not have a very clear idea abut if it reasonable to combine the parameter conversion in |
So @yanan-fu all the following params should be covered right?: avocado-vt/virttest/qemu_devices/qdevices.py Lines 1263 to 1287 in 44d5e2b
About the |
@mcasquer Let me make myself more clear:
|
@yanan-fu ok, doing the change with all the properties could be a valid change, let me know with the final decision |
qdevices: refreshes the device_add params for QMP hotplug
device_add no longer accept string values in QMP command.
Casts the node and requested-size values to integer before
doing the QMP hotplug.
Signed-off-by: mcasquer mcasquer@redhat.com
ID: 3253