Skip to content

qga/Linux: online/offline/query VCPUs via guest sysfs

Laszlo Ersek qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 7 repliesIn review
  2. v13 patches 22 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3qga: introduce guest-get-vcpus / guest-set-vcpus with stubsqga/commands-posix.c qga/commands-win32.c qga/qapi-schema.json+96 -03 replies
2/3qga: implement qmp_guest_get_vcpus() for Linux with sysfsqga/commands-posix.c+140 -62 replies
3/3qga: implement qmp_guest_set_vcpus() for Linux with sysfsqga/commands-posix.c+32 -62 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/3] qga/Linux: online/offline/query VCPUs via guest sysfs

Until the uncomparably harder task of real VCPU hotplug / hot-unplug is completed, here's a small guest agent series that imitates the same thing through the sysfs of the Linux guest. We've heard that people migrating from another VMM might be transitorily interested in this.

In v2: addressing the reviews of Eric and Michael (many thanks).
- Deal with non-offline-able VCPUs, introducing GuestLogicalProcessor.can_offline,
- POSIX write()-style retvals in guest-set-vcpus,
- move implementation into preexistent __linux__ section, keep standalone stubs,
- massage sysfs files with <unistd.h> interfaces.

(v2 is practically a rewrite; the interdiff doesn't appear particularly helpful.)

Laszlo Ersek (3):
qga: introduce guest-get-vcpus / guest-set-vcpus with stubs
qga: implement qmp_guest_get_vcpus() for Linux with sysfs
qga: implement qmp_guest_set_vcpus() for Linux with sysfs

 qga/qapi-schema.json |   72 +++++++++++++++++++++
 qga/commands-posix.c |  172 ++++++++++++++++++++++++++++++++++++++++++++++++++
 qga/commands-win32.c |   12 ++++
 3 files changed, 256 insertions(+), 0 deletions(-)