
On Mon, Jul 10, 2017 at 06:47:57 -0400, John Ferlan wrote:
On 06/27/2017 10:27 AM, Peter Krempa wrote:
vcpu properties gathered from query-hotpluggable cpus need to be passed back to qemu. As qemu did not use the node-id property until now and libvirt forgot to pass it back properly (it was parsed but not passed around) we did not honor this.
This patch adds node-id to the structures where it was missing and passes it around as necessary.
The test data was generated with a VM with following config: <numa> <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/> <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/> </numa>
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452053 --- src/qemu/qemu_command.c | 4 + src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain.h | 1 + src/qemu/qemu_monitor.c | 2 + src/qemu/qemu_monitor.h | 1 + ...qemumonitorjson-cpuinfo-x86-node-full-cpus.json | 35 +++++++++ ...umonitorjson-cpuinfo-x86-node-full-hotplug.json | 87 ++++++++++++++++++++++ .../qemumonitorjson-cpuinfo-x86-node-full.data | 48 ++++++++++++ tests/qemumonitorjsontest.c | 3 + 9 files changed, 182 insertions(+) create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full-cpus.json create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full-hotplug.json create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-node-full.data
Searching through sources for 'core_id', 'socket_id', and 'thread_id' - would qemuProcessValidateHotpluggableVcpus need to be adjusted as well?
Good point. Since the node_id stuff was added later to qemu it should not break that condition, but I'll certainly add it there as well before pushing.
Reviewed-by: John Ferlan <jferlan@redhat.com>
John
FWIW: Perhaps missed as part of commit '1213f0f8a' the comments to qemuMonitorJSONProcessHotpluggableCpusReply do not include node-id.
It wasn't reported by qemu at that time, so I just forgot to propagate it further since it worked ...