2012-11-16 21:35:27 +04:00
|
|
|
#######################################################################
|
2012-12-20 19:10:26 +04:00
|
|
|
# Common libraries for tools and emulators
|
2015-10-31 08:39:52 +03:00
|
|
|
stub-obj-y = stubs/ crypto/
|
qapi: New QMP command query-qmp-schema for QMP introspection
qapi/introspect.json defines the introspection schema. It's designed
for QMP introspection, but should do for similar uses, such as QGA.
The introspection schema does not reflect all the rules and
restrictions that apply to QAPI schemata. A valid QAPI schema has an
introspection value conforming to the introspection schema, but the
converse is not true.
Introspection lowers away a number of schema details, and makes
implicit things explicit:
* The built-in types are declared with their JSON type.
All integer types are mapped to 'int', because how many bits we use
internally is an implementation detail. It could be pressed into
external interface service as very approximate range information,
but that's a bad idea. If we need range information, we better do
it properly.
* Implicit type definitions are made explicit, and given
auto-generated names:
- Array types, named by appending "List" to the name of their
element type, like in generated C.
- The enumeration types implicitly defined by simple union types,
named by appending "Kind" to the name of their simple union type,
like in generated C.
- Types that don't occur in generated C. Their names start with ':'
so they don't clash with the user's names.
* All type references are by name.
* The struct and union types are generalized into an object type.
* Base types are flattened.
* Commands take a single argument and return a single result.
Dictionary argument or list result is an implicit type definition.
The empty object type is used when a command takes no arguments or
produces no results.
The argument is always of object type, but the introspection schema
doesn't reflect that.
The 'gen': false directive is omitted as implementation detail.
The 'success-response' directive is omitted as well for now, even
though it's not an implementation detail, because it's not used by
QMP.
* Events carry a single data value.
Implicit type definition and empty object type use, just like for
commands.
The value is of object type, but the introspection schema doesn't
reflect that.
* Types not used by commands or events are omitted.
Indirect use counts as use.
* Optional members have a default, which can only be null right now
Instead of a mandatory "optional" flag, we have an optional default.
No default means mandatory, default null means optional without
default value. Non-null is available for optional with default
(possible future extension).
* Clients should *not* look up types by name, because type names are
not ABI. Look up the command or event you're interested in, then
follow the references.
TODO Should we hide the type names to eliminate the temptation?
New generator scripts/qapi-introspect.py computes an introspection
value for its input, and generates a C variable holding it.
It can generate awfully long lines. Marked TODO.
A new test-qmp-input-visitor test case feeds its result for both
tests/qapi-schema/qapi-schema-test.json and qapi-schema.json to a
QmpInputVisitor to verify it actually conforms to the schema.
New QMP command query-qmp-schema takes its return value from that
variable. Its reply is some 85KiBytes for me right now.
If this turns out to be too much, we have a couple of options:
* We can use shorter names in the JSON. Not the QMP style.
* Optionally return the sub-schema for commands and events given as
arguments.
Right now qmp_query_schema() sends the string literal computed by
qmp-introspect.py. To compute sub-schema at run time, we'd have to
duplicate parts of qapi-introspect.py in C. Unattractive.
* Let clients cache the output of query-qmp-schema.
It changes only on QEMU upgrades, i.e. rarely. Provide a command
query-qmp-schema-hash. Clients can have a cache indexed by hash,
and re-query the schema only when they don't have it cached. Even
simpler: put the hash in the QMP greeting.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-09-16 14:06:28 +03:00
|
|
|
util-obj-y = util/ qobject/ qapi/
|
|
|
|
util-obj-y += qmp-introspect.o qapi-types.o qapi-visit.o qapi-event.o
|
2012-11-16 21:35:27 +04:00
|
|
|
|
2010-01-06 22:24:05 +03:00
|
|
|
#######################################################################
|
|
|
|
# block-obj-y is code used by both qemu system emulation and qemu-img
|
|
|
|
|
2012-12-20 19:09:36 +04:00
|
|
|
block-obj-y = async.o thread-pool.o
|
2016-01-14 11:41:02 +03:00
|
|
|
block-obj-y += nbd/
|
|
|
|
block-obj-y += block.o blockjob.o
|
2012-12-20 19:09:36 +04:00
|
|
|
block-obj-y += main-loop.o iohandler.o qemu-timer.o
|
|
|
|
block-obj-$(CONFIG_POSIX) += aio-posix.o
|
|
|
|
block-obj-$(CONFIG_WIN32) += aio-win32.o
|
2012-05-22 15:44:39 +04:00
|
|
|
block-obj-y += block/
|
2013-06-05 16:19:41 +04:00
|
|
|
block-obj-y += qemu-io-cmds.o
|
2016-07-27 10:01:49 +03:00
|
|
|
block-obj-$(CONFIG_REPLICATION) += replication.o
|
2010-01-06 22:24:05 +03:00
|
|
|
|
2014-02-10 10:48:59 +04:00
|
|
|
block-obj-m = block/
|
|
|
|
|
2015-09-02 12:57:27 +03:00
|
|
|
#######################################################################
|
|
|
|
# crypto-obj-y is code used by both qemu system emulation and qemu-img
|
|
|
|
|
|
|
|
crypto-obj-y = crypto/
|
|
|
|
crypto-aes-obj-y = crypto/
|
2010-04-29 16:14:43 +04:00
|
|
|
|
2015-09-02 13:18:16 +03:00
|
|
|
#######################################################################
|
|
|
|
# qom-obj-y is code used by both qemu system emulation and qemu-img
|
|
|
|
|
|
|
|
qom-obj-y = qom/
|
|
|
|
|
2015-02-27 19:19:33 +03:00
|
|
|
#######################################################################
|
|
|
|
# io-obj-y is code used by both qemu system emulation and qemu-img
|
|
|
|
|
|
|
|
io-obj-y = io/
|
|
|
|
|
2010-01-06 22:24:05 +03:00
|
|
|
######################################################################
|
2011-11-15 16:47:11 +04:00
|
|
|
# Target independent part of system emulation. The long term path is to
|
|
|
|
# suppress *all* target specific code in case of system emulation, i.e. a
|
|
|
|
# single QEMU executable should support all CPUs and machines.
|
2010-01-06 22:24:05 +03:00
|
|
|
|
2013-01-19 14:06:47 +04:00
|
|
|
ifeq ($(CONFIG_SOFTMMU),y)
|
2014-02-10 10:48:52 +04:00
|
|
|
common-obj-y = blockdev.o blockdev-nbd.o block/
|
2014-03-03 14:30:05 +04:00
|
|
|
common-obj-y += iothread.o
|
2012-10-24 13:27:28 +04:00
|
|
|
common-obj-y += net/
|
2013-02-04 20:20:47 +04:00
|
|
|
common-obj-y += qdev-monitor.o device-hotplug.o
|
2010-06-12 09:49:30 +04:00
|
|
|
common-obj-$(CONFIG_WIN32) += os-win32.o
|
|
|
|
common-obj-$(CONFIG_POSIX) += os-posix.o
|
2010-05-21 13:54:32 +04:00
|
|
|
|
2012-05-22 15:46:08 +04:00
|
|
|
common-obj-$(CONFIG_LINUX) += fsdev/
|
|
|
|
|
2014-12-12 14:13:38 +03:00
|
|
|
common-obj-y += migration/
|
2011-12-20 17:59:12 +04:00
|
|
|
common-obj-y += qemu-char.o #aio.o
|
2014-12-12 14:13:38 +03:00
|
|
|
common-obj-y += page_cache.o
|
2010-01-06 22:24:05 +03:00
|
|
|
|
2012-05-22 15:48:15 +04:00
|
|
|
common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
|
2012-05-22 15:49:02 +04:00
|
|
|
|
|
|
|
common-obj-y += audio/
|
2012-05-29 13:08:47 +04:00
|
|
|
common-obj-y += hw/
|
2014-09-27 00:45:17 +04:00
|
|
|
common-obj-y += accel.o
|
2012-12-17 21:17:08 +04:00
|
|
|
|
2015-09-17 19:23:37 +03:00
|
|
|
common-obj-y += replay/
|
|
|
|
|
2012-05-22 15:48:15 +04:00
|
|
|
common-obj-y += ui/
|
2012-05-29 13:08:47 +04:00
|
|
|
common-obj-y += bt-host.o bt-vhci.o
|
2014-05-02 15:40:53 +04:00
|
|
|
bt-host.o-cflags := $(BLUEZ_CFLAGS)
|
2010-07-07 22:57:52 +04:00
|
|
|
|
2012-10-05 21:39:33 +04:00
|
|
|
common-obj-y += dma-helpers.o
|
|
|
|
common-obj-y += vl.o
|
2014-05-02 15:40:53 +04:00
|
|
|
vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
|
2013-04-02 20:28:41 +04:00
|
|
|
common-obj-y += tpm.o
|
2010-01-06 22:24:05 +03:00
|
|
|
|
2012-05-22 15:49:43 +04:00
|
|
|
common-obj-$(CONFIG_SLIRP) += slirp/
|
2010-01-06 22:24:05 +03:00
|
|
|
|
2012-06-25 19:03:47 +04:00
|
|
|
common-obj-y += backends/
|
|
|
|
|
2013-01-19 14:06:46 +04:00
|
|
|
common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
|
2012-08-15 01:44:05 +04:00
|
|
|
|
2015-05-24 23:20:14 +03:00
|
|
|
common-obj-$(CONFIG_FDT) += device_tree.o
|
|
|
|
|
2011-07-19 23:50:32 +04:00
|
|
|
######################################################################
|
|
|
|
# qapi
|
|
|
|
|
2013-05-06 20:20:07 +04:00
|
|
|
common-obj-y += qmp-marshal.o
|
qapi: New QMP command query-qmp-schema for QMP introspection
qapi/introspect.json defines the introspection schema. It's designed
for QMP introspection, but should do for similar uses, such as QGA.
The introspection schema does not reflect all the rules and
restrictions that apply to QAPI schemata. A valid QAPI schema has an
introspection value conforming to the introspection schema, but the
converse is not true.
Introspection lowers away a number of schema details, and makes
implicit things explicit:
* The built-in types are declared with their JSON type.
All integer types are mapped to 'int', because how many bits we use
internally is an implementation detail. It could be pressed into
external interface service as very approximate range information,
but that's a bad idea. If we need range information, we better do
it properly.
* Implicit type definitions are made explicit, and given
auto-generated names:
- Array types, named by appending "List" to the name of their
element type, like in generated C.
- The enumeration types implicitly defined by simple union types,
named by appending "Kind" to the name of their simple union type,
like in generated C.
- Types that don't occur in generated C. Their names start with ':'
so they don't clash with the user's names.
* All type references are by name.
* The struct and union types are generalized into an object type.
* Base types are flattened.
* Commands take a single argument and return a single result.
Dictionary argument or list result is an implicit type definition.
The empty object type is used when a command takes no arguments or
produces no results.
The argument is always of object type, but the introspection schema
doesn't reflect that.
The 'gen': false directive is omitted as implementation detail.
The 'success-response' directive is omitted as well for now, even
though it's not an implementation detail, because it's not used by
QMP.
* Events carry a single data value.
Implicit type definition and empty object type use, just like for
commands.
The value is of object type, but the introspection schema doesn't
reflect that.
* Types not used by commands or events are omitted.
Indirect use counts as use.
* Optional members have a default, which can only be null right now
Instead of a mandatory "optional" flag, we have an optional default.
No default means mandatory, default null means optional without
default value. Non-null is available for optional with default
(possible future extension).
* Clients should *not* look up types by name, because type names are
not ABI. Look up the command or event you're interested in, then
follow the references.
TODO Should we hide the type names to eliminate the temptation?
New generator scripts/qapi-introspect.py computes an introspection
value for its input, and generates a C variable holding it.
It can generate awfully long lines. Marked TODO.
A new test-qmp-input-visitor test case feeds its result for both
tests/qapi-schema/qapi-schema-test.json and qapi-schema.json to a
QmpInputVisitor to verify it actually conforms to the schema.
New QMP command query-qmp-schema takes its return value from that
variable. Its reply is some 85KiBytes for me right now.
If this turns out to be too much, we have a couple of options:
* We can use shorter names in the JSON. Not the QMP style.
* Optionally return the sub-schema for commands and events given as
arguments.
Right now qmp_query_schema() sends the string literal computed by
qmp-introspect.py. To compute sub-schema at run time, we'd have to
duplicate parts of qapi-introspect.py in C. Unattractive.
* Let clients cache the output of query-qmp-schema.
It changes only on QEMU upgrades, i.e. rarely. Provide a command
query-qmp-schema-hash. Clients can have a cache indexed by hash,
and re-query the schema only when they don't have it cached. Even
simpler: put the hash in the QMP greeting.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-09-16 14:06:28 +03:00
|
|
|
common-obj-y += qmp-introspect.o
|
2011-09-02 21:34:48 +04:00
|
|
|
common-obj-y += qmp.o hmp.o
|
2013-01-19 14:06:47 +04:00
|
|
|
endif
|
2011-09-02 21:34:47 +04:00
|
|
|
|
2012-12-20 18:24:49 +04:00
|
|
|
#######################################################################
|
|
|
|
# Target-independent parts used in system and user emulation
|
2016-06-28 21:37:27 +03:00
|
|
|
common-obj-y += cpus-common.o
|
2013-01-19 14:06:47 +04:00
|
|
|
common-obj-y += hw/
|
|
|
|
common-obj-y += qom/
|
|
|
|
common-obj-y += disas/
|
2012-03-05 00:32:36 +04:00
|
|
|
|
2013-08-08 22:18:07 +04:00
|
|
|
######################################################################
|
|
|
|
# Resource file for Windows executables
|
|
|
|
version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
|
|
|
|
|
2014-05-30 16:11:56 +04:00
|
|
|
######################################################################
|
|
|
|
# tracing
|
|
|
|
util-obj-y += trace/
|
|
|
|
target-obj-y += trace/
|
|
|
|
|
2011-08-12 00:38:12 +04:00
|
|
|
######################################################################
|
|
|
|
# guest agent
|
|
|
|
|
2012-12-20 18:03:18 +04:00
|
|
|
# FIXME: a few definitions from qapi-types.o/qapi-visit.o are needed
|
|
|
|
# by libqemuutil.a. These should be moved to a separate .json schema.
|
2014-08-07 06:34:41 +04:00
|
|
|
qga-obj-y = qga/
|
qemu-ga: Add Windows VSS provider and requester as DLL
Adds VSS provider and requester as a qga-vss.dll, which is loaded by
Windows VSS service as well as by qemu-ga.
"provider.cpp" implements a basic stub of a software VSS provider.
Currently, this module only relays a frozen event from VSS service to the
agent, and thaw event from the agent to VSS service, to block VSS process
to keep the system frozen while snapshots are taken at the host.
To register the provider to the guest system as COM+ application, the type
library (.tlb) for qga-vss.dll is required. To build it from COM IDL (.idl),
VisualC++, MIDL and stdole2.tlb in Windows SDK are required. This patch also
adds pre-compiled .tlb file in the repository in order to enable
cross-compile qemu-ga.exe for Windows with VSS support.
"requester.cpp" provides the VSS requester to kick the VSS snapshot process.
Qemu-ga.exe works without the DLL, although fsfreeze features are disabled.
These functions are only supported in Windows 2003 or later. In older
systems, fsfreeze features are disabled.
In several versions of Windows which don't support attribute
VSS_VOLSNAP_ATTR_NO_AUTORECOVERY, DoSnapshotSet fails with error
VSS_E_OBJECT_NOT_FOUND. In this patch, we just ignore this error.
To solve this fundamentally, we need a framework to handle mount writable
snapshot on guests, which is required by VSS auto-recovery feature
(cleanup phase after a snapshot is taken).
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-08-07 19:40:18 +04:00
|
|
|
qga-vss-dll-obj-y = qga/
|
2014-09-08 13:17:48 +04:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# contrib
|
|
|
|
ivshmem-client-obj-y = contrib/ivshmem-client/
|
|
|
|
ivshmem-server-obj-y = contrib/ivshmem-server/
|
contrib: add libvhost-user
Add a library to help implementing vhost-user backend (or slave).
Dealing with vhost-user as an application developer isn't so easy: you
have all the trouble with any protocol: validation, unix ancillary data,
shared memory, eventfd, logging, and on top of that you need to deal
with virtio queues, if possible efficiently.
qemu test has a nice vhost-user testing application vhost-user-bridge,
which implements most of vhost-user, and virtio.c which implements
virtqueues manipulation. Based on these two, I tried to make a simple
library, reusable for tests or development of new vhost-user scenarios.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[Felipe: set used_idx copy on SET_VRING_ADDR and update shadow avail idx
on SET_VRING_BASE]
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-10-18 12:24:04 +03:00
|
|
|
libvhost-user-obj-y = contrib/libvhost-user/
|
2016-06-16 11:39:47 +03:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
trace-events-y = trace-events
|
2016-06-16 11:39:48 +03:00
|
|
|
trace-events-y += util/trace-events
|
2016-06-16 11:39:49 +03:00
|
|
|
trace-events-y += crypto/trace-events
|
2016-06-16 11:39:50 +03:00
|
|
|
trace-events-y += io/trace-events
|
2016-06-16 11:39:51 +03:00
|
|
|
trace-events-y += migration/trace-events
|
2016-06-16 11:39:52 +03:00
|
|
|
trace-events-y += block/trace-events
|
2016-06-16 11:39:53 +03:00
|
|
|
trace-events-y += hw/block/trace-events
|
2016-06-16 11:39:54 +03:00
|
|
|
trace-events-y += hw/char/trace-events
|
2016-06-16 11:39:55 +03:00
|
|
|
trace-events-y += hw/intc/trace-events
|
2016-06-16 11:39:56 +03:00
|
|
|
trace-events-y += hw/net/trace-events
|
2016-06-16 11:39:57 +03:00
|
|
|
trace-events-y += hw/virtio/trace-events
|
2016-06-16 11:39:58 +03:00
|
|
|
trace-events-y += hw/audio/trace-events
|
2016-06-16 11:39:59 +03:00
|
|
|
trace-events-y += hw/misc/trace-events
|
2016-06-16 11:40:00 +03:00
|
|
|
trace-events-y += hw/usb/trace-events
|
2016-06-16 11:40:01 +03:00
|
|
|
trace-events-y += hw/scsi/trace-events
|
2016-06-16 11:40:02 +03:00
|
|
|
trace-events-y += hw/nvram/trace-events
|
2016-06-16 11:40:03 +03:00
|
|
|
trace-events-y += hw/display/trace-events
|
2016-06-16 11:40:04 +03:00
|
|
|
trace-events-y += hw/input/trace-events
|
2016-06-16 11:40:05 +03:00
|
|
|
trace-events-y += hw/timer/trace-events
|
2016-06-16 11:40:06 +03:00
|
|
|
trace-events-y += hw/dma/trace-events
|
2016-06-16 11:40:07 +03:00
|
|
|
trace-events-y += hw/sparc/trace-events
|
2016-06-16 11:40:08 +03:00
|
|
|
trace-events-y += hw/sd/trace-events
|
2016-06-16 11:40:09 +03:00
|
|
|
trace-events-y += hw/isa/trace-events
|
2016-09-14 20:03:43 +03:00
|
|
|
trace-events-y += hw/mem/trace-events
|
2016-06-16 11:40:10 +03:00
|
|
|
trace-events-y += hw/i386/trace-events
|
2016-06-16 11:40:11 +03:00
|
|
|
trace-events-y += hw/9pfs/trace-events
|
2016-06-16 11:40:12 +03:00
|
|
|
trace-events-y += hw/ppc/trace-events
|
2016-06-16 11:40:13 +03:00
|
|
|
trace-events-y += hw/pci/trace-events
|
2016-06-16 11:40:14 +03:00
|
|
|
trace-events-y += hw/s390x/trace-events
|
2016-06-16 11:40:15 +03:00
|
|
|
trace-events-y += hw/vfio/trace-events
|
2016-06-16 11:40:16 +03:00
|
|
|
trace-events-y += hw/acpi/trace-events
|
2016-06-16 11:40:17 +03:00
|
|
|
trace-events-y += hw/arm/trace-events
|
2016-06-16 11:40:18 +03:00
|
|
|
trace-events-y += hw/alpha/trace-events
|
2016-06-16 11:40:19 +03:00
|
|
|
trace-events-y += ui/trace-events
|
2016-06-16 11:40:20 +03:00
|
|
|
trace-events-y += audio/trace-events
|
2016-06-16 11:40:21 +03:00
|
|
|
trace-events-y += net/trace-events
|
2016-10-11 09:56:52 +03:00
|
|
|
trace-events-y += target/arm/trace-events
|
|
|
|
trace-events-y += target/i386/trace-events
|
|
|
|
trace-events-y += target/sparc/trace-events
|
|
|
|
trace-events-y += target/s390x/trace-events
|
|
|
|
trace-events-y += target/ppc/trace-events
|
2016-06-16 11:40:25 +03:00
|
|
|
trace-events-y += qom/trace-events
|
2016-06-16 11:40:26 +03:00
|
|
|
trace-events-y += linux-user/trace-events
|
2016-09-30 17:45:26 +03:00
|
|
|
trace-events-y += qapi/trace-events
|