qapi: Remove deprecated events
cover qapi: Remove deprecated events
Remove MEM_UNPLUG_ERROR and 'vcpu' field in TRACE events, all deprecated since long enough.
Philippe Mathieu-Daudé (2):
hw/acpi: Remove the deprecated QAPI MEM_UNPLUG_ERROR event
trace: Remove deprecated 'vcpu' field from QMP trace events
docs/about/deprecated.rst | 16 ---------------- docs/about/removed-features.rst | 15 +++++++++++++++ qapi/machine.json | 28 ---------------------------- qapi/trace.json | 27 +++------------------------ hw/acpi/memory_hotplug.c | 8 -------- hw/ppc/spapr.c | 11 +---------- trace/qmp.c | 2 -- trace/trace-hmp-cmds.c | 4 ++-- 8 files changed, 21 insertions(+), 90 deletions(-)
Signature · 1 line
2.41.0
PATCH 1/2 hw/acpi: Remove the deprecated QAPI MEM_UNPLUG_ERROR event
The MEM_UNPLUG_ERROR event is deprecated since commit d43f1670c7 ("qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event"), time to remove it.
--- docs/about/deprecated.rst | 5 ----- docs/about/removed-features.rst | 9 +++++++++ qapi/machine.json | 28 ---------------------------- hw/acpi/memory_hotplug.c | 8 -------- hw/ppc/spapr.c | 11 +---------- 5 files changed, 10 insertions(+), 51 deletions(-)
docs/about/deprecated.rst +0 -5
@@ -151,11 +151,6 @@ property types. QEMU Machine Protocol (QMP) events ---------------------------------- -``MEM_UNPLUG_ERROR`` (since 6.2) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Use the more generic event ``DEVICE_UNPLUG_GUEST_ERROR`` instead. - ``vcpu`` trace events (since 8.1) '''''''''''''''''''''''''''''''''
docs/about/removed-features.rst +9 -0
@@ -671,6 +671,15 @@ Use ``multifd-channels`` instead. Use ``multifd-compression`` instead. +QEMU Machine Protocol (QMP) events +---------------------------------- + +``MEM_UNPLUG_ERROR`` (removed in 9.1) +''''''''''''''''''''''''''''''''''''' + +MEM_UNPLUG_ERROR has been replaced by the more generic ``DEVICE_UNPLUG_GUEST_ERROR`` event. + + Human Monitor Protocol (HMP) commands -------------------------------------
qapi/machine.json +0 -28
@@ -1607,34 +1607,6 @@ { 'event': 'MEMORY_DEVICE_SIZE_CHANGE', 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} } -## -# @MEM_UNPLUG_ERROR: -# -# Emitted when memory hot unplug error occurs. -# -# @device: device name -# -# @msg: Informative message -# -# Features: -# -# @deprecated: This event is deprecated. Use -# @DEVICE_UNPLUG_GUEST_ERROR instead. -# -# Since: 2.4 -# -# Example: -# -# <- { "event": "MEM_UNPLUG_ERROR", -# "data": { "device": "dimm1", -# "msg": "acpi: device unplug for unsupported device" -# }, -# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } -## -{ 'event': 'MEM_UNPLUG_ERROR', - 'data': { 'device': 'str', 'msg': 'str' }, - 'features': ['deprecated'] } - ## # @BootConfiguration: #
hw/acpi/memory_hotplug.c +0 -8
@@ -178,14 +178,6 @@ static void acpi_memory_hotplug_write(void *opaque, hwaddr addr, uint64_t data,hotplug_handler_unplug (hotplug_ctrl, dev, &local_err);if (local_err) {trace_mhp_acpi_pc_dimm_delete_failed (mem_st->selector); - -/* -* Send both MEM_UNPLUG_ERROR and DEVICE_UNPLUG_GUEST_ERROR -* while the deprecation of MEM_UNPLUG_ERROR is -* pending. -*/ -qapi_event_send_mem_unplug_error (dev->id ? :"" , -error_get_pretty (local_err));qapi_event_send_device_unplug_guest_error (dev->id, dev->canonical_path);error_free (local_err);
hw/ppc/spapr.c +1 -10
@@ -3786,7 +3786,6 @@ void spapr_memory_unplug_rollback(SpaprMachineState *spapr, DeviceState *dev)SpaprDrc *drc;uint32_t nr_lmbs;uint64_t size, addr_start, addr; - g_autofree char *qapi_error = NULL;int i;if (!dev) {
@@ -3823,16 +3822,8 @@ void spapr_memory_unplug_rollback(SpaprMachineState *spapr, DeviceState *dev)/* * Tell QAPI that something happened and the memory -* hotunplug wasn't successful. Keep sending -* MEM_UNPLUG_ERROR even while sending -* DEVICE_UNPLUG_GUEST_ERROR until the deprecation of -* MEM_UNPLUG_ERROR is due. +* hotunplug wasn't successful. */ - qapi_error =g_strdup_printf ("Memory hotunplug rejected by the guest " -"for device %s" , dev->id); - -qapi_event_send_mem_unplug_error (dev->id ? :"" , qapi_error); -qapi_event_send_device_unplug_guest_error (dev->id, dev->canonical_path); }
Signature · 1 line
2.41.0
Re: [PATCH 1/2] hw/acpi: Remove the deprecated QAPI MEM_UNPLUG_ERROR event
Quoted 4 lines · Philippe Mathieu-Daudé
The
MEM_UNPLUG_ERRORevent is deprecated since commitd43f1670c7("qapi/qdev.json: addDEVICE_UNPLUG_GUEST_ERRORQAPI event"), time to remove it.
Quoted 9 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- docs/about/deprecated.rst | 5 ----- docs/about/removed-features.rst | 9 +++++++++ qapi/machine.json | 28 ---------------------------- hw/acpi/memory_hotplug.c | 8 -------- hw/ppc/spapr.c | 11 +---------- 5 files changed, 10 insertions(+), 51 deletions(-)
For spapr:
Quoted 124 lines
docs/about/deprecated.rst +0
-5@@ -151,11 +151,6 @@ property types. QEMU Machine Protocol (QMP) events ---------------------------------- -``MEM_UNPLUG_ERROR`` (since 6.2) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Use the more generic event ``DEVICE_UNPLUG_GUEST_ERROR`` instead. - ``vcpu`` trace events (since 8.1) '''''''''''''''''''''''''''''''''docs/about/removed-features.rst +9
-0@@ -671,6 +671,15 @@ Use ``multifd-channels`` instead. Use ``multifd-compression`` instead. +QEMU Machine Protocol (QMP) events +---------------------------------- + +``MEM_UNPLUG_ERROR`` (removed in 9.1) +''''''''''''''''''''''''''''''''''''' + +MEM_UNPLUG_ERROR has been replaced by the more generic ``DEVICE_UNPLUG_GUEST_ERROR`` event. + + Human Monitor Protocol (HMP) commands -------------------------------------qapi/machine.json +0
-28@@ -1607,34 +1607,6 @@ { 'event': 'MEMORY_DEVICE_SIZE_CHANGE', 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} } -## -# @MEM_UNPLUG_ERROR: -# -# Emitted when memory hot unplug error occurs. -# -# @device: device name -# -# @msg: Informative message -# -# Features: -# -# @deprecated: This event is deprecated. Use -# @DEVICE_UNPLUG_GUEST_ERROR instead. -# -# Since: 2.4 -# -# Example: -# -# <- { "event": "MEM_UNPLUG_ERROR", -# "data": { "device": "dimm1", -# "msg": "acpi: device unplug for unsupported device" -# }, -# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } -## -{ 'event': 'MEM_UNPLUG_ERROR', - 'data': { 'device': 'str', 'msg': 'str' }, - 'features': ['deprecated'] } - ## # @BootConfiguration: #hw/acpi/memory_hotplug.c +0
-8@@ -178,14 +178,6 @@ static void acpi_memory_hotplug_write(void *opaque, hwaddr addr, uint64_t data,hotplug_handler_unplug (hotplug_ctrl, dev, &local_err);if (local_err) {trace_mhp_acpi_pc_dimm_delete_failed (mem_st->selector); - -/* -* Send both MEM_UNPLUG_ERROR and DEVICE_UNPLUG_GUEST_ERROR -* while the deprecation of MEM_UNPLUG_ERROR is -* pending. -*/ -qapi_event_send_mem_unplug_error (dev->id ? :"" , -error_get_pretty (local_err));qapi_event_send_device_unplug_guest_error (dev->id, dev->canonical_path);error_free (local_err);hw/ppc/spapr.c +1
-10@@ -3786,7 +3786,6 @@ void spapr_memory_unplug_rollback(SpaprMachineState *spapr, DeviceState *dev)SpaprDrc *drc;uint32_t nr_lmbs;uint64_t size, addr_start, addr; - g_autofree char *qapi_error = NULL;int i;if (!dev) {@@ -3823,16 +3822,8 @@ void spapr_memory_unplug_rollback(SpaprMachineState *spapr, DeviceState *dev)/* * Tell QAPI that something happened and the memory -* hotunplug wasn't successful. Keep sending -* MEM_UNPLUG_ERROR even while sending -* DEVICE_UNPLUG_GUEST_ERROR until the deprecation of -* MEM_UNPLUG_ERROR is due. +* hotunplug wasn't successful. */ - qapi_error =g_strdup_printf ("Memory hotunplug rejected by the guest " -"for device %s" , dev->id); - -qapi_event_send_mem_unplug_error (dev->id ? :"" , qapi_error); -qapi_event_send_device_unplug_guest_error (dev->id, dev->canonical_path); }
PATCH 2/2 trace: Remove deprecated 'vcpu' field from QMP trace events
In reply to Philippe Mathieu-Daudé'vcpu' fields are deprecated since commit 5485e52a33 ("qapi: make the vcpu parameters deprecated for 8.1"), time to remove them.
--- docs/about/deprecated.rst | 11 ----------- docs/about/removed-features.rst | 6 ++++++ qapi/trace.json | 27 +++------------------------ trace/qmp.c | 2 -- trace/trace-hmp-cmds.c | 4 ++-- 5 files changed, 11 insertions(+), 39 deletions(-)
docs/about/deprecated.rst +0 -11
@@ -148,17 +148,6 @@ accepted incorrect commands will return an error. Users should make sure that all arguments passed to ``device_add`` are consistent with the documented property types. -QEMU Machine Protocol (QMP) events ----------------------------------- - -``vcpu`` trace events (since 8.1) -''''''''''''''''''''''''''''''''' - -The ability to instrument QEMU helper functions with vCPU-aware trace -points was removed in 7.0. However QMP still exposed the vcpu -parameter. This argument has now been deprecated and the remaining -remaining trace points that used it are selected just by name. - Host Architectures ------------------
docs/about/removed-features.rst +6 -0
@@ -679,6 +679,12 @@ QEMU Machine Protocol (QMP) events MEM_UNPLUG_ERROR has been replaced by the more generic ``DEVICE_UNPLUG_GUEST_ERROR`` event. +``vcpu`` trace events (removed in 9.1) +'''''''''''''''''''''''''''''''''''''' + +The ability to instrument QEMU helper functions with vCPU-aware trace +points was removed in 7.0. + Human Monitor Protocol (HMP) commands -------------------------------------
qapi/trace.json +3 -24
@@ -35,17 +35,10 @@ # # @state: Tracing state. # -# @vcpu: Whether this is a per-vCPU event (since 2.7). -# -# Features: -# -# @deprecated: Member @vcpu is deprecated, and always ignored. -# # Since: 2.2 ## { 'struct': 'TraceEventInfo', - 'data': {'name': 'str', 'state': 'TraceEventState', - 'vcpu': { 'type': 'bool', 'features': ['deprecated'] } } } + 'data': {'name': 'str', 'state': 'TraceEventState' } } ## # @trace-event-get-state:
@@ -54,12 +47,6 @@ # # @name: Event name pattern (case-sensitive glob). # -# @vcpu: The vCPU to query (since 2.7). -# -# Features: -# -# @deprecated: Member @vcpu is deprecated, and always ignored. -# # Returns: a list of @TraceEventInfo for the matching events # # Since: 2.2
@@ -71,8 +58,7 @@ # <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] } ## { 'command': 'trace-event-get-state', - 'data': {'name': 'str', - '*vcpu': {'type': 'int', 'features': ['deprecated'] } }, + 'data': {'name': 'str' }, 'returns': ['TraceEventInfo'] } ##
@@ -86,12 +72,6 @@ # # @ignore-unavailable: Do not match unavailable events with @name. # -# @vcpu: The vCPU to act upon (all by default; since 2.7). -# -# Features: -# -# @deprecated: Member @vcpu is deprecated, and always ignored. -# # Since: 2.2 # # Example:
@@ -101,5 +81,4 @@ # <- { "return": {} } ## { 'command': 'trace-event-set-state', - 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool', - '*vcpu': {'type': 'int', 'features': ['deprecated'] } } } + 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool' } }
trace/qmp.c +0 -2
@@ -48,7 +48,6 @@ static bool check_events(bool ignore_unavailable, bool is_pattern, }TraceEventInfoList *qmp_trace_event_get_state (const char *name, -bool has_vcpu,int64_t vcpu,Error **errp) {TraceEventInfoList *events =NULL ;
@@ -86,7 +85,6 @@ TraceEventInfoList *qmp_trace_event_get_state(const char *name,void qmp_trace_event_set_state (const char *name,bool enable,bool has_ignore_unavailable,bool ignore_unavailable, -bool has_vcpu,int64_t vcpu,Error **errp) {TraceEventIter iter;
trace/trace-hmp-cmds.c +2 -2
@@ -40,7 +40,7 @@ void hmp_trace_event(Monitor *mon, const QDict *qdict)Error *local_err =NULL ;qmp_trace_event_set_state (tp_name, new_state, - true, true, false,0 , &local_err); + true, true, &local_err);if (local_err) {error_report_err (local_err); }
@@ -82,7 +82,7 @@ void hmp_info_trace_events(Monitor *mon, const QDict *qdict) name ="*" ; } - events =qmp_trace_event_get_state (name, false,0 , &local_err); + events =qmp_trace_event_get_state (name, &local_err);if (local_err) {error_report_err (local_err);return ;
Signature · 1 line
2.41.0
Quoted 6 lines · Philippe Mathieu-Daudé
Remove
MEM_UNPLUG_ERRORand 'vcpu' field in TRACE events, all deprecated since long enough.Philippe Mathieu-Daudé (2):
hw/acpi: Remove the deprecated QAPIMEM_UNPLUG_ERRORevent
trace: Remove deprecated 'vcpu' field from QMP trace events
Quoted 12 lines
docs/about/deprecated.rst | 16 ---------------- docs/about/removed-features.rst | 15 +++++++++++++++ qapi/machine.json | 28 ---------------------------- qapi/trace.json | 27 +++------------------------ hw/acpi/memory_hotplug.c | 8 -------- hw/ppc/spapr.c | 11 +---------- trace/qmp.c | 2 -- trace/trace-hmp-cmds.c | 4 ++-- 8 files changed, 21 insertions(+), 90 deletions(-)Signature · 1 line
2.41.0
Quoted 2 lines · Philippe Mathieu-Daudé
Remove
MEM_UNPLUG_ERRORand 'vcpu' field in TRACE events, all deprecated since long enough.
Thank you!
Quoted 6 lines · Philippe Mathieu-Daudé
Remove
MEM_UNPLUG_ERRORand 'vcpu' field in TRACE events, all deprecated since long enough.Philippe Mathieu-Daudé (2):
hw/acpi: Remove the deprecated QAPIMEM_UNPLUG_ERRORevent
trace: Remove deprecated 'vcpu' field from QMP trace events
Thanks, series queued.