qapi: Extract QAPI block and common definitions.

qapi/common.json contains the definitions required by all the json modules.

qapi/block-core.json contains the block QAPI part unrelated to system
emulation.

qapi/block.json is a superset of qapi/block-core.json and contains all block
QAPI definitions required for system emulation.

The purpose of the patch is to be able to generate C sources and headers from
qapi/block-core.json and link their object file against qemu-nbd.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qmp: Extract system emulation related code from qmp.c into qmp-system.c

This patch will allow to link qmp.o with utility binaries without dragging too
much unrelated object files and externals dependencies.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qemu-nbd: build QAPI block core into qemu-nbd

Compile and link QAPI block core code into qmu-nbd.

This patch circle around unwanted dependecies by stubing some functions in
qmp-stub.c.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
monitor: Split monitor in two parts: core and system.

Since we want to link the monitor.c code with qemu-nbd this patch extracts
system related parts and put them in a separate C module.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qapi: Add a script to filter qmp-commands-old.h to generate a subset of it.

Since qmp-command-olds.h is generated from qmp-commands.hw we will sometime want
to include only a subset of it. For example when linking qapi block commands
with qemu-nbd.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qemu-nbd: Add -qmp option to qemu-nbd.

This patch add a -qmp parameter to the qemu-nbd command line in order to be able
to manipulate the qemu-nbd block devices via qmp.

This could be used with containers to easily migrate from qemy/kvm to a container.

Signed-off-by: Benoit Canet <benoit@irqsave.net>