summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
...
| * | qapi/schema: Clean up around QAPISchemaEntity.connect_doc()Markus Armbruster2020-03-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAPISchemaEntity calls doc.connect_feature() in .check(). Improper since commit ee1e6a1f6c8 split .connect_doc() off .check(). Move the call. Requires making the children call super().connect_doc() as they should. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200317115459.31821-12-armbru@redhat.com>
* | | scripts/cocci: Patch to let devices own their MemoryRegionsPhilippe Mathieu-Daudé2020-03-171-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device creates a MemoryRegion without setting its ownership, the MemoryRegion is added to the machine "/unattached" container in the QOM tree. Example with the Samsung SMDKC210 board: $ arm-softmmu/qemu-system-arm -M smdkc210 -S -monitor stdio (qemu) info qom-tree /machine (smdkc210-machine) /unattached (container) /io[0] (qemu:memory-region) /exynos4210.dram0[0] (qemu:memory-region) /exynos4210.irom[0] (qemu:memory-region) /exynos4210.iram[0] (qemu:memory-region) /exynos4210.chipid[0] (qemu:memory-region) ... /device[26] (exynos4210.uart) /exynos4210.uart[0] (qemu:memory-region) /soc (exynos4210) ^ \__ [*] The irom/iram/chipid regions should go under 'soc' at [*]. Add a semantic patch to let the device own the memory region. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | | scripts/cocci: Patch to remove unnecessary memory_region_set_readonly()Philippe Mathieu-Daudé2020-03-171-0/+15
| | | | | | | | | | | | | | | | | | | | | Add a semantic patch to remove memory_region_set_readonly() calls on ROM memory regions. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | | scripts/cocci: Patch to detect potential use of memory_region_init_romPhilippe Mathieu-Daudé2020-03-171-0/+19
| | | | | | | | | | | | | | | | | | | | | Add a semantic patch to detect potential replacement of memory_region_init_ram(readonly) by memory_region_init_rom(). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | | scripts/cocci: Patch to replace memory_region_init_{ram,readonly -> rom}Philippe Mathieu-Daudé2020-03-171-0/+18
| | | | | | | | | | | | | | | | | | | | | Add a semantic patch to replace memory_region_init_ram(readonly) by memory_region_init_rom(). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | | scripts/cocci: Rename memory-region-{init-ram -> housekeeping}Philippe Mathieu-Daudé2020-03-171-0/+13
|/ / | | | | | | | | | | | | | | | | As we are going to add various semantic changes related to the memory region API, rename this script to be more generic. Add a 'usage' header, and an entry in MAINTAINERS to avoid checkpatch warning. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* / hxtool: Remove Texinfo generation supportPeter Maydell2020-03-121-77/+1Star
|/ | | | | | | | | | All the STEXI/ETEXI blocks and the Makfile rules that use them have now been removed from the codebase. We can remove the code from the hxtool script which handles the STEXI/ETEXI directives and the '-t' option. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200306171749.10756-4-peter.maydell@linaro.org
* maint: Include top-level *.rst files early in git diffEric Blake2020-03-091-0/+1
| | | | | | | | | | | We are converting more doc files to *.rst rather than *.texi. Most doc files are already listed early in diffs due to our catchall docs/*, but a few top-level files get missed by that glob. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20200220162214.3474280-1-eblake@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* qemu-storage-daemon: Add --monitor optionKevin Wolf2020-03-061-0/+5
| | | | | | | | | | | | | | | | | This adds and parses the --monitor option, so that a QMP monitor can be used in the storage daemon. The monitor offers commands defined in the QAPI schema at storage-daemon/qapi/qapi-schema.json. The --monitor options currently allows to create multiple monitors with the same ID. This part of the interface is considered unstable. We will reject such configurations as soon as we have a design for the monitor subsystem to perform these checks. (In the system emulator, we depend on QemuOpts rejecting duplicate IDs.) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-21-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* scripts/hxtool-conv: Archive script used in qemu-options.hx conversionPeter Maydell2020-03-061-0/+137
| | | | | | | | | | | | This commit archives the perl script used to do conversion of the STEXI/ETEXI blocks in qemu-options.hx. (The other .hx files were manually converted, but qemu-options.hx is complicated enough that I felt I needed some scripting.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20200228153619.9906-26-peter.maydell@linaro.org
* texi2pod: parse @include directives outside "@c man" blocksPaolo Bonzini2020-03-061-18/+18
| | | | | | | | | | | | | | | | | This enables splitting the huge qemu-doc.texi file and keeping parallel Texinfo and rST versions of the documentation. texi2pod is not going to live much longer and hardly anyone cares about its upstream status, so the temporary fork should be acceptable. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20200228153619.9906-4-peter.maydell@linaro.org Message-id: 20200226113034.6741-4-pbonzini@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* qapi: Brush off some (py)lintMarkus Armbruster2020-03-056-18/+15Star
| | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200304155932.20452-5-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
* qapi: Use super() now we have Python 3Markus Armbruster2020-03-059-44/+43Star
| | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200304155932.20452-4-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
* qapi: Drop conditionals for Python 2Markus Armbruster2020-03-053-15/+3Star
| | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200304155932.20452-3-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
* qapi: Inheriting from object is pointless with Python 3, dropMarkus Armbruster2020-03-054-12/+12
| | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200304155932.20452-2-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
* Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEADPaolo Bonzini2020-02-252-0/+114
|\
| * Avoid cpu_physical_memory_rw() with a constant is_write argumentPhilippe Mathieu-Daudé2020-02-201-0/+12
| | | | | | | | | | | | | | | | | | This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Inspired-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * Let cpu_[physical]_memory() calls pass a boolean 'is_write' argumentPhilippe Mathieu-Daudé2020-02-201-0/+14
| | | | | | | | | | | | | | | | | | Use an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * Avoid address_space_rw() with a constant is_write argumentPeter Maydell2020-02-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The address_space_rw() function allows either reads or writes depending on the is_write argument passed to it; this is useful when the direction of the access is determined programmatically (as for instance when handling the KVM_EXIT_MMIO exit reason). Under the hood it just calls either address_space_write() or address_space_read_full(). We also use it a lot with a constant is_write argument, though, which has two issues: * when reading "address_space_rw(..., 1)" this is less immediately clear to the reader as being a write than "address_space_write(...)" * calling address_space_rw() bypasses the optimization in address_space_read() that fast-paths reads of a fixed length This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const.cocci. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20200218112457.22712-1-peter.maydell@linaro.org> [PMD: Update macvm_set_cr0() reported by Laurent Vivier] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * Let address_space_rw() calls pass a boolean 'is_write' argumentPhilippe Mathieu-Daudé2020-02-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Since its introduction in commit ac1970fbe8, address_space_rw() takes a boolean 'is_write' argument. Fix the codebase by using an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Inspired-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * Remove unnecessary cast when using the cpu_[physical]_memory APIPhilippe Mathieu-Daudé2020-02-201-0/+10
| | | | | | | | | | | | | | | | This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Suggested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * Remove unnecessary cast when using the address_space APIPhilippe Mathieu-Daudé2020-02-201-1/+14
| | | | | | | | | | | | | | | | | | | | | | This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Two lines in hw/net/dp8393x.c that Coccinelle produced that were over 80 characters were re-wrapped by hand. Suggested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * hw/net: Avoid casting non-const pointer, use address_space_write()Philippe Mathieu-Daudé2020-02-201-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NetReceive prototype gets a const buffer: typedef ssize_t (NetReceive)(NetClientState *, const uint8_t *, size_t); We already have the address_space_write() method to write a const buffer to an address space. Use it to avoid: hw/net/i82596.c: In function ‘i82596_receive’: hw/net/i82596.c:644:54: error: passing argument 4 of ‘address_space_rw’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
| * hw: Remove unnecessary cast when calling dma_memory_read()Philippe Mathieu-Daudé2020-02-201-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Since its introduction in commit d86a77f8abb, dma_memory_read() always accepted void pointer argument. Remove the unnecessary casts. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- v4: Drop parenthesis when removing cast (Eric Blake)
| * scripts/git.orderfile: Display Cocci scripts before code modificationsPhilippe Mathieu-Daudé2020-02-201-0/+3
| | | | | | | | | | | | | | | | When we use a Coccinelle semantic script to do automatic code modifications, it makes sense to look at the semantic patch first. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | softmmu: move vl.c to softmmu/Alexander Bulekov2020-02-222-2/+3
| | | | | | | | | | | | | | | | | | | | | | Move vl.c to a separate directory, similar to linux-user/ Update the chechpatch and get_maintainer scripts, since they relied on /vl.c for top_of_tree checks. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Message-id: 20200220041118.23264-2-alxndr@bu.edu Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | scripts/checkpatch.pl: Detect superfluous semicolon in C codePhilippe Mathieu-Daudé2020-02-181-0/+5
|/ | | | | | | | | | | | | | | | | | | Display error when a commit contains superfluous semicolon: $ git show 6663a0a3376 | scripts/checkpatch.pl -q - ERROR: superfluous trailing semicolon #276: FILE: block/io_uring.c:186: + ret = -ENOSPC;; total: 1 errors, 1 warnings, 485 lines checked Reported-by: Luc Michel <luc.michel@greensocs.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Luc Michel <luc.michel@greensocs.com> Message-Id: <20200218094402.26625-2-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* Merge remote-tracking branch ↵Peter Maydell2020-02-141-4/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/juanquintela/tags/pull-migration-pull-request' into staging Migration pull request # gpg: Signature made Thu 13 Feb 2020 13:04:43 GMT # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full] # gpg: aka "Juan Quintela <quintela@trasno.org>" [full] # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * remotes/juanquintela/tags/pull-migration-pull-request: git: Make submodule check only needed modules migration-test: fix some memleaks in migration-test tests/migration: Add some slack to auto converge migration/rdma: rdma_accept_incoming_migration fix error handling migration: Optimization about wait-unplug migration state migration: Maybe VM is paused when migration is cancelled Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * git: Make submodule check only needed modulesJuan Quintela2020-02-131-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If one is compiling more than one tree from the same source, it is possible that they need different submodules. Change the check to see that all modules that we are interested in are updated, discarding the ones that we don't care about. Signed-off-by: Juan Quintela <quintela@redhat.com> --- v1->v2: patchw insists in not using modules
* | Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2020-02-131-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * various small fixes and cleanups * fixes for the ucode revision patch from the previous pull request # gpg: Signature made Wed 12 Feb 2020 15:30:24 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: target/i386: enable monitor and ucode revision with -cpu max target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR target/i386: fix TCG UCODE_REV access build: move TARGET_GPROF to config-host.mak exec: do not define use_icount for user-mode emulation minikconf: accept alnum identifiers Remove support for CLOCK_MONOTONIC not being defined seqlock: fix seqlock_write_unlock_impl function vl: Don't mismatch g_strsplit()/g_free() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * minikconf: accept alnum identifiersMarc-André Lureau2020-02-121-1/+1
| | | | | | | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | drop "from __future__ import print_function"Paolo Bonzini2020-02-0721-21/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | This is only needed for Python 2, which we do not support anymore. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200204160604.19883-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | make all Python scripts executablePaolo Bonzini2020-02-072-0/+0
| | | | | | | | | | | | | | | | | | | | | | Scripts that have a Python shebang are meant to be executed directly from the shell; give them 755 permissions. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200204160237.16889-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | scripts/signrom: remove Python 2 support, add shebangPaolo Bonzini2020-02-071-8/+4Star
| | | | | | | | | | | | | | | | Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200204160028.16211-1-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | scripts: Explicit usage of Python 3 (scripts without __main__)Philippe Mathieu-Daudé2020-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-12-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | scripts/tracetool: Remove shebang headerPhilippe Mathieu-Daudé2020-02-0723-23/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch created mechanically by running: $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \ $(git grep -lF '#!/usr/bin/env python' \ | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-9-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | scripts/minikconf: Explicit usage of Python 3Philippe Mathieu-Daudé2020-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the program search path to find the Python 3 interpreter. Patch created manually after running: $ git grep -l 'if __name__.*__main__' \ | xargs grep -LF '#!/usr/bin/env python3' Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-7-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | scripts: Explicit usage of Python 3 (scripts with __main__)Philippe Mathieu-Daudé2020-02-0714-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -l 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-6-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* | scripts/checkpatch.pl: Only allow Python 3 interpreterPhilippe Mathieu-Daudé2020-02-071-0/+6
|/ | | | | | | | | | | | | | | | | Since commit ddf9069963 QEMU requires Python >= 3.5. PEP 0394 [*] states that 'python3' should be available and that 'python' is optional. To avoid problem with unsupported versions, enforce the shebang interpreter to Python 3. [*] https://www.python.org/dev/peps/pep-0394/ Reported-by: John Snow <jsnow@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200130163232.10446-2-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* scripts/qemu-trace-stap: Convert documentation to rSTPeter Maydell2020-02-031-140/+0Star
| | | | | | | | | | | | | | | | | | | | | The qemu-trace-stap documentation is currently in scripts/qemu-trace-stap.texi in Texinfo format, which we present to the user as: * a qemu-trace-stap manpage * but not (unusually for QEMU) part of the HTML docs Convert the documentation to rST format that lives in the docs/ subdirectory, and present it to the user as: * a qemu-trace-stap manpage * part of the interop/ Sphinx manual There are minor formatting changes to suit Sphinx, but no content changes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20200124162606.8787-8-peter.maydell@linaro.org
* hxtool: Support SRST/ERST directivesPeter Maydell2020-02-031-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | We want to add support for including rST document fragments in our .hx files, in the same way we currently have texinfo fragments. These will be delimited by SRST and ERST directives, in the same way the texinfo is delimited by STEXI/ETEXI. The rST fragments will not be extracted by the hxtool script, but by a different mechanism, so all we need to do in hxtool is have it ignore all the text inside a SRST/ERST section, with suitable error-checking for mismatched rST-vs-texi fragment delimiters. The resulting effective state machine has only three states: * flag = 0, rstflag = 0 : reading section for C output * flag = 1, rstflag = 0 : reading texi fragment * flag = 0, rstflag = 1 : reading rST fragment and flag = 1, rstflag = 1 is not possible. Using two variables makes the parallel between the rST handling and the texi handling clearer; in any case all this code will be deleted once we've converted entirely to rST. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200124162606.8787-3-peter.maydell@linaro.org
* virtiofsd: Pull in kernel's fuse.hDr. David Alan Gilbert2020-01-231-0/+1
| | | | | | | | | Update scripts/update-linux-headers.sh to add fuse.h and use it to pull in fuse.h from the kernel; from v5.5-rc1 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* scripts/git.orderfile: Display decodetree before C sourcePhilippe Mathieu-Daudé2020-01-221-0/+3
| | | | | | | | | | | | | To avoid scrolling each instruction when reviewing tcg helpers written for the decodetree script, display the .decode files (similar to header declarations) before the C source (implementation of previous declarations). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20191230082856.30556-1-philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* qapi: Fix code generation with Python 3.5Markus Armbruster2020-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent commit 3e7fb5811b "qapi: Fix code generation for empty modules" modules" switched QAPISchema.visit() from for entity in self._entity_list: effectively to for mod in self._module_dict.values(): for entity in mod._entity_list: Visits in the same order as long as .values() is in insertion order. That's the case only for Python 3.6 and later. Before, it's in some arbitrary order, which results in broken generated code. Fix by making self._module_dict an OrderedDict rather than a dict. Fixes: 3e7fb5811baab213dcc7149c3aa69442d683c26c Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Thomas Huth <thuth@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: BALATON Zoltan <balaton@eik.bme.hu> Tested-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20200116202558.31473-1-armbru@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-01-14' into ↵Peter Maydell2020-01-146-59/+93
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging QAPI patches for 2020-01-14 # gpg: Signature made Tue 14 Jan 2020 10:15:22 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2020-01-14: qapi: Simplify QAPISchemaModularCVisitor qapi: Fix code generation for empty modules qapi: Proper intermediate representation for modules qapi: Generate command registration stuff into separate files tests/Makefile.include: Fix missing test-qapi-emit-events.[ch] qapi: Tweak "command returns a nice type" check for clarity Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * qapi: Simplify QAPISchemaModularCVisitorMarkus Armbruster2020-01-145-22/+23
| | | | | | | | | | | | | | | | | | Since the previous commit, QAPISchemaVisitor.visit_module() is called just once. Simplify QAPISchemaModularCVisitor accordingly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-7-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Fix code generation for empty modulesMarkus Armbruster2020-01-141-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a sub-module doesn't contain any definitions, we don't generate code for it, but we do generate the #include. We generate code only for modules that get visited. QAPISchema.visit() visits only modules that have definitions. It can visit modules multiple times. Clean this up as follows. Collect entities in their QAPISchemaModule. Have QAPISchema.visit() call QAPISchemaModule.visit() for each module. Have QAPISchemaModule.visit() call .visit_module() for itself, and QAPISchemaEntity.visit() for each of its entities. This way, we visit each module exactly once. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-6-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Proper intermediate representation for modulesMarkus Armbruster2020-01-141-20/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modules are represented only by their names so far. Introduce class QAPISchemaModule. So far, it merely wraps the name. The next patch will put it to more interesting use. Once again, arrays spice up the patch a bit. For any other type, @info points to the definition, which lets us map from @info to module. For arrays, there is no definition, and @info points to the first use instead. We have to use the element type's module instead, which is only available after .check(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-5-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Generate command registration stuff into separate filesMarkus Armbruster2020-01-141-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Having to include qapi-commands.h just for qmp_init_marshal() is suboptimal. Generate it into separate files. This lets monitor/misc.c, qga/main.c, and the generated qapi-commands-FOO.h include less. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-4-armbru@redhat.com> [Typos in docs/devel/qapi-code-gen.txt fixed] Reviewed-by: Eric Blake <eblake@redhat.com>
| * qapi: Tweak "command returns a nice type" check for clarityMarkus Armbruster2020-01-141-4/+5
| | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191120182551.23795-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>