Marc-André Lureau
8046bf53ba
qmp-commands: move 'quit' 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:15:27 +01:00
Marc-André Lureau
3fc3aa6de9
qmp-commands: move 'query-pci' 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:15:27 +01:00
Marc-André Lureau
f504e3dc21
qmp-commands: move 'query-balloon' 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:15:27 +01:00
Marc-André Lureau
bc7e260271
qmp-commands: move 'query-spice' 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:15:26 +01:00
Marc-André Lureau
85f9654910
qmp-commands: move 'query-vnc' 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:15:26 +01:00
Marc-André Lureau
fdf4d34f83
qmp-commands: move 'query-iothreads' 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:15:26 +01:00
Marc-André Lureau
5c5bee6418
qmp-commands: move 'query-cpus' 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:15:26 +01:00
Marc-André Lureau
60639df5c2
qmp-commands: move 'query-mice' 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:15:26 +01:00
Marc-André Lureau
3c3ea00a8c
qmp-commands: move 'migrate-start-postcopy' 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:15:26 +01:00
Marc-André Lureau
d0d3fc7ff9
qmp-commands: move 'client_migrate_info' 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:15:26 +01:00
Marc-André Lureau
cf56cfad3c
qmp-commands: move 'query-migrate-parameters' 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:15:26 +01:00
Marc-André Lureau
35db41e5dc
qmp-commands: move 'migrate-set-parameters' 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:15:26 +01:00
Marc-André Lureau
135b238e5d
qmp-commands: move 'query-migrate-capabilities' 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:15:26 +01:00
Marc-André Lureau
0a0bb96442
qmp-commands: move 'migrate-set-capabilities' 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:15:26 +01:00
Marc-André Lureau
104b1caf05
qmp-commands: move 'query-migrate' 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:15:26 +01:00
Marc-André Lureau
66c2f5a56c
qmp-commands: move 'query-events' 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:15:26 +01:00
Marc-André Lureau
4f19a01b3e
qmp-commands: move 'ringbuf-read' 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:15:26 +01:00
Marc-André Lureau
a4143a845a
qmp-commands: move 'ringbuf-write' 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:15:25 +01:00
Marc-André Lureau
90e365c054
qmp-commands: move 'query-chardev-backends' 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:15:25 +01:00
Marc-André Lureau
4055aa8d40
qmp-commands: move 'query-chardev' 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:15:25 +01:00
Marc-André Lureau
0ed90f77e8
qmp-commands: move 'query-uuid' 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:15:25 +01:00
Marc-André Lureau
477bc1e4f1
qmp-commands: move 'query-status' 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:15:25 +01:00
Marc-André Lureau
b4f65cd27a
qmp-commands: move 'query-kvm' 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:15:25 +01:00
Marc-André Lureau
3aa4c6cd39
qmp-commands: move 'query-name' 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:15:25 +01:00
Marc-André Lureau
65ce54f5e2
qmp-commands: move 'add_client' 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:15:25 +01:00
Marc-André Lureau
eaea2bf72f
texi2pod: learn quotation, deftp and deftypefn
...
Learn a few more markups used for API documentation.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-14-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:25 +01:00
Marc-André Lureau
4148c298d8
qapi: rework qapi Exception
...
Use a base class QAPIError, and QAPIParseError for parser errors and
QAPISemError for semantic errors, suggested by Markus Armbruster.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20170113144135.5150-12-marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:25 +01:00
Marc-André Lureau
91d00e57a1
docs: add master qapi texi files
...
The qapi2texi script generates a file to be included in a texi file. Add
"QEMU QMP Reference Manual" and "QEMU Guest Agent Protocol Reference"
master texi files.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20170113144135.5150-11-marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:25 +01:00
Marc-André Lureau
d3a48372a4
qapi: add some sections in docs
...
Add some more section titles to organize the documentation we're going
to generate.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20170113144135.5150-10-marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:25 +01:00
Marc-André Lureau
7a305384e8
qapi: Move "command is experimental" notes down
...
Move these notes down and prefix with "Note:", to please the doc
generator we're going to add.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-9-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
[Commit message tweaked]
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:25 +01:00
Marc-André Lureau
5807ff88b1
qapi: Reorder doc comments for future doc generator
...
The doc generator we're going to add expects a fairly rigid doc
comment structure. Reorder / rephrase some doc comments to please it.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-8-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
[Commit message rewritten]
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:25 +01:00
Marc-André Lureau
ae4dbed0fe
qga/schema: improve guest-set-vcpus Returns: section
...
Itemize the possible return values of guest-set-vcpus.
Drop the blank lines for consistency with itemized
lists elsewhere.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20170113144135.5150-7-marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:24 +01:00
Marc-André Lureau
41dc1dc066
qapi: improve TransactionAction doc
...
TransactionAction is a flat union, document 'type' versions
exhaustively, and sort the members.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20170113144135.5150-6-marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:24 +01:00
Marc-André Lureau
b780e9c3f2
qapi: improve device_add schema
...
'device_add' is still incomplete for now, but we can fix a few
arguments:
- 'bus' is a common argument, regardless of the device
- 'id' is an optional argument
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Eric Blake <eblake@redhat.com >
Message-Id: <20170113144135.5150-5-marcandre.lureau@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:24 +01:00
Marc-André Lureau
e22da431a7
qapi: Format TODO comments more consistently
...
Consistently put a colon after TODO. This will make the TODOs stand
out in the documentation we're going to generate.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-4-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
[Commit message rewritten]
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:24 +01:00
Marc-André Lureau
515b17c27c
qapi: move QKeyCode doc body at the top
...
Following documentation guidelines.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-3-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:24 +01:00
Marc-André Lureau
3df58d4115
qapi: replace 'o' for list items
...
Replace with '*', the common form for list items.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20170113144135.5150-2-marcandre.lureau@redhat.com >
Reviewed-by: Markus Armbruster <armbru@redhat.com >
Signed-off-by: Markus Armbruster <armbru@redhat.com >
2017-01-16 09:15:24 +01:00
Max Filippov
8b912ff033
target/xtensa: tests: clean up interrupt tests
...
Don't use hardcoded software interrupt masks, use XCHAL macros.
Mask off timer interrupt bits that are not checked for.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:36:09 -08:00
Max Filippov
255d254382
target/xtensa: tests: add memctl test
...
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
9e03ade441
target/xtensa: implement MEMCTL SR
...
MEMCTL SR controls zero overhead loop buffer and number of ways enabled
in L1 caches.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
4b37aaa879
target/xtensa: fix ICACHE/DCACHE options detection
...
Configuration overlay does not explicitly say whether there are ICACHE
and DCACHE in the core. Current code uses XCHAL_[ID]CACHE_WAYS to detect
if corresponding cache option is enabled, but that's not correct: on
cores without cache these macros are defined as 1, not as 0.
Check XCHAL_[ID]CACHE_SIZE instead.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
0a362d0768
target/xtensa: tests: add ccount write tests
...
Check that CCOUNT SR is writable and that CCOMPARE timers are updated
when CCOUNT is written to.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
4f89b41c28
target/xtensa: tests: replace hardcoded interrupt masks
...
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
72b3b8f24a
target/xtensa: tests: fix timer tests
...
Don't expect that CCOUNT increments are equal to the number of executed
instructions. Verify that timer interrupt does not fire before the
programmed CCOMPARE value and does fire after.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
122d302053
target/xtensa: tests: run tests with icount
...
Timer tests expect certain determinism in CCOUNT updates and timer
interrupts firing. Run QEMU with -icount to get deterministic results.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
787eaa4904
target/xtensa: don't continue translation after exception
...
There's no point in continuing translating guest instructions once an
unconditional exception is thrown.
There's also no point in updating pc before any instruction is
translated, don't do it.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
d2132510ca
target/xtensa: support icount
...
Delimit each instruction that may access timers or IRQ state with
qemu_io_start/qemu_io_end, so that qemu-system-xtensa could be run with
-icount option.
Raise EXCP_YIELD after CCOMPARE reprogramming to let tcg_cpu_exec
recalculate how long this CPU is allowed to run.
RSR now may need to terminate TB, but it can't be done in RSR handler
because the same handler is used for XSR together with WSR handler, which
may also need to terminate TB. Change RSR and WSR handlers return type
to bool indicating whether TB termination is needed (RSR) or has been
done (WSR), and add TB termination after RSR/WSR dispatcher call.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:56 -08:00
Max Filippov
59a71f7578
target/xtensa: refactor CCOUNT/CCOMPARE
...
Xtensa cores may have a register (CCOUNT) that counts core clock cycles.
It may also have a number of registers (CCOMPAREx); when CCOUNT value
passes the value of CCOMPAREx, timer interrupt x is raised.
Currently xtensa target counts a number of completed instructions and
assumes that for CCOUNT one instruction takes one cycle to complete.
It calls helper function to update CCOUNT register at every TB end and
raise timer interrupts. This scheme works very predictably and doesn't
have noticeable performance impact, but it is hard to use with multiple
synchronized processors, especially with coming MTTCG.
Derive CCOUNT from the virtual simulation time, QEMU_CLOCK_VIRTUAL.
Use native QEMU timers for CCOMPARE timers, one timer for each register.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:55 -08:00
Max Filippov
bd527a8323
target/xtensa: implement RUNSTALL
...
RUNSTALL signal stalls core execution while it's applied. It is widely
used in multicore configurations to control activity of additional
cores.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:55 -08:00
Max Filippov
17ab14acd4
target/xtensa: add static vectors selection
...
Xtensa cores may have two distinct addresses for the static vectors
group. Provide a function to select one of them.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2017-01-15 13:01:55 -08:00