vl.c: make current_machine as non-global variable
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 12 repliesIn review
- v21 patch 10 repliesSuperseded
- v11 patch 1 replySuperseded
Changes in v3 from the cover letter
- add TYPE_MACHINE assertion for qdev_get_machine() usage
- apply qdev_get_machine_uncheck() for obj-common usage
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | vl.c: refactor current_machine as non-global variableaccel/ device-hotplug.c device_tree.c +8 more | +28 | 3 replies | |
| 2/2 | core/qdev: refactor qdev_get_machine() with type assertionhw/ include/ qom/ | +17 | 9 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Eduardo Habkost |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v3 0/2] vl.c: make current_machine as non-global variable
This patch makes the remaining dozen or so uses of the global current_machine outside vl.c use qdev_get_machine() instead, and then make current_machine local to vl.c instead of global.
With type assertion in qdev_get_machine(), it will be hard to misuse this function if machine hasn't been created yet. For obj-common cases, qdev_get_machine_uncheck() is applied without semantic change.
---
Changes in v3:
- add TYPE_MACHINE assertion for qdev_get_machine() usage
- apply qdev_get_machine_uncheck() for obj-common usage
Changes in v2:
- make the variable current_machine "static" (Thomas Huth)
Like Xu (2):
vl.c: refactor current_machine as non-global variable core/qdev: refactor qdev_get_machine() with type assertion
accel/kvm/kvm-all.c | 6 ++++-- device-hotplug.c | 3 ++- device_tree.c | 3 ++- exec.c | 6 ++++-- hw/core/qdev.c | 16 +++++++++++++--- hw/ppc/spapr_rtas.c | 3 ++- include/hw/boards.h | 1 - include/hw/qdev-core.h | 1 + migration/savevm.c | 9 ++++++--- qmp.c | 3 ++- qom/cpu.c | 5 +++-- target/i386/kvm.c | 3 ++- target/ppc/kvm.c | 3 ++- vl.c | 4 ++-- 14 files changed, 45 insertions(+), 21 deletions(-)
Signature · 1 line
1.8.3.1