aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-04scsi-disk: Use qdev_prop_drive_iothreadKevin Wolf
This makes use of qdev_prop_drive_iothread for scsi-disk so that the disk can be attached to a node that is already in the target AioContext. We need to check that the HBA actually supports iothreads, otherwise scsi-disk must make sure that the node is already in the main AioContext. This changes the error message for conflicting iothread settings. Previously, virtio-scsi produced the error message, now it comes from blk_set_aio_context(). Update a test case accordingly. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04block: Add qdev_prop_drive_iothread property typeKevin Wolf
Some qdev block devices have support for iothreads and take care of the AioContext they are running in, but most devices don't know about any of this. For the latter category, the qdev drive property must make sure that their BlockBackend is in the main AioContext. Unfortunately, while the current code just does the same thing for devices that do support iothreads, this is not correct and it would show as soon as we actually try to keep a consistent AioContext assignment across all nodes and users of a block graph subtree: If a node is already in a non-default AioContext because of one of its users, attaching a new device should still be possible if that device can work in the same AioContext. Switching the node back to the main context first and only then into the device AioContext causes failure (because the existing user wouldn't allow the switch to the main context). So devices that support iothreads need a different kind of drive property that leaves the node in its current AioContext, but by using this type, the device promises to check later that it can work with this context. This patch adds the qdev infrastructure that allows devices to signal that they handle iothreads and qdev should leave the AioContext alone. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04block: Add BlockBackend.ctxKevin Wolf
This adds a new parameter to blk_new() which requires its callers to declare from which AioContext this BlockBackend is going to be used (or the locks of which AioContext need to be taken anyway). The given context is only stored and kept up to date when changing AioContexts. Actually applying the stored AioContext to the root node is saved for another commit. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04block: Add Error to blk_set_aio_context()Kevin Wolf
Add an Error parameter to blk_set_aio_context() and use bdrv_child_try_set_aio_context() internally to check whether all involved nodes can actually support the AioContext switch. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04nbd-server: Call blk_set_allow_aio_context_change()Kevin Wolf
The NBD server uses an AioContext notifier, so it can tolerate that its BlockBackend is switched to a different AioContext. Before we start actually calling bdrv_try_set_aio_context(), which checks for consistency, outside of test cases, we need to make sure that the NBD server actually allows this. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-06-04test-block-iothread: Check filter node in test_propagate_mirrorKevin Wolf
Just make the test cover the AioContext of the filter node as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2019-06-04nvme: add Get/Set Feature Timestamp supportKenneth Heitke
Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com> Reviewed-by: Klaus Birkelund Jensen <klaus.jensen@cnexlabs.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04block/linux-aio: Drop unused BlockAIOCB submission methodJulia Suvorova
Callback-based laio_submit() and laio_cancel() were left after rewriting Linux AIO backend to coroutines in hope that they would be used in other code that could bypass coroutines. They can be safely removed because they have not been used since that time. Signed-off-by: Julia Suvorova <jusual@mail.ru> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04iotests: Test cancelling a job and closing the VMMax Reitz
This patch adds a test where we cancel a throttled mirror job and immediately close the VM before it can be cancelled. Doing so will invoke bdrv_drain_all() while the mirror job tries to drain the throttled node. When bdrv_drain_all_end() tries to lift its drain on the throttle node, the job will exit and replace the current root node of the BB drive0 (which is the job's filter node) by the throttle node. Before the previous patch, this replacement did not increase drive0's quiesce_counter by a sufficient amount, so when bdrv_parent_drained_end() (invoked by bdrv_do_drained_end(), invoked by bdrv_drain_all_end()) tried to end the drain on all of the throttle node's parents, it decreased drive0's quiesce_counter below 0 -- which fails an assertion. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04block/io: Delay decrementing the quiesce_counterMax Reitz
When ending a drained section, bdrv_do_drained_end() currently first decrements the quiesce_counter, and only then actually ends the drain. The bdrv_drain_invoke(bs, false) call may cause graph changes. Say the graph change involves replacing an existing BB's ("blk") BDS (blk_bs(blk)) by @bs. Let us introducing the following values: - bs_oqc = old_quiesce_counter (so bs->quiesce_counter == bs_oqc - 1) - obs_qc = blk_bs(blk)->quiesce_counter (before bdrv_drain_invoke()) Let us assume there is no blk_pread_unthrottled() involved, so blk->quiesce_counter == obs_qc (before bdrv_drain_invoke()). Now replacing blk_bs(blk) by @bs will reduce blk->quiesce_counter by obs_qc (making it 0) and increase it by bs_oqc-1 (making it bs_oqc-1). bdrv_drain_invoke() returns and we invoke bdrv_parent_drained_end(). This will decrement blk->quiesce_counter by one, so it would be -1 -- were there not an assertion against that in blk_root_drained_end(). We therefore have to keep the quiesce_counter up at least until bdrv_drain_invoke() returns, so that bdrv_parent_drained_end() does the right thing for the parents @bs got during bdrv_drain_invoke(). But let us delay it even further, namely until bdrv_parent_drained_end() returns, because then it mirrors bdrv_do_drained_begin(): There, we first increment the quiesce_counter, then begin draining the parents, and then call bdrv_drain_invoke(). It makes sense to let bdrv_do_drained_end() unravel this exactly in reverse. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04block: avoid recursive block_status call if possibleVladimir Sementsov-Ogievskiy
drv_co_block_status digs bs->file for additional, more accurate search for hole inside region, reported as DATA by bs since 5daa74a6ebc. This accuracy is not free: assume we have qcow2 disk. Actually, qcow2 knows, where are holes and where is data. But every block_status request calls lseek additionally. Assume a big disk, full of data, in any iterative copying block job (or img convert) we'll call lseek(HOLE) on every iteration, and each of these lseeks will have to iterate through all metadata up to the end of file. It's obviously ineffective behavior. And for many scenarios we don't need this lseek at all. However, lseek is needed when we have metadata-preallocated image. So, let's detect metadata-preallocation case and don't dig qcow2's protocol file in other cases. The idea is to compare allocation size in POV of filesystem with allocations size in POV of Qcow2 (by refcounts). If allocation in fs is significantly lower, consider it as metadata-preallocation case. 102 iotest changed, as our detector can't detect shrinked file as metadata-preallocation, which don't seem to be wrong, as with metadata preallocation we always have valid file length. Two other iotests have a slight change in their QMP output sequence: Active 'block-commit' returns earlier because the job coroutine yields earlier on a blocking operation. This operation is loading the refcount blocks in qcow2_detect_metadata_preallocation(). Suggested-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04tests/perf: Test lseek influence on qcow2 block-statusVladimir Sementsov-Ogievskiy
Block layer may recursively check block_status in file child of qcow2, if qcow2 driver returned DATA. There are several test cases to check influence of lseek on block_status performance. To see real difference run on tmpfs. Tests originally created by Kevin, I just refactored and put them together into one executable file with simple output. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04blockdev: fix missed target unref for drive-backupJohn Snow
If the bitmap can't be used for whatever reason, we skip putting down the reference. Fix that. In practice, this means that if you attempt to gracefully exit QEMU after a backup command being rejected, bdrv_close_all will fail and tell you some unpleasant things via assert(). Reported-by: aihua liang <aliang@redhat.com> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1703916 Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-06-04iotests: Test commit job start with concurrent I/OKevin Wolf
This tests that concurrent requests are correctly drained before making graph modifications instead of running into assertions in bdrv_replace_node(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2019-06-04block: Drain source node in bdrv_replace_node()Kevin Wolf
Instead of just asserting that no requests are in flight in bdrv_replace_node(), which is a requirement that most callers ignore, we can just drain the source node right there. This fixes at least starting a commit job while I/O is active on the backing chain, but probably other callers, too. Having requests in flight on the target node isn't a problem because the target just gets new parents, but the call path of running requests isn't modified. So we can just drop this assertion without a replacement. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1711643 Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2019-06-03Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* Revert q35 to kernel irqchip (Alex) * edu device fixes (Li Qiang) * cleanups (Marc-André, Peter) * Improvements to -accel help * Better support for IA32_MISC_ENABLE MSR (Wanpeng) * I2C test conversion to qgraph (Paolo) # gpg: Signature made Mon 03 Jun 2019 14:20:12 BST # 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: (24 commits) q35: Revert to kernel irqchip configure: remove tpm_passthrough & tpm_emulator ci: store Patchew configuration in the tree libqos: i2c: move address into QI2CDevice tests: convert ds1338-test to qtest tests: convert OMAP i2c tests to qgraph libqos: add ARM imx25-pdk machine object libqos: add ARM n800 machine object libqos: convert I2C to qgraph libqos: split I2CAdapter initialization and allocation imx25-pdk: create ds1338 for qtest inside the test pca9552-test: do not rely on state across tests libqos: fix omap-i2c receiving more than 4 bytes libqos: move common i2c code to libqos qgraph: fix qos_node_contains with options qgraph: allow extra_device_opts on contains nodes edu: uses uint64_t in dma operation edu: mmio: allow 64-bit access in read dispatch edu: mmio: allow 64-bit access i386: Enable IA32_MISC_ENABLE MWAIT bit when exposing mwait/monitor ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-03q35: Revert to kernel irqchipAlex Williamson
Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed the default for the pc-q35-4.0 machine type to use split irqchip, which turned out to have disasterous effects on vfio-pci INTx support. KVM resampling irqfds are registered for handling these interrupts, but these are non-functional in split irqchip mode. We can't simply test for split irqchip in QEMU as userspace handling of this interrupt is a significant performance regression versus KVM handling (GeForce GPUs assigned to Windows VMs are non-functional without forcing MSI mode or re-enabling kernel irqchip). The resolution is to revert the change in default irqchip mode in the pc-q35-4.1 machine and create a pc-q35-4.0.1 machine for the 4.0-stable branch. The qemu-q35-4.0 machine type should not be used in vfio-pci configurations for devices requiring legacy INTx support without explicitly modifying the VM configuration to use kernel irqchip. Link: https://bugs.launchpad.net/qemu/+bug/1826422 Fixes: b2fc91db8447 ("q35: set split kernel irqchip as default") Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Message-Id: <155786484688.13873.6037015630912983760.stgit@gimli.home> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03configure: remove tpm_passthrough & tpm_emulatorMarc-André Lureau
This is a left-over from commit 7aaa6a16373 "tpm: express dependencies with Kconfig". Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190524181411.8599-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03ci: store Patchew configuration in the treePaolo Bonzini
Patchew cannot yet retrieve the configuration from the QEMU Git tree, but this is planned. In the meanwhile, let's start storing it as YAML so that the Patchew configuration (currently accessible only to administrators) is public and documented. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03libqos: i2c: move address into QI2CDevicePaolo Bonzini
This removes the hardcoded I2C address from the tests. The address is passed via QOSGraphEdgeOptions to i2c_device_create and stored in the QI2CDevice. The i2c_send and i2c_recv functions, along with their wrappers, therefore, can be changed to take a QI2CDevice rather than an adapter/address pair. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03tests: convert ds1338-test to qtestPaolo Bonzini
This way, ds1338-test will run for every machine that exposes an i2c-bus. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03tests: convert OMAP i2c tests to qgraphPaolo Bonzini
This way, pca9952-test and tmp105-test will run for every machine that exposes an i2c-bus. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03libqos: add ARM imx25-pdk machine objectPaolo Bonzini
This is used to test imx_i2c. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03libqos: add ARM n800 machine objectPaolo Bonzini
This is used to test omap_i2c. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03libqos: convert I2C to qgraphPaolo Bonzini
Create an i2c-bus interface, corresponding to the I2CAdapter struct. Wrap IMXI2C and OMAPI2C with a QOSGraphObject, and add the get_driver function to retrieve the I2CAdapter. The conversion is still not complete; for simplicity, i2c_recv and i2c_send (along with their wrappers) still take an adapter/address pair. Fixing that would be complicated until the tests are converted to qgraph, so it is left for after the conversion. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03libqos: split I2CAdapter initialization and allocationPaolo Bonzini
Provide *_init functions that populate an I2CAdapter struct without allocating one, and make the existing *_create functions wrap them. Because in the new setup *_create might return a pointer inside the IMXI2C or OMAPI2C struct, create companion *_free functions to go back to the outer pointer. All this is temporary until allocation will be handled entirely by qgraph. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03imx25-pdk: create ds1338 for qtest inside the testPaolo Bonzini
There is no need to have a test device created by the board. Instead, create it in the qtest so that we will be able to run it on other boards too. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03pca9552-test: do not rely on state across testsPaolo Bonzini
receive_autoinc is relying on the LED state that is set by send_and_receive. Stop doing that, because qgraph resets the machine between tests. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03libqos: fix omap-i2c receiving more than 4 bytesPaolo Bonzini
If more than 4 bytes are received, the FIFO cannot host the entire contents of the transfer and STP will be nonzero before entering the transfer loop. Also, CNT will contain the number of bytes left to be transferred instead of the total number of bytes in the transfer. (Reverse engineered from the omap_i2c.c source code; no available datasheet). This will fix ds1338-test for omap-i2c. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03libqos: move common i2c code to libqosPaolo Bonzini
The functions to read/write 8-bit or 16-bit registers are the same in tmp105 and pca9552 tests, and in fact they are a special case of "read block"/"write block" functionality; read block in turn is used in ds1338-test. Move everything inside libqos-test, removing the duplication. Account for the small differences by adding to tmp105-test.c the "read register after writing" behavior that is specific to it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03qgraph: fix qos_node_contains with optionsPaolo Bonzini
Currently, if qos_node_contains was passed options, it would still create an edge without any options. Instead, in that case NULL acts as a terminator. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03qgraph: allow extra_device_opts on contains nodesPaolo Bonzini
Allow choosing the bus that the device will be placed on, in case the machine has more than one. Otherwise, the bus may not match the base address of the controller we attach it to. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03edu: uses uint64_t in dma operationLi Qiang
The dma related variable dma.dst/src/cnt is dma_addr_t, it is uint64_t in x64 platform. Change these usage from uint32_to uint64_t to avoid trancation in edu_dma_timer. Signed-off-by: Li Qiang <liq3ea@163.com> Message-Id: <20190510164349.81507-4-liq3ea@163.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03edu: mmio: allow 64-bit access in read dispatchLi Qiang
The edu spec says when address >= 0x80, the MMIO area can be accessed by 64-bit. Signed-off-by: Li Qiang <liq3ea@163.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20190510164349.81507-3-liq3ea@163.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03edu: mmio: allow 64-bit accessLi Qiang
The edu spec says the MMIO area can be accessed by 64-bit. However currently the 'max_access_size' is not so the MMIO access dispatch can only access 32-bit one time. This patch fixes this to respect the spec. Signed-off-by: Li Qiang <liq3ea@163.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20190510164349.81507-2-liq3ea@163.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03i386: Enable IA32_MISC_ENABLE MWAIT bit when exposing mwait/monitorWanpeng Li
The CPUID.01H:ECX[bit 3] ought to mirror the value of the MSR IA32_MISC_ENABLE MWAIT bit and as userspace has control of them both, it is userspace's job to configure both bits to match on the initial setup. Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Message-Id: <1557813999-9175-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03memory: Remove memory_region_get_dirty()Peter Xu
It's never used anywhere. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20190520030839.6795-5-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03checkpatch: allow SPDX-License-IdentifierPeter Xu
According to: https://spdx.org/ids-how, let's still allow QEMU to use the SPDX license identifier: // SPDX-License-Identifier: *** CC: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20190426062705.4651-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03vl: make -accel help to list enabled accelerators onlyWainer dos Santos Moschetta
Currently, -accel help shows all possible accelerators regardless if they are enabled in the binary or not. That is a different semantic from -cpu and -machine helps, for example. So this change makes it to list only the accelerators which support is compiled in the binary target. Note that it does not check if the accelerator is enabled in the host, so the help message's header was rewritten to emphasize that. Also qtest is not displayed given that it is used for internal testing purpose only. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20190530215755.328-2-wainersm@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03test-thread-pool: be more reliablePaolo Bonzini
There is a rare race between the atomic_cmpxchg and bdrv_aio_cancel/bdrv_aio_cancel_async invocations. Detect it, the only sensible we can do about it is to exit long_cb immediately. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-06-03Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jun-1-2019' ↵Peter Maydell
into staging MIPS queue for June 1st, 2019 # gpg: Signature made Sat 01 Jun 2019 19:20:47 BST # gpg: using RSA key D4972A8967F75A65 # gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>" [unknown] # 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: 8526 FBF1 5DA3 811F 4A01 DD75 D497 2A89 67F7 5A65 * remotes/amarkovic/tags/mips-queue-jun-1-2019: target/mips: Improve performance of certain MSA instructions target/mips: Clean up lmi_helper.c target/mips: Clean up dsp_helper.c tests/tcg: target/mips: Add tests for MSA bit set instructions target/mips: Amend and cleanup MSA TCG tests target/mips: Add emulation of MMI instruction PCPYUD target/mips: Add emulation of MMI instruction PCPYLD target/mips: Add emulation of MMI instruction PCPYH Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-01target/mips: Improve performance of certain MSA instructionsMateja Marjanovic
Eliminate loops for better performance. Following MSA instructions from "UNOP" group are affected: - NLZC.<B|H|W|D> - NLOC.<B|H|W|D> - PCNT.<B|H|W|D> Following MSA instructions from "BINOP" group are affected: - ADD_A.<B|H|W|D> - ADDS_A.<B|H|W|D> - ADDS_S.<B|H|W|D> - ADDS_U.<B|H|W|D> - ADDV.<B|H|W|D> - ASUB_S.<B|H|W|D> - ASUB_U.<B|H|W|D> - AVE_S.<B|H|W|D> - AVE_U.<B|H|W|D> - AVER_S.<B|H|W|D> - AVER_U.<B|H|W|D> - BCLR.<B|H|W|D> - BNEG.<B|H|W|D> - BSET.<B|H|W|D> - CEQ.<B|H|W|D> - CLE_S.<B|H|W|D> - CLE_U.<B|H|W|D> - CLT_S.<B|H|W|D> - CLT_U.<B|H|W|D> - DIV_S.<B|H|W|D> - DIV_U.<B|H|W|D> - DOTP_S.<B|H|W|D> - DOTP_U.<B|H|W|D> - HADD_S.<B|H|W|D> - HADD_U.<B|H|W|D> - HSUB_S.<B|H|W|D> - HSUB_U.<B|H|W|D> - MAX_A.<B|H|W|D> - MAX_S.<B|H|W|D> - MAX_U.<B|H|W|D> - MIN_A.<B|H|W|D> - MIN_S.<B|H|W|D> - MIN_U.<B|H|W|D> - MOD_S.<B|H|W|D> - MOD_U.<B|H|W|D> - MUL_Q.<B|H|W|D> - MULR_Q.<B|H|W|D> - MULV.<B|H|W|D> - SLL.<B|H|W|D> - SRA.<B|H|W|D> - SRAR.<B|H|W|D> - SRL.<B|H|W|D> - SRLR.<B|H|W|D> - SUBS_S.<B|H|W|D> - SUBS_U.<B|H|W|D> - SUBSUS_U.<B|H|W|D> - SUBSUU_S.<B|H|W|D> - SUBV.<B|H|W|D> Following MSA instructions from "TEROP" group are affected: - BINSL.<B|H|W|D> - BINSR.<B|H|W|D> - DPADD_S.<B|H|W|D> - DPADD_U.<B|H|W|D> - DPSUB_S.<B|H|W|D> - DPSUB_U.<B|H|W|D> - MADD_Q.<B|H|W|D> - MADDR_Q.<B|H|W|D> - MADDV.<B|H|W|D> - MSUB_Q.<B|H|W|D> - MSUBR_Q.<B|H|W|D> - MSUBV.<B|H|W|D> Additionally, following MSA instructionas are also affected: - ILVL.<B|H|W|D> - ILVR.<B|H|W|D> - ILVEV.<B|H|W|D> - ILVOD.<B|H|W|D> - PCKEV.<B|H|W|D> - PCKOD.<B|H|W|D> Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1551718283-4487-2-git-send-email-mateja.marjanovic@rt-rk.com>
2019-06-01target/mips: Clean up lmi_helper.cAleksandar Markovic
Remove several minor checkpatch warnings and errors. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1556018982-3715-7-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-01target/mips: Clean up dsp_helper.cAleksandar Markovic
Remove several minor checkpatch warnings and errors. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1556018982-3715-6-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-01tests/tcg: target/mips: Add tests for MSA bit set instructionsAleksandar Markovic
Add tests for MSA bit set instructions. This includes following instructions: * BCLR.B - clear bit (bytes) * BCLR.H - clear bit (halfwords) * BCLR.W - clear bit (words) * BCLR.D - clear bit (doublewords) * BNEG.B - negate bit (bytes) * BNEG.H - negate bit (halfwords) * BNEG.W - negate bit (words) * BNEG.D - negate bit (doublewords) * BSET.B - set bit (bytes) * BSET.H - set bit (halfwords) * BSET.W - set bit (words) * BSET.D - set bit (doublewords) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1555699081-24577-5-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-01target/mips: Amend and cleanup MSA TCG testsAleksandar Markovic
Add missing bits and peaces of the tests of the emulation of certain MSA (non-immediate variants): some tests were missing two last cases; some instructions were missing wrappers; some test included wrong headers; some tests were missing altogether; updated some copywright preambles; do several other minor cleanups. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1555699081-24577-4-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-01target/mips: Add emulation of MMI instruction PCPYUDMateja Marjanovic
Add emulation of MMI instruction PCPYUD. The emulation is implemented using TCG front end operations directly to achieve better performance. Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1551712405-2530-4-git-send-email-mateja.marjanovic@rt-rk.com>
2019-06-01target/mips: Add emulation of MMI instruction PCPYLDMateja Marjanovic
Add emulation of MMI instruction PCPYLD. The emulation is implemented using TCG front end operations directly to achieve better performance. Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1551712405-2530-3-git-send-email-mateja.marjanovic@rt-rk.com>
2019-06-01target/mips: Add emulation of MMI instruction PCPYHMateja Marjanovic
Add emulation of MMI instruction PCPYH. The emulation is implemented using TCG front end operations directly to achieve better performance. Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1551712405-2530-2-git-send-email-mateja.marjanovic@rt-rk.com>
2019-05-30Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.1-20190529' ↵Peter Maydell
into staging ppc patch queue 2019-05-29 Next pull request against qemu-4.1. Highlights: * KVM accelerated support for the XIVE interrupt controller in PAPR guests * A number of TCG vector fixes * Fixes for the PReP / 40p machine * Improvements to make check-tcg test coverage Other than that it's just a bunch of assorted fixes, cleanups and minor improvements. This supersedes both the pull request dated 2019-05-21 and the one dated 2019-05-22. I've dropped one hunk which I think may have caused the check-tcg failure that Peter saw (by enabling the ppc64abi32 build, which I think has been broken for ages). I'm not entirely certain, since I haven't reproduced exactly the same failure. # gpg: Signature made Wed 29 May 2019 07:49:04 BST # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full] # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full] # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full] # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-4.1-20190529: (44 commits) ppc/pnv: add dummy XSCOM registers for PRD initialization ppc/pnv: introduce new skiboot platform properties spapr: Don't migrate the hpt_maxpagesize cap to older machine types spapr: change default interrupt mode to 'dual' spapr/xive: fix multiple resets when using the 'dual' interrupt mode docs: provide documentation on the POWER9 XIVE interrupt controller spapr/irq: add KVM support to the 'dual' machine ppc/xics: fix irq priority in ics_set_irq_type() spapr/irq: initialize the IRQ device only once spapr/irq: introduce a spapr_irq_init_device() helper spapr: check for the activation of the KVM IRQ device spapr: introduce routines to delete the KVM IRQ device sysbus: add a sysbus_mmio_unmap() helper spapr/xive: activate KVM support spapr/xive: add migration support for KVM spapr/xive: introduce a VM state change handler spapr/xive: add state synchronization with KVM spapr/xive: add hcall support when under KVM spapr/xive: add KVM support spapr: Print out extra hints when CAS negotiation of interrupt mode fails ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>