summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20190228' into ↵Peter Maydell2019-03-012-19/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Xen queue * xen-block fixes # gpg: Signature made Thu 28 Feb 2019 17:31:05 GMT # gpg: using RSA key F80C006308E22CFD8A92E7980CF5572FD7FB55AF # gpg: issuer "anthony.perard@citrix.com" # gpg: Good signature from "Anthony PERARD <anthony.perard@gmail.com>" [marginal] # gpg: aka "Anthony PERARD <anthony.perard@citrix.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 5379 2F71 024C 600F 778A 7161 D8D5 7199 DF83 42C8 # Subkey fingerprint: F80C 0063 08E2 2CFD 8A92 E798 0CF5 572F D7FB 55AF * remotes/aperard/tags/pull-xen-20190228: xen-block: stop leaking memory in xen_block_drive_create() xen-block: report error condition from vbd_name_to_disk() xen-block: remove redundant assignment dataplane/xen-block: remove dead code Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * xen-block: stop leaking memory in xen_block_drive_create()Paul Durrant2019-02-281-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The locally allocated QDict-s need to be freed. ('file_layer' will be freed implicitly since it is added as an object to 'driver_layer'). Spotted by Coverity: CID 1398649 While in the neighbourhood free 'driver' and 'filename' as soon as they are added to the QDicts. Freeing after the 'done' label doesn't make that much sense as, if the error path jumps to that label, the values would be NULL anyway. This patch also makes that more obvious by taking the error path if 'params' is NULL and then asserting that both driver and filename are non-NULL in the normal path. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Message-Id: <20190219163440.15702-1-paul.durrant@citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
| * xen-block: report error condition from vbd_name_to_disk()Paul Durrant2019-02-281-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function needs to make sure it is passed a valid disk name. This is easily done by making sure that the parsing loop results in a non-zero value. Spotted by Coverity: CID 1398640 Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Message-Id: <20190215162533.19475-4-paul.durrant@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
| * xen-block: remove redundant assignmentPaul Durrant2019-02-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The assignment to 'p' is unnecessary as the code will either goto 'invalid' or p will get overwritten. Spotted by Coverity: CID 1398638 Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Message-Id: <20190215162533.19475-3-paul.durrant@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
| * dataplane/xen-block: remove dead codePaul Durrant2019-02-281-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The if() statement is clearly bogus (dead code which should have been cleaned up when grant mapping was removed). Spotted by Coverity: CID 1398635 While in the neighbourhood, add a missing 'fall through' annotation. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com> Message-Id: <20190215162533.19475-2-paul.durrant@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
* | Merge remote-tracking branch ↵Peter Maydell2019-03-013-14/+71
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/huth-gitlab/tags/pull-request-2019-02-28' into staging - Updates to MAINTAINERS file - Re-enable the guest-agent test - Add the possibility to load a bios image on the mcf5208evb machine # gpg: Signature made Thu 28 Feb 2019 12:23:25 GMT # gpg: using RSA key 2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2019-02-28: hw/m68k/mcf5208: Support loading of bios images tests/test-qga: Reenable guest-agent qtest MAINTAINERS: Clean up the RISC-V TCG backend section MAINTAINERS: Add some missing entries for the sun4m machine MAINTAINERS: Add maintainer to the TCG/i386 subsystem MAINTAINERS: Add maintainers to the Linux subsystem MAINTAINERS: Orphanize the 'GDB stub' subsystem MAINTAINERS: Add maintainer to the POSIX subsystem MAINTAINERS: Add an entry for the Dino machine MAINTAINERS: Add missing test entries to the Cryptography section MAINTAINERS: Add missing entries for the QObject section MAINTAINERS: Add missing entries for the PC machines MAINTAINERS: Add missing entries for the sun4u machines Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/m68k/mcf5208: Support loading of bios imagesThomas Huth2019-02-281-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MCF5208EVB supports 2 MiB of flash at address 0. Add support for this memory region and some code to load the file that can be specified with the "-bios" command line option. This can be used for example to load U-Boot images for the MCF5208EVB (we still lack some features in the CPU emulation for this firmware, though, so it can not be run successfully yet). Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
| * | tests/test-qga: Reenable guest-agent qtestPhilippe Mathieu-Daudé2019-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a misuse of rules.mak logical functions, commit f386df17448 disabled the guest-agent test. Enable it back. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Clean up the RISC-V TCG backend sectionThomas Huth2019-02-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The e-mail address mjc@sifive.com of Michael is not valid anymore. Commit 7d04ac38959f8115f2a02 removed the entry already from the main RISC-V section, but apparently forgot to remove it from the TCG backend section, too. Fixes: 7d04ac38959f8115f2a029d81db1c8aac179aa95 Reviewed-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add some missing entries for the sun4m machineThomas Huth2019-02-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | These files / devices are only used by SPARC machines, so we can sort them into the corresponding category in the MAINTAINERS file. Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add maintainer to the TCG/i386 subsystemPhilippe Mathieu-Daudé2019-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Richard obviously maintains this subdirectory, make this official :) Remove the qemu-devel@nongnu.org entry because the list is always selected by the 'All patches CC here' section. Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add maintainers to the Linux subsystemPhilippe Mathieu-Daudé2019-02-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Michael, Cornelia and Paolo as maintainers of the Linux subsystem. Remove the qemu-devel@nongnu.org entry because the list is always selected by the 'All patches CC here' section. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> [thuth: Add update-linux-headers.sh, too] Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Orphanize the 'GDB stub' subsystemPhilippe Mathieu-Daudé2019-02-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody is looking at those files, downgrade this subsystem as orphan. Remove the qemu-devel@nongnu.org entry because the list is always selected by the 'All patches CC here' section. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add maintainer to the POSIX subsystemPhilippe Mathieu-Daudé2019-02-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Paolo as maintainer of the POSIX subsystem. Remove the qemu-devel@nongnu.org entry because the list is always selected by the 'All patches CC here' section. Cc: Paolo Bonzini <pbonzini@redhat.com> Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add an entry for the Dino machinePhilippe Mathieu-Daudé2019-02-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Richard as maintainer, and Helge as reviewer. Cc: Richard Henderson <rth@twiddle.net> Cc: Helge Deller <deller@gmx.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> [thuth: Add the machine entry alphabetically] Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add missing test entries to the Cryptography sectionPhilippe Mathieu-Daudé2019-02-281-0/+2
| | | | | | | | | | | | | | | | | | Acked-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add missing entries for the QObject sectionPhilippe Mathieu-Daudé2019-02-281-1/+5
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add missing entries for the PC machinesPhilippe Mathieu-Daudé2019-02-281-0/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Add missing entries for the sun4u machinesPhilippe Mathieu-Daudé2019-02-281-1/+5
| | | | | | | | | | | | | | | | | | Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* | | Merge remote-tracking branch 'remotes/xtensa/tags/20190228-xtensa' into stagingPeter Maydell2019-02-2841-1837/+3251
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target/xtensa: FLIX support, various fixes and test improvements - add FLIX (flexible length instructions extension) support; - make testsuite runnable on wider range of xtensa cores; - add floating point opcode tests; - don't add duplicate 'static' in import_core.sh script; - fix undefined opcodes detection in test_mmuhifi_c3 overlay. # gpg: Signature made Thu 28 Feb 2019 12:53:23 GMT # gpg: using RSA key 2B67854B98E5327DCDEB17D851F9CC91F83FA044 # gpg: issuer "jcmvbkbc@gmail.com" # gpg: Good signature from "Max Filippov <filippov@cadence.com>" [unknown] # gpg: aka "Max Filippov <max.filippov@cogentembedded.com>" [full] # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" [full] # Primary key fingerprint: 2B67 854B 98E5 327D CDEB 17D8 51F9 CC91 F83F A044 * remotes/xtensa/tags/20190228-xtensa: (40 commits) tests/tcg/xtensa: add FPU2000 coprocessor tests tests/tcg/xtensa: add FP1 group tests tests/tcg/xtensa: add FP0 group conversion tests tests/tcg/xtensa: add FP0 group arithmetic tests tests/tcg/xtensa: add LSCI/LSCX group tests tests/tcg/xtensa: add test for FLIX tests/tcg/xtensa: conditionalize MMU-related tests tests/tcg/xtensa: conditionalize windowed register tests tests/tcg/xtensa: conditionalize and fix s32c1i tests tests/tcg/xtensa: fix SR tests for big endian configs tests/tcg/xtensa: conditionalize and expand SR tests tests/tcg/xtensa: conditionalize timer/CCOUNT tests tests/tcg/xtensa: conditionalize interrupt tests tests/tcg/xtensa: add straightforward conditionals tests/tcg/xtensa: conditionalize cache option tests tests/tcg/xtensa: conditionalize debug option tests tests/tcg/xtensa: enable boolean tests tests/tcg/xtensa: fix endianness issues in test_b tests/tcg/xtensa: don't use optional opcodes in generic code tests/tcg/xtensa: support configs with LITBASE ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | tests/tcg/xtensa: add FPU2000 coprocessor testsMax Filippov2019-02-282-0/+28
| | | | | | | | | | | | | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: add FP1 group testsMax Filippov2019-02-282-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | Test comparisons and conditional move operations. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: add FP0 group conversion testsMax Filippov2019-02-282-0/+305
| | | | | | | | | | | | | | | | | | | | | | | | Test conversions for normal, NaN and Inf arguments. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: add FP0 group arithmetic testsMax Filippov2019-02-283-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | Test arithmetic operations for normal, NaN and Inf arguments. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: add LSCI/LSCX group testsMax Filippov2019-02-282-0/+123
| | | | | | | | | | | | | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: add test for FLIXMax Filippov2019-02-282-0/+61
| | | | | | | | | | | | | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize MMU-related testsMax Filippov2019-02-282-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Make MMU-related tests conditional on the presence of MMUv2 option. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize windowed register testsMax Filippov2019-02-281-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make windowed register tests conditional on the presence of this option. Fix tests to work correctly for both 32 and 64 physical registers. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize and fix s32c1i testsMax Filippov2019-02-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make s32c1i tests conditional on the presence of this option. Initialize ATOMCTL SR when it's present to allow RCW transactions on uncached memory. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: fix SR tests for big endian configsMax Filippov2019-02-281-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SR tests generate instructions that the assembler does not recognize and thus must take care about configuration endianness. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize and expand SR testsMax Filippov2019-02-281-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make tests for specific special registers conditional on the presence of the options that add these registers and test that the registers are not accessible otherwise. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize timer/CCOUNT testsMax Filippov2019-02-281-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make timer/CCOUNT tests conditional on the presence of timer option and number of configured timers. Don't use hard coded interrupt levels for timers, use configured values. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize interrupt testsMax Filippov2019-02-282-18/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make interrupt tests conditional on the presence of interrupt option and on the presence of level-1 and high level software interrupts. Don't use hard-coded interrupt level for the high level interrupt tests, choose high level software IRQ and use its configured level. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: add straightforward conditionalsMax Filippov2019-02-2812-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make tests for optional instruction groups conditional on the presence of corresponding options in the config. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize cache option testsMax Filippov2019-02-281-12/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make data/instruction tests conditional on the presence of data/instruction cache, whether they're lockable and whether data cache is writeback. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: conditionalize debug option testsMax Filippov2019-02-282-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make debug tests conditional on the presence of the debug option in the config and tests that depend on the presence/number of instruction or data breakpoint registers on the corresponding definitions. Use configured debug interrupt level instead of the hardcoded value to set up IRQ handler and access debug EPC register. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: enable boolean testsMax Filippov2019-02-282-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Uncomment test_boolean in the test makefile. Make actual tests code conditional on the presence of boolean option in the config. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: fix endianness issues in test_bMax Filippov2019-02-281-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use bbci.l/bbsi.l instead of bbci/bbsi, as they are assembly macros that accept little-endian bit number and produce correct immediate for both little and big endian configurations. Choose value loaded into register for bbc/bbs opcodes based on configuration endianness. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: don't use optional opcodes in generic codeMax Filippov2019-02-281-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use 'loop' opcode in generic testsuite completion code, only use core opcodes to make it work with any configuration. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: support configs with LITBASEMax Filippov2019-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configurations with LITBASE register may use absolute literals by default. Pass --no-absolute-literals option to assembler to use PC-relative literals instead. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: support configurations w/o vecbaseMax Filippov2019-02-283-22/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configurations w/o vecbase may have vectors not grouped together and not in fixed order. They may not always be grouped into single output sections by assigning next offset to dot, as it may sometimes move dot backwards and sometimes they may even belong to different memory region. Don't group vectors into single output section. Instead put each vector into its own section ant put it at its default virtual address. Reserve 4KBytes from the default vectors base and put rest of the code and data starting from there. Mark vectors sections as executable, otherwise their contents is discarded. There may be as little as 16 bytes reserved for some vectors, load handler address into a0 and use ret.n to jump there to make vector code fit into this 16 byte space. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | tests/tcg/xtensa: indicate failed testsMax Filippov2019-02-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When test suite with multiple tests fails it's not obvious which test failed. Pring "failed" in every invocation of test_fail. Do printing when DEBUG preprocessor macro is defined. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: implement PREFCTL SRMax Filippov2019-02-282-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cache prefetch option adds an unprivileged SR PREFCTL. Add trivial implementation for this SR. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: prioritize load/store in FLIX bundlesMax Filippov2019-02-282-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load/store opcodes may raise MMU exceptions. Normally exceptions should be checked in priority order before any actual operations, but since MMU exceptions are tightly coupled with actual memory access, there's currently no way to do it. Approximate this behavior by executing all load, then all store, and then all other opcodes in the FLIX bundles. Use opcode dependency mechanism to express ordering. Mark load/store opcodes with XTENSA_OP_{LOAD,STORE} flags. Newer libisa has classifier functions that can tell whether opcode is a load or store, but this information is not available in the existing overlays. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: break circular register dependenciesMax Filippov2019-02-281-4/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently topologic opcode sorting stops at the first detected dependency loop. Introduce struct opcode_arg_copy that describes temporary register copy. Scan remaining opcodes searching for dependencies that can be broken, break them by introducing temporary register copies and record them in an array. In case of success create local temporaries and initialize them with current register values. Share single temporary copy between all register users. Delete temporaries after translation. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: reorganize access to boolean registersMax Filippov2019-02-281-8/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libisa represents boolean registers b0..b16 as a BR register file and as BR4 and BR8 register groups. Add these register files and use OpcodeArg::{in,out} parameters to access boolean registers in translators. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: reorganize access to MAC16 registersMax Filippov2019-02-281-94/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libisa represents MAC16 registers m0..m3 as an MR register file. Add this register file and reference its registers directly from the translate_mac16. Drop translator parameter that indicates whether opcode argument is in ar or in mr. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: reorganize register handling in translatorsMax Filippov2019-02-283-344/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support circular register dependencies in FLIX bundles opcode inputs and outputs must be separate and adjustable. Circular dependencies can be broken by making temporary copies of opcode inputs and substituting them into the arguments array instead of the original registers. E.g. the circular register dependency in the following bundle: { mov a2, a3 ; mov a3, a2 } can be resolved by making copy a2' = a2 and substituting it as input argument of the second opcode: { mov a2, a3 ; mov a3, a2' } Change opcode translator prototype to accept OpcodeArg array as argument. For each register argument initialize OpcodeArg::{in,out} with TCGv_* of the respective register. Don't explicitly use cpu_R in the opcode translators, use OpcodeArg::{in,out} instead. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: only rotate window in the retw helperMax Filippov2019-02-283-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move return address calculation and WINDOW_START adjustment out of the retw helper to simplify logic a bit and avoid using registers directly. Pass a0 as a parameter to the helper. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
| * | | target/xtensa: move WINDOW_BASE SR update to postprocessingMax Filippov2019-02-284-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opcodes that modify WINDOW_BASE SR don't have dependency on opcodes that use windowed registers. If such opcodes are combined in a single instruction they may not be correctly ordered. Instead of adding said dependency use temporary register to store changed WINDOW_BASE value and do actual register window rotation as a postprocessing step. Not all opcodes that change WINDOW_BASE need this: retw, rfwo and rfwu are also jump opcodes, so they are guaranteed to be translated last and thus will not affect other opcodes in the same instruction. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>