Peter Maydell
23eb9e6b6d
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-01-16' into staging
...
QAPI patches for 2017-01-16
# gpg: Signature made Mon 16 Jan 2017 09:26:49 GMT
# gpg: using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com >"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org >"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2017-01-16: (180 commits)
build-sys: add qapi doc generation targets
build-sys: add txt documentation rules
build-sys: use a generic TEXI2MAN rule
build-sys: remove dvi doc generation
build-sys: use --no-split for info
docs: add qemu logo to pdf
qapi: add qapi2texi script
qmp-events: move 'MIGRATION_PASS' doc to schema
qmp-events: move 'DUMP_COMPLETED' doc to schema
qmp-events: move 'MEM_UNPLUG_ERROR' doc to schema
qmp-events: move 'VSERPORT_CHANGE' doc to schema
qmp-events: move 'QUORUM_REPORT_BAD' doc to schema
qmp-events: move 'QUORUM_FAILURE' doc to schema
qmp-events: move 'GUEST_PANICKED' doc to schema
qmp-events: move 'BALLOON_CHANGE' doc to schema
qmp-events: move 'ACPI_DEVICE_OST' doc to schema
qmp-events: move 'MIGRATION' doc to schema
qmp-events: move 'SPICE_MIGRATE_COMPLETED' doc to schema
qmp-events: move 'SPICE_DISCONNECTED' doc to schema
qmp-events: move 'SPICE_INITIALIZED' doc to schema
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2017-01-17 13:53:50 +00:00
Paolo Bonzini
7c690fd193
aio: document locking
...
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
Reviewed-by: Fam Zheng <famz@redhat.com >
Message-id: 20170112180800.21085-10-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2017-01-16 13:25:18 +00:00
Paolo Bonzini
fbcc3e5004
qemu-thread: optimize QemuLockCnt with futexes on Linux
...
This is complex, but I think it is reasonably documented in the source.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
Reviewed-by: Fam Zheng <famz@redhat.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-id: 20170112180800.21085-5-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2017-01-16 13:25:18 +00:00
Paolo Bonzini
51dee5e465
qemu-thread: introduce QemuLockCnt
...
A QemuLockCnt comprises a counter and a mutex, with primitives
to increment and decrement the counter, and to take and release the
mutex. It can be used to do lock-free visits to a data structure
whenever mutexes would be too heavy-weight and the critical section
is too long for RCU.
This could be implemented simply by protecting the counter with the
mutex, but QemuLockCnt is harder to misuse and more efficient.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
Reviewed-by: Fam Zheng <famz@redhat.com >
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-id: 20170112180800.21085-3-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2017-01-16 13:25:17 +00:00
Marc-André Lureau
56e8bdd46a
build-sys: add qapi doc generation targets
...
Generate and install the man, txt and html versions of QAPI
documentation (generate and install qemu-doc.txt too).
Add it also to optional pdf/info targets.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-22-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 10:11:43 +01:00
Marc-André Lureau
c051a4c202
docs: add qemu logo to pdf
...
Add a logo to texi2pdf output. Other formats (info/html) are left as
future improvements.
The PDF (needed by texi2pdf for vectorized images) was generated from
pc-bios/qemu_logo.svg like this:
inkscape --export-pdf=docs/qemu_logo.pdf pc-bios/qemu_logo.svg
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20170113144135.5150-17-marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 10:11:43 +01:00
Marc-André Lureau
3313b6124b
qapi: add qapi2texi script
...
As the name suggests, the qapi2texi script converts JSON QAPI
description into a texi file suitable for different target
formats (info/man/txt/pdf/html...).
It parses the following kind of blocks:
Free-form:
##
# = Section
# == Subsection
#
# Some text foo with *emphasis*
# 1. with a list
# 2. like that
#
# And some code:
# | $ echo foo
# | -> do this
# | <- get that
#
##
Symbol description:
##
# @symbol:
#
# Symbol body ditto ergo sum. Foo bar
# baz ding.
#
# @param1: the frob to frobnicate
# @param2: #optional how hard to frobnicate
#
# Returns: the frobnicated frob.
# If frob isn't frobnicatable, GenericError.
#
# Since: version
# Notes: notes, comments can have
# - itemized list
# - like this
#
# Example:
#
# -> { "execute": "quit" }
# <- { "return": {} }
#
##
That's roughly following the following EBNF grammar:
api_comment = "##\n" comment "##\n"
comment = freeform_comment | symbol_comment
freeform_comment = { "# " text "\n" | "#\n" }
symbol_comment = "# @" name ":\n" { member | tag_section | freeform_comment }
member = "# @" name ':' [ text ] "\n" freeform_comment
tag_section = "# " ( "Returns:", "Since:", "Note:", "Notes:", "Example:", "Examples:" ) [ text ] "\n" freeform_comment
text = free text with markup
Note that the grammar is ambiguous: a line "# @foo:\n" can be parsed
both as freeform_comment and as symbol_comment. The actual parser
recognizes symbol_comment.
See docs/qapi-code-gen.txt for more details.
Deficiencies and limitations:
- the generated QMP documentation includes internal types
- union type support is lacking
- type information is lacking in generated documentation
- doc comment error message positions are imprecise, they point
to the beginning of the comment.
- a few minor issues, all marked TODO/FIXME in the code
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-16-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
[test-qapi.py tweaked to avoid trailing empty lines in .out]
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 10:10:35 +01:00
Marc-André Lureau
231aaf3a82
qmp-events: move 'MIGRATION_PASS' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:50 +01:00
Marc-André Lureau
a102a4acad
qmp-events: move 'DUMP_COMPLETED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:50 +01:00
Marc-André Lureau
e602f0b4e7
qmp-events: move 'MEM_UNPLUG_ERROR' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:50 +01:00
Marc-André Lureau
14df1ea168
qmp-events: move 'VSERPORT_CHANGE' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:50 +01:00
Marc-André Lureau
2ee7fea7ce
qmp-events: move 'QUORUM_REPORT_BAD' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:50 +01:00
Marc-André Lureau
9dcbe9a7e8
qmp-events: move 'QUORUM_FAILURE' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:50 +01:00
Marc-André Lureau
449dbec15a
qmp-events: move 'GUEST_PANICKED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
a030dc0029
qmp-events: move 'BALLOON_CHANGE' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
622b3a6a51
qmp-events: move 'ACPI_DEVICE_OST' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
bce911ce26
qmp-events: move 'MIGRATION' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
e6bcb080f9
qmp-events: move 'SPICE_MIGRATE_COMPLETED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
93ab0fc3c3
qmp-events: move 'SPICE_DISCONNECTED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
da08e2a5a2
qmp-events: move 'SPICE_INITIALIZED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
5db6670347
qmp-events: move 'SPICE_CONNECTED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
659789ba36
qmp-events: move 'VNC_DISCONNECTED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
99ab2471a4
qmp-events: move 'VNC_INITIALIZED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
f46052fd13
qmp-events: move 'VNC_CONNECTED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
5dbdcf4324
qmp-events: move 'NIC_RX_FILTER_CHANGED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
cdc94a1b3e
qmp-events: move 'DEVICE_DELETED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
9ba5cec9dd
qmp-events: move 'WATCHDOG' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
73c41bfd31
qmp-events: move 'RTC_CHANGE' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
aa496f9812
qmp-events: move 'WAKEUP' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
4de62c38a5
qmp-events: move 'SUSPEND_DISK' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
6f3cc5406b
qmp-events: move 'SUSPEND' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:49 +01:00
Marc-André Lureau
a2235a0499
qmp-events: move 'RESUME' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
138c454c0f
qmp-events: move 'STOP' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
7a2aae7a36
qmp-events: move 'RESET' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
189d43bed6
qmp-events: move 'POWERDOWN' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
12defe50f8
qmp-events: move 'SHUTDOWN' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
01b7d4be5c
qmp-events: move 'DEVICE_TRAY_MOVED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
11a3dee1b9
qmp-events: move 'BLOCK_JOB_READY' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
af0e09106c
qmp-events: move 'BLOCK_JOB_ERROR' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
e161df3939
qmp-events: move 'BLOCK_JOB_CANCELLED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
e21e65b212
qmp-events: move 'BLOCK_JOB_COMPLETED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
07c9f583d5
qmp-events: move 'BLOCK_IO_ERROR' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
370d4eba7d
qmp-events: move 'BLOCK_IMAGE_CORRUPTED' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
4d8bb958fa
qmp-commands: move documentation bits to schema
...
Moving the remaining bits of documentation to the json
file (text improvements is not the objective of this patch)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
0ea87df506
qmp-commands: remove device_add from txt
...
It's already fully described in the schema. Fix the schema to document
the command and not the argument (place doc before first arg).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
adcbc0d997
qmp-commands: remove cpu from txt
...
The cpu command is deprecated since commit 755f196898 .
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
bf4914731f
qmp-commands: remove qmp_capabilities from txt
...
It's better described in the schema already.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
add1d10065
qmp-commands: remove query-qmp-schema from txt
...
It's better described in the schema already.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:48 +01:00
Marc-André Lureau
c08d64434a
qmp-commands: move 'x-colo-lost-heartbeat' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:47 +01:00
Marc-André Lureau
7d1182d989
qmp-commands: move 'xen-load-devices-state' doc to schema
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:19:47 +01:00