summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* s390x/kvm: use kvm_gsi_routing_enabled in flicFei Li2017-01-201-2/+2
| | | | | | | | Let's use kvm_gsi_routing_enabled() to check if kvm supports KVM_CAP_IRQ_ROUTING in order to avoid a needless ioctl invocation. Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* s390x: add compat machine for 2.9Cornelia Huck2017-01-201-1/+16
| | | | | Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
* s390x: remove double compat statementChristian Borntraeger2017-01-201-2/+0Star
| | | | | | | | | | | We chain our compat handler via the CCW_COMPAT macros and via the class_init function. (e.g. ccw_machine_2_7_class_options calls ccw_machine_2_8_class_options). As all class_init functions in that chain call SET_MACHINE_COMPAT for their compat settings, and SET_MACHINE_COMPAT will append there is no need to do that again. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170118' into ↵Peter Maydell2017-01-1922-528/+1227
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging add OpenSPARC T1 emulation # gpg: Signature made Wed 18 Jan 2017 22:25:47 GMT # gpg: using RSA key 0x3360C3F7411A125F # gpg: Good signature from "Artyom Tarasenko <atar4qemu@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 2AD8 6149 17F4 B2D7 05C0 BB12 3360 C3F7 411A 125F * remotes/artyom/tags/pull-sun4v-20170118: (30 commits) target-sparc: fix up niagara machine target-sparc: move common cpu initialisation routines to sparc64.c target-sparc: implement sun4v RTC target-sparc: add ST_BLKINIT_ ASIs for UA2005+ CPUs target-sparc: store the UA2005 entries in sun4u format target-sparc: implement UA2005 ASI_MMU (0x21) target-sparc: add more registers to dump_mmu target-sparc: implement auto-demapping for UA2005 CPUs target-sparc: allow 256M sized pages target-sparc: simplify ultrasparc_tsb_pointer target-sparc: implement UA2005 TSB Pointers target-sparc: use SparcV9MMU type for sparc64 I/D-MMUs target-sparc: replace the last tlb entry when no free entries left target-sparc: ignore writes to UA2005 CPU mondo queue register target-sparc: allow priveleged ASIs in hyperprivileged mode target-sparc: use direct address translation in hyperprivileged mode target-sparc: fix immediate UA2005 traps target-sparc: implement UA2005 rdhpstate and wrhpstate instructions target-sparc: implement UA2005 GL register target-sparc: implement UA2005 hypervisor traps ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-sparc: fix up niagara machineArtyom Tarasenko2017-01-186-39/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the Niagara stub implementation from sun4u.c and add a machine, compatible with Legion simulator from the OpenSPARC T1 project. The machine uses the firmware supplied with the OpenSPARC T1 project, http://download.oracle.com/technetwork/systems/opensparc/OpenSPARCT1_Arch.1.5.tar.bz2 in the directory S10image/, and is able to boot the supplied Solaris 10 image. Note that for compatibility with the naming conventions for SPARC machines the new machine name is lowercase niagara. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: move common cpu initialisation routines to sparc64.cArtyom Tarasenko2017-01-185-345/+389
| | | | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: implement sun4v RTCArtyom Tarasenko2017-01-184-0/+111
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: add ST_BLKINIT_ ASIs for UA2005+ CPUsArtyom Tarasenko2017-01-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | In OpenSPARC T1+ TWINX ASIs in store instructions are aliased with Block Initializing Store ASIs. "UltraSPARC T1 Supplement Draft D2.1, 14 May 2007" describes them in the chapter "5.9 Block Initializing Store ASIs" Integer stores of all sizes are allowed with these ASIs. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: store the UA2005 entries in sun4u formatArtyom Tarasenko2017-01-182-8/+47
| | | | | | | | | | | | | | | | | | | | According to chapter 13.3 of the UltraSPARC T1 Supplement to the UltraSPARC Architecture 2005, only the sun4u format is available for data-access loads. Store UA2005 entries in the sun4u format to simplify processing. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: implement UA2005 ASI_MMU (0x21)Artyom Tarasenko2017-01-181-0/+31
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: add more registers to dump_mmuArtyom Tarasenko2017-01-181-0/+2
| | | | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: implement auto-demapping for UA2005 CPUsArtyom Tarasenko2017-01-181-0/+22
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: allow 256M sized pagesArtyom Tarasenko2017-01-181-17/+1Star
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: simplify ultrasparc_tsb_pointerArtyom Tarasenko2017-01-181-36/+15Star
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: implement UA2005 TSB PointersArtyom Tarasenko2017-01-182-22/+104
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: use SparcV9MMU type for sparc64 I/D-MMUsArtyom Tarasenko2017-01-184-37/+25Star
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: replace the last tlb entry when no free entries leftArtyom Tarasenko2017-01-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | Implement the behavior described in the chapter 13.9.11 of UltraSPARC T1™ Supplement to the UltraSPARC Architecture 2005: "If a TLB Data-In replacement is attempted with all TLB entries locked and valid, the last TLB entry (entry 63) is replaced." Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: ignore writes to UA2005 CPU mondo queue registerArtyom Tarasenko2017-01-181-0/+1
| | | | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: allow priveleged ASIs in hyperprivileged modeArtyom Tarasenko2017-01-181-14/+18
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: use direct address translation in hyperprivileged modeArtyom Tarasenko2017-01-182-5/+4Star
| | | | | | | | | | | | | | | | Please note that QEMU doesn't impelement Real->Physical address translation. The "Real Address" is always the "Physical Address". Suggested-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: fix immediate UA2005 trapsArtyom Tarasenko2017-01-181-1/+1
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: implement UA2005 rdhpstate and wrhpstate instructionsArtyom Tarasenko2017-01-181-2/+5
| | | | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: implement UA2005 GL registerArtyom Tarasenko2017-01-186-7/+58
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: implement UA2005 hypervisor trapsArtyom Tarasenko2017-01-183-5/+39
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: hypervisor mode takes over nucleus modeArtyom Tarasenko2017-01-182-3/+7
| | | | | | | | | | | | | | | | | | Accordinf to UA2005, 9.3.3 "Address Space Identifiers", "In hyperprivileged mode, all instruction fetches and loads and stores with implicit ASIs use a physical address, regardless of the value of TL". Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: implement UltraSPARC-T1 Strand status ASRArtyom Tarasenko2017-01-181-0/+11
| | | | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: implement UA2005 scratchpad registersArtyom Tarasenko2017-01-183-0/+26
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: simplify replace_tlb_entry by using TTE_PGSIZEArtyom Tarasenko2017-01-181-3/+2Star
| | | | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: on UA2005 don't deliver Interrupt_level_n IRQs in hypervisor modeArtyom Tarasenko2017-01-181-1/+2
| | | | | | | | | | | | | | | | | | | | As described in Chapter 5.7.6 of the UltraSPARC Architecture 2005, outstanding disrupting exceptions that are destined for privileged mode can only cause a trap when the virtual processor is in nonprivileged or privileged mode and PSTATE.ie = 1. At all other times, they are held pending. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: add UltraSPARC T1 TLB #definesArtyom Tarasenko2017-01-181-0/+4
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: add UA2005 TTE bit #definesArtyom Tarasenko2017-01-181-0/+17
| | | | | | | | Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: use explicit mmu register pointersArtyom Tarasenko2017-01-182-12/+58
| | | | | | | | | | | | | | | | Use explicit register pointers while accessing D/I-MMU registers. Call cpu_unassigned_access on access to missing registers. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
| * target-sparc: store cpu super- and hypervisor flags in TBArtyom Tarasenko2017-01-182-5/+36
| | | | | | | | | | Suggested-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
| * target-sparc: ignore MMU-faults if MMU is disabled in hypervisor modeArtyom Tarasenko2017-01-182-2/+15
| | | | | | | | | | | | | | | | while IMMU/DMMU is disabled - ignore MMU-faults in hypervisorv mode or if CPU doesn't have hypervisor - signal TT_INSN_REAL_TRANSLATION_MISS/TT_DATA_REAL_TRANSLATION_MISS otherwise Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
* | Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170117' into stagingPeter Maydell2017-01-191-25/+20Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tcg/i386 fixes # gpg: Signature made Tue 17 Jan 2017 22:58:04 GMT # gpg: using RSA key 0xAD1270CC4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC 16A4 AD12 70CC 4DD0 279B * remotes/rth/tags/pull-tcg-20170117: tcg/i386: Always use TZCNT when available Revert "tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | tcg/i386: Always use TZCNT when availableRichard Henderson2017-01-171-3/+7
| | | | | | | | | | | | | | | | | | I think this is cleaner than sometimes using BSF. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | Revert "tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR"Richard Henderson2017-01-171-22/+13Star
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4ac76910734209dab83ddd3795f08fc7889ef463. This fixes http://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg03062.html While I think we could get away with relying on the undocumented behaviour, the tcg constraint system isn't powerful enough to properly describe the required (non-)overlap conditions. Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' ↵Peter Maydell2017-01-175-2/+46
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging # gpg: Signature made Mon 16 Jan 2017 13:44:46 GMT # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: trace: Add event "guest_cpu_exit" trace: Fix dynamic event state on vCPU hot-unplug trace: Lock vCPU list when initializing dynamic tracing state trace-events: spelling fix Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * trace: Add event "guest_cpu_exit"Lluís Vilanova2017-01-162-0/+9
| | | | | | | | | | | | | | | | Signals the hot-unplugging of a virtual (guest) CPU. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 148278748597.1404.10546320797997984932.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * trace: Fix dynamic event state on vCPU hot-unplugLluís Vilanova2017-01-163-0/+26
| | | | | | | | | | | | | | | | | | We need to disable per-vCPU events on a vCPU that is hot-unplugged to keep the dynamic event state global counters consistent. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 148278748055.1404.1570530281528619895.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * trace: Lock vCPU list when initializing dynamic tracing stateLluís Vilanova2017-01-161-1/+10
| | | | | | | | | | | | | | | | | | Fixes potential corruption when a vCPU is hot-(un)plugged while initializing the current one. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 148278747515.1404.6538173443841279200.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * trace-events: spelling fixMarc-André Lureau2017-01-161-1/+1
| | | | | | | | | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20161212221759.28949-1-marcandre.lureau@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-01-16' into ↵Peter Maydell2017-01-17297-5012/+4750Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | build-sys: add qapi doc generation targetsMarc-André Lureau2017-01-165-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | build-sys: add txt documentation rulesMarc-André Lureau2017-01-162-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Build plain text documentation, and install it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20170113144135.5150-21-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * | build-sys: use a generic TEXI2MAN ruleMarc-André Lureau2017-01-162-24/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recipe for making a man page from .texi is duplicated several times over. Capture it in suitable pattern rules instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20170113144135.5150-20-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * | build-sys: remove dvi doc generationMarc-André Lureau2017-01-162-9/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no clear reason to have rules to generate dvi format documentation, pdf is generally better supported nowadays. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20170113144135.5150-19-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * | build-sys: use --no-split for infoMarc-André Lureau2017-01-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Splitting the info files doesn't bring much benefits these days. This fixes also untracked generated info files from git ignore. Let's use MAKEINFOFLAGS for common flags, --number-sections is already the default anyway, so adding it doesn't change the info output. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20170113144135.5150-18-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| * | docs: add qemu logo to pdfMarc-André Lureau2017-01-163-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | qapi: add qapi2texi scriptMarc-André Lureau2017-01-16276-127/+1925
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>