qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c

These days device-hotplug.c only contains the hmp_drive_add
In the next patch, rest of hmp_drive* functions will be moved
there.

Also add block-hmp-cmds.h to contain prototypes of these
functions

License for block-hmp-cmds.h since it contains the code
moved from sysemu.h which lacks license and thus according
to LICENSE is under GPLv2+

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200308092440.23564-4-mlevitsk@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

authored by

Maxim Levitsky and committed by
Dr. David Alan Gilbert
a2dde2f2 6700d3d6

+23 -5
+1
MAINTAINERS
··· 1920 1920 M: Markus Armbruster <armbru@redhat.com> 1921 1921 S: Supported 1922 1922 F: blockdev.c 1923 + F: blockdev-hmp-cmds.c 1923 1924 F: block/qapi.c 1924 1925 F: qapi/block*.json 1925 1926 F: qapi/transaction.json
+1 -1
Makefile.objs
··· 48 48 common-obj-y += job-qmp.o 49 49 common-obj-y += monitor/ 50 50 common-obj-y += net/ 51 - common-obj-y += qdev-monitor.o device-hotplug.o 51 + common-obj-y += qdev-monitor.o 52 52 common-obj-$(CONFIG_WIN32) += os-win32.o 53 53 common-obj-$(CONFIG_POSIX) += os-posix.o 54 54
+1
block/Makefile.objs
··· 45 45 block-obj-y += aio_task.o 46 46 block-obj-y += backup-top.o 47 47 block-obj-y += filter-compress.o 48 + common-obj-y += monitor/ 48 49 49 50 block-obj-y += stream.o 50 51
+1
block/monitor/Makefile.objs
··· 1 + common-obj-y += block-hmp-cmds.o
+2 -1
device-hotplug.c block/monitor/block-hmp-cmds.c
··· 1 1 /* 2 - * QEMU device hotplug helpers 2 + * Blockdev HMP commands 3 3 * 4 4 * Copyright (c) 2004 Fabrice Bellard 5 5 * ··· 33 33 #include "sysemu/sysemu.h" 34 34 #include "monitor/monitor.h" 35 35 #include "block/block_int.h" 36 + #include "block/block-hmp-cmds.h" 36 37 37 38 38 39 void hmp_drive_add(Monitor *mon, const QDict *qdict)
+16
include/block/block-hmp-cmds.h
··· 1 + /* 2 + * HMP commands related to the block layer 3 + * 4 + * Copyright (c) 2020 Red Hat, Inc. 5 + * 6 + * This work is licensed under the terms of the GNU GPL, version 2. 7 + * or (at your option) any later version. 8 + * See the COPYING file in the top-level directory. 9 + */ 10 + 11 + #ifndef BLOCK_HMP_COMMANDS_H 12 + #define BLOCK_HMP_COMMANDS_H 13 + 14 + void hmp_drive_add(Monitor *mon, const QDict *qdict); 15 + 16 + #endif
-3
include/sysemu/sysemu.h
··· 63 63 extern const char *prom_envs[MAX_PROM_ENVS]; 64 64 extern unsigned int nb_prom_envs; 65 65 66 - /* generic hotplug */ 67 - void hmp_drive_add(Monitor *mon, const QDict *qdict); 68 - 69 66 /* pcie aer error injection */ 70 67 void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict); 71 68
+1
monitor/misc.c
··· 66 66 #include "qemu/option.h" 67 67 #include "qemu/thread.h" 68 68 #include "block/qapi.h" 69 + #include "block/block-hmp-cmds.h" 69 70 #include "qapi/qapi-commands-char.h" 70 71 #include "qapi/qapi-commands-control.h" 71 72 #include "qapi/qapi-commands-migration.h"