OSDN Git Service
Peter Maydell [Thu, 12 Jan 2017 18:29:49 +0000 (18:29 +0000)]
Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-2017-01-11-2' into staging
TriCore FPU patches
# gpg: Signature made Wed 11 Jan 2017 13:40:11 GMT
# gpg: using RSA key 0x0AD2C6396B69CA14
# gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>"
# Primary key fingerprint: 6E63 6A7E 83F2 DD0C FA6E 6E37 0AD2 C639 6B69 CA14
* remotes/bkoppelmann/tags/pull-tricore-2017-01-11-2:
target-tricore: Add updfl instruction
target-tricore: Added new JNE instruction variant
target-tricore: Added new MOV instruction variant
target-tricore: Added MADD.F and MSUB.F instructions
target-tricore: Added FTOUZ instruction
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 12 Jan 2017 17:51:41 +0000 (17:51 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-
20170111-1' into staging
vga: fixes for virtio-gpu and cirrus.
# gpg: Signature made Wed 11 Jan 2017 10:24:24 GMT
# gpg: using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/pull-vga-
20170111-1:
virtio-gpu: tag as not hotpluggable
virtio-gpu: Fix memory leak in virtio_gpu_load()
virtio-gpu: Recalculate VirtIOGPU::hostmem on VM load
display: cirrus: ignore source pitch value as needed in blit_is_unsafe
virtio-gpu: fix information leak in capset get dispatch
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 12 Jan 2017 15:57:18 +0000 (15:57 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-
20170111-1' into staging
audio: qomify drivers, hotplug fixes.
# gpg: Signature made Wed 11 Jan 2017 09:32:09 GMT
# gpg: using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/pull-audio-
20170111-1:
es1370: wire up reset via DeviceClass
audio: ac97: add exit function
audio: es1370: add exit function
hw/audio: QOM'ify pl041.c
hw/audio: QOM'ify marvell_88w8618.c
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 12 Jan 2017 13:21:32 +0000 (13:21 +0000)]
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-
20170110' into staging
TCG opcodes for extract, clz, ctz, ctpop
# gpg: Signature made Wed 11 Jan 2017 02:12:41 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-
20170110: (65 commits)
tcg/i386: Handle ctpop opcode
tcg/ppc: Handle ctpop opcode
tcg: Use ctpop to generate ctz if needed
tests: New test-bitcnt
qemu/host-utils.h: Reduce the operation count in the fallback ctpop
target-i386: Use ctpop helper
target-tilegx: Use ctpop helper
target-sparc: Use ctpop helper
target-s390x: Avoid a loop for popcnt
target-ppc: Use ctpop helper
target-alpha: Use ctpop helper
tcg: Add opcode for ctpop
target-xtensa: Use clrsb helper
target-tricore: Use clrsb helper
target-arm: Use clrsb helper
tcg: Add helpers for clrsb
tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR
tcg/i386: Handle ctz and clz opcodes
tcg/i386: Allow bmi2 shiftx to have non-matching operands
tcg/i386: Hoist common arguments in tcg_out_op
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Greg Kurz [Wed, 11 Jan 2017 08:49:32 +0000 (09:49 +0100)]
libqtest: handle zero length memwrite/memread
Some recently added tests pass a zero length to qtest_memwrite().
Unfortunately, the qtest protocol doesn't implement an on-the-wire
syntax for zero-length writes and the current code happily sends
garbage to QEMU. This causes intermittent failures.
It isn't worth the pain to enhance the protocol, so this patch
simply fixes the issue by "just return, doing nothing". The same
fix is applied to qtest_memread() since the issue also exists in
the QEMU part of the "memread" command.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id:
148412457273.22750.
983275587432075569.stgit@bahia
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Bastian Koppelmann [Thu, 6 Oct 2016 15:52:04 +0000 (17:52 +0200)]
target-tricore: Add updfl instruction
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Peer Adelt [Tue, 7 Jun 2016 15:49:15 +0000 (17:49 +0200)]
target-tricore: Added new JNE instruction variant
If D[15] is != sign_ext(const4) then PC will be set to (PC +
zero_ext(disp4 + 16)).
[BK: fixed style errors]
Signed-off-by: Peer Adelt <peer.adelt@c-lab.de>
Message-Id: <
1465314555-11501-5-git-send-email-peer.adelt@c-lab.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Peer Adelt [Tue, 7 Jun 2016 15:49:14 +0000 (17:49 +0200)]
target-tricore: Added new MOV instruction variant
Puts the content of data register D[a] into E[c][63:32] and the
content of data register D[b] into E[c][31:0].
[BK: fix style error]
[BK: Allocate temporaries only when needed]
Signed-off-by: Peer Adelt <peer.adelt@c-lab.de>
Message-Id: <
1465314555-11501-4-git-send-email-peer.adelt@c-lab.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Bastian Koppelmann [Thu, 6 Oct 2016 14:50:53 +0000 (16:50 +0200)]
target-tricore: Added MADD.F and MSUB.F instructions
Multiplies D[a] and D[b] and adds/subtracts the result to/from D[d].
The result is put in D[c]. All operands are floating-point numbers.
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Bastian Koppelmann [Thu, 6 Oct 2016 14:46:36 +0000 (16:46 +0200)]
target-tricore: Added FTOUZ instruction
Converts a 32-bit floating point number to an unsigned int. The
result is rounded towards zero.
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Gerd Hoffmann [Mon, 9 Jan 2017 13:55:38 +0000 (14:55 +0100)]
virtio-gpu: tag as not hotpluggable
qemu can't hotplug display devices.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id:
1483970138-20360-1-git-send-email-kraxel@redhat.com
Peter Maydell [Mon, 9 Jan 2017 13:38:43 +0000 (13:38 +0000)]
virtio-gpu: Fix memory leak in virtio_gpu_load()
Coverity points out that if we fail in the "creating resources"
loop in virtio_gpu_load() we will leak various resources (CID
1356431).
Failing a VM load is going to leave the simulation in a complete mess,
but we can tidy up to the point that a full system reset should
get us back to sanity.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
1483969123-14839-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Peter Maydell [Mon, 9 Jan 2017 13:38:42 +0000 (13:38 +0000)]
virtio-gpu: Recalculate VirtIOGPU::hostmem on VM load
The 'hostmem' field in VirtIOGPU is used to track the total memory
used in pixmaps so that we can impose a maximum limit on it.
However this field is neither migrated nor recalculated on
VM load, which means that after a migration it will be incorrectly
too low, which can allow the guest to use more pixmap memory
than it should. The per-resource hostmem fields are not filled
in either as we reallocate them in the load function.
Recalculate the memory used for each pixmap and the total memory
used as we reallocate the pixmaps in virtio_gpu_load().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
1483969123-14839-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Bruce Rogers [Mon, 9 Jan 2017 20:35:20 +0000 (13:35 -0700)]
display: cirrus: ignore source pitch value as needed in blit_is_unsafe
Commit
4299b90 added a check which is too broad, given that the source
pitch value is not required to be initialized for solid fill operations.
This patch refines the blit_is_unsafe() check to ignore source pitch in
that case. After applying the above commit as a security patch, we
noticed the SLES 11 SP4 guest gui failed to initialize properly.
Signed-off-by: Bruce Rogers <brogers@suse.com>
Message-id:
20170109203520.5619-1-brogers@suse.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Li Qiang [Tue, 1 Nov 2016 12:37:57 +0000 (05:37 -0700)]
virtio-gpu: fix information leak in capset get dispatch
In virgl_cmd_get_capset function, it uses g_malloc to allocate
a response struct to the guest. As the 'resp'struct hasn't been full
initialized it will lead the 'resp->padding' field to the guest.
Use g_malloc0 to avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id:
58188cae.
4a6ec20a.3d2d1.aff2@mx.google.com
[ kraxel: resolved conflict ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 10 Jan 2017 13:18:01 +0000 (14:18 +0100)]
es1370: wire up reset via DeviceClass
Instead of using qemu_register_reset().
That way we get proper cleanup for free.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id:
1484054281-26139-1-git-send-email-kraxel@redhat.com
Li Qiang [Thu, 15 Dec 2016 02:30:21 +0000 (18:30 -0800)]
audio: ac97: add exit function
Currently the ac97 device emulation doesn't have a exit function,
hot unplug this device will leak some memory. Add a exit function to
avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id:
58520052.
4825ed0a.27a71.6cae@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Li Qiang [Thu, 15 Dec 2016 02:32:22 +0000 (18:32 -0800)]
audio: es1370: add exit function
Currently the es1370 device emulation doesn't have a exit function,
hot unplug this device will leak some memory. Add a exit function to
avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id:
585200c9.
a968ca0a.1ab80.4c98@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xiaoqiang zhao [Sat, 31 Dec 2016 01:17:20 +0000 (09:17 +0800)]
hw/audio: QOM'ify pl041.c
split the old SysBus init function into an instance_init
and Device realize function
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Message-id:
20161231011720.3965-3-zxq_yx_007@163.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xiaoqiang zhao [Sat, 31 Dec 2016 01:17:19 +0000 (09:17 +0800)]
hw/audio: QOM'ify marvell_88w8618.c
split the old SysBus init function into an instance_init
and Device realize function
Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Message-id:
20161231011720.3965-2-zxq_yx_007@163.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Richard Henderson [Tue, 22 Nov 2016 13:15:04 +0000 (14:15 +0100)]
tcg/i386: Handle ctpop opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 22 Nov 2016 11:43:12 +0000 (11:43 +0000)]
tcg/ppc: Handle ctpop opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 22 Nov 2016 12:40:35 +0000 (12:40 +0000)]
tcg: Use ctpop to generate ctz if needed
Particularly when andc is also available, this is two insns
shorter than using clz to compute ctz.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Alex Bennée [Fri, 9 Dec 2016 14:36:00 +0000 (14:36 +0000)]
tests: New test-bitcnt
Add some unit tests for bit count functions (currently only ctpop). As
the routines are based on the Hackers Delight optimisations I based
the test patterns on their tests.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 11:30:34 +0000 (12:30 +0100)]
qemu/host-utils.h: Reduce the operation count in the fallback ctpop
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 11:18:53 +0000 (12:18 +0100)]
target-i386: Use ctpop helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 11:10:28 +0000 (12:10 +0100)]
target-tilegx: Use ctpop helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 11:08:27 +0000 (12:08 +0100)]
target-sparc: Use ctpop helper
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 11:06:26 +0000 (12:06 +0100)]
target-s390x: Avoid a loop for popcnt
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 10:58:25 +0000 (11:58 +0100)]
target-ppc: Use ctpop helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 10:48:24 +0000 (11:48 +0100)]
target-alpha: Use ctpop helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 21 Nov 2016 10:13:39 +0000 (11:13 +0100)]
tcg: Add opcode for ctpop
The number of actual invocations of ctpop itself does not warrent
an opcode, but it is very helpful for POWER7 to use in generating
an expansion for ctz.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 16:38:10 +0000 (17:38 +0100)]
target-xtensa: Use clrsb helper
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 16:36:51 +0000 (17:36 +0100)]
target-tricore: Use clrsb helper
Tested-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 16:35:35 +0000 (17:35 +0100)]
target-arm: Use clrsb helper
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 16:32:48 +0000 (17:32 +0100)]
tcg: Add helpers for clrsb
The number of actual invocations does not warrent an opcode,
and the backends generating it. But at least we can eliminate
redundant helpers.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 16:02:59 +0000 (17:02 +0100)]
tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR
The ISA manual documents the output is undefined if the input was zero.
However, we document in target-i386 that the behavior of real silicon
is to preserve the contents of the output register. We also mention
that there are real applications that depend on this. That this is
baked into silicon is mentioned as a potential cause for some false
sharing behaviour wrt lzcnt/tzcnt.
Taking advantage of this allows us to save 2 insns in the normal case,
and 4 insns for i686 emulating a 64-bit clz.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 11:22:54 +0000 (12:22 +0100)]
tcg/i386: Handle ctz and clz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 13:18:41 +0000 (14:18 +0100)]
tcg/i386: Allow bmi2 shiftx to have non-matching operands
Previously we could not have different constraints for different ISA levels,
which prevented us from eliding the matching constraint for shifts.
We do now have to make sure that the operands match for constant shifts.
We can also handle some small left shifts via lea.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 11:50:50 +0000 (12:50 +0100)]
tcg/i386: Hoist common arguments in tcg_out_op
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 10:55:41 +0000 (11:55 +0100)]
tcg/i386: Fuly convert tcg_target_op_def
Use a switch instead of searching a table. Share constraints between
32-bit and 64-bit, when at all possible.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 15:10:37 +0000 (16:10 +0100)]
tcg/s390: Handle clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 14:34:03 +0000 (15:34 +0100)]
tcg/mips: Handle clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 13:59:40 +0000 (14:59 +0100)]
tcg/arm: Handle ctz and clz opcodes
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 13:03:28 +0000 (14:03 +0100)]
tcg/aarch64: Handle ctz and clz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 11:48:55 +0000 (12:48 +0100)]
tcg/ppc: Handle ctz and clz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 11:21:13 +0000 (12:21 +0100)]
target-i386: Use clz and ctz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:49:06 +0000 (11:49 +0100)]
target-arm: Use clz opcode
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:48:37 +0000 (11:48 +0100)]
target-xtensa: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:40:39 +0000 (11:40 +0100)]
target-unicore32: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:37:15 +0000 (11:37 +0100)]
target-tricore: Use clz opcode
Tested-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:33:48 +0000 (11:33 +0100)]
target-tilegx: Use clz and ctz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:30:34 +0000 (11:30 +0100)]
target-s390x: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:27:03 +0000 (11:27 +0100)]
target-ppc: Use clz and ctz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:17:45 +0000 (11:17 +0100)]
target-openrisc: Use clz and ctz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 10:11:54 +0000 (11:11 +0100)]
target-mips: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 09:58:52 +0000 (10:58 +0100)]
target-microblaze: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 09:54:57 +0000 (10:54 +0100)]
target-cris: Use clz opcode
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 09:23:30 +0000 (10:23 +0100)]
target-alpha: Use the ctz and clz opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 22 Nov 2016 12:38:46 +0000 (12:38 +0000)]
disas/ppc: Handle popcnt and cnttz
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 11:22:15 +0000 (12:22 +0100)]
disas/i386.c: Handle tzcnt
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 16 Nov 2016 08:23:28 +0000 (09:23 +0100)]
tcg: Add clz and ctz opcodes
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 16:41:24 +0000 (17:41 +0100)]
tcg: Allow an operand to be matching or a constant
This allows an output operand to match an input operand
only when the input operand needs a register.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 10:50:59 +0000 (11:50 +0100)]
tcg: Pass the opcode width to target_parse_constraint
This will let us choose how to interpret a given constraint
depending on whether the opcode is 32- or 64-bit. Which will
let us share more constraint combinations between opcodes.
At the same time, change the interface to return the advanced
pointer instead of passing it in/out by reference.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 08:31:40 +0000 (09:31 +0100)]
tcg: Transition flat op_defs array to a target callback
This will allow the target to tailor the constraints to the
auto-detected ISA extensions.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 18 Nov 2016 07:35:03 +0000 (08:35 +0100)]
tcg: Add markup for output requires new register
This is the same concept as, and same markup as, the
early clobber markup in gcc.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 24 Oct 2016 03:44:32 +0000 (20:44 -0700)]
tcg/optimize: Fold movcond 0/1 into setcond
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 17 Oct 2016 21:50:31 +0000 (14:50 -0700)]
target-s390x: Use the new deposit and extract ops
Use the new primitives for RISBG.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sat, 15 Oct 2016 18:37:19 +0000 (13:37 -0500)]
target-ppc: Use the new deposit and extract ops
Use the new primitives for RDWINM and RLDICL.
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sat, 15 Oct 2016 17:04:13 +0000 (12:04 -0500)]
target-mips: Use the new extract op
Use extract for EXT and DEXT.
Reviewed-by: Yongbok Kim <yongbok.kim@imgtec.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sat, 15 Oct 2016 16:54:17 +0000 (11:54 -0500)]
target-i386: Use new deposit and extract ops
A couple of places where it was easy to identify a right-shift
followed by an extract or and-with-immediate, and the obvious
sign-extract from a high byte register.
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sat, 15 Oct 2016 16:41:29 +0000 (11:41 -0500)]
target-arm: Use new deposit and extract ops
Use the new primitives for UBFX and SBFX.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 22:35:42 +0000 (17:35 -0500)]
target-alpha: Use deposit and extract ops
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Tue, 18 Oct 2016 00:00:46 +0000 (17:00 -0700)]
tcg/s390: Support deposit into zero
Since we can no longer use matching constraints, this does
mean we must handle that data movement by hand.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 19:26:40 +0000 (14:26 -0500)]
tcg/s390: Implement field extraction opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 17 Oct 2016 15:24:38 +0000 (11:24 -0400)]
tcg/s390: Expose host facilities to tcg-target.h
This lets us expose facilities to TCG_TARGET_HAS_* defines
directly, rather than hiding behind function calls.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 19:18:03 +0000 (14:18 -0500)]
tcg/ppc: Implement field extraction opcodes
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 20:50:25 +0000 (15:50 -0500)]
tcg/mips: Implement field extraction opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 19:08:13 +0000 (14:08 -0500)]
tcg/i386: Implement field extraction opcodes
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sat, 15 Oct 2016 00:51:45 +0000 (19:51 -0500)]
tcg/arm: Implement field extraction opcodes
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Sat, 15 Oct 2016 00:45:26 +0000 (19:45 -0500)]
tcg/arm: Move isa detection to tcg-target.h
This allows us to use this detection within the TCG_TARGET_HAS_*
macros, instead of requiring a function call into tcg-target.inc.c.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 18:20:49 +0000 (13:20 -0500)]
tcg/aarch64: Implement field extraction opcodes
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 17 Oct 2016 20:21:31 +0000 (13:21 -0700)]
tcg: Add deposit_z expander
While we don't require a new opcode, it is handy to have an expander
that knows the first source is zero.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 22:26:38 +0000 (17:26 -0500)]
tcg: Minor adjustments to deposit expanders
Assert that len is not 0.
Since we have asserted that ofs + len <= N, a later
check for len == N implies that ofs == 0.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 14 Oct 2016 17:04:32 +0000 (12:04 -0500)]
tcg: Add field extraction primitives
Adds tcg_gen_extract_* and tcg_gen_sextract_* for extraction of
fixed position bitfields, much like we already have for deposit.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Peter Maydell [Tue, 10 Jan 2017 14:52:34 +0000 (14:52 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-
20170110-1' into staging
gtk,vnc: misc bugfixes.
kbd: add jp keys, fix ps2 regressions.
sdl: export window id for baum, remove sdl hooks from baum.
egl: egl-helpers.c license change.
# gpg: Signature made Tue 10 Jan 2017 07:16:05 GMT
# gpg: using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/pull-ui-
20170110-1:
ps2: Fix lost scancodes by recent changes
curses: Fix compiler warnings (Mingw-w64 redefinition of macro KEY_EVENT)
ui/vnc: Fix problem with sending too many bytes as server name
gtk: avoid oob array access
egl-helpers: Change file licensing to LGPLv2
sdl2: set window ID
console: move window ID code from baum to sdl
console: add API to get underlying gui window ID
ui: use evdev keymap when running under wayland
ui/gtk: fix crash at startup when no console is available
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 10 Jan 2017 10:46:21 +0000 (10:46 +0000)]
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio, vhost, pc: fixes, features
beginnings of iotlb support for vhost
acpi hotplug rework
vhost net tx flush on link down
passing mtu to guests
hotplug for virtio crypto
fixes and cleanups all over the place
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Tue 10 Jan 2017 05:37:48 GMT
# gpg: using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream: (41 commits)
acpi-test: update expected files
memhp: move DIMM devices into dedicated scope with related common methods
memhp: don't generate memory hotplug AML if it's not enabled/supported
memhp: move memory hotplug only defines to memory_hotplug.c
memhp: move GPE handler_E03 into build_memory_hotplug_aml()
memhp: merge build_memory_devices() into build_memory_hotplug_aml()
memhp: consolidate scattered MHPD device declaration
memhp: move build_memory_devices() into memory_hotplug.c
memhp: move build_memory_hotplug_aml() into memory_hotplug.c
tests: pc: add memory hotplug acpi tables tests
virtio-net: Add MTU feature support
vhost-net: Notify the backend about the host MTU
vhost-user: Add MTU protocol feature and op
net: virtio-net discards TX data after link down
virtio: Introduce virtqueue_drop_all procedure
net: vhost stop updates virtio queue state
net: Add virtio queue interface to update used index from vring state
balloon: Don't balloon roms
virtio: fix vq->inuse recalc after migr
pcie_aer: support configurable AER capa version
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
OGAWA Hirofumi [Tue, 27 Dec 2016 19:55:51 +0000 (04:55 +0900)]
ps2: Fix lost scancodes by recent changes
With "ps2: use QEMU qcodes instead of scancodes", key handling was
changed to qcode base. But all scancodes are not converted to new one.
This adds some missing qcodes/scancodes what I found in using.
[set1 and set3 are from <hpoussin@reactos.org>]
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Stefan Weil [Sat, 19 Nov 2016 18:53:18 +0000 (19:53 +0100)]
curses: Fix compiler warnings (Mingw-w64 redefinition of macro KEY_EVENT)
For builds with Mingw-w64 as it is included in Cygwin, there are two
header files which define KEY_EVENT with different values.
This results in lots of compiler warnings like this one:
CC vl.o
In file included from /qemu/include/ui/console.h:340:0,
from /qemu/vl.c:76:
/usr/i686-w64-mingw32/sys-root/mingw/include/curses.h:1522:0: warning: "KEY_EVENT" redefined
#define KEY_EVENT 0633 /* We were interrupted by an event */
In file included from /usr/share/mingw-w64/include/windows.h:74:0,
from /usr/share/mingw-w64/include/winsock2.h:23,
from /qemu/include/sysemu/os-win32.h:29,
from /qemu/include/qemu/osdep.h:100,
from /qemu/vl.c:24:
/usr/share/mingw-w64/include/wincon.h:101:0: note: this is the location of the previous definition
#define KEY_EVENT 0x1
QEMU only uses the KEY_EVENT macro from wincon.h.
Therefore we can undefine the macro coming from curses.h.
The explicit include statement for curses.h in ui/curses.c is not needed
and was removed.
Those two modifications fix the redefinition warnings.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id:
20161119185318.10564-1-sw@weilnetz.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Thomas Huth [Mon, 21 Nov 2016 17:25:15 +0000 (18:25 +0100)]
ui/vnc: Fix problem with sending too many bytes as server name
If the buffer is not big enough, snprintf() does not return the number
of bytes that have been written to the buffer, but the number of bytes
that would be needed for writing the whole string. By using this value
for the following vnc_write() calls, we send some junk at the end of
the name in case the qemu_name is longer than 1017 bytes, which could
confuse the VNC clients. Fix this by adding an additional size check
here.
Buglink: https://bugs.launchpad.net/qemu/+bug/1637447
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
1479749115-21932-1-git-send-email-thuth@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Marc-André Lureau [Wed, 7 Dec 2016 10:55:11 +0000 (13:55 +0300)]
gtk: avoid oob array access
When too many consoles are created, vcs[] may be write out-of-bounds.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id:
20161207105511.25173-1-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Frediano Ziglio [Thu, 8 Dec 2016 10:45:39 +0000 (10:45 +0000)]
egl-helpers: Change file licensing to LGPLv2
The relicense permits sharing the code with Spice which
is LGPL.
All people listed below have agreed to the
relicense:
- Arei Gonglei;
- Cole Robinson;
- Gerd Hoffmann;
- Peter Maydell.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Cole Robinson <crobinso@redhat.com>
Acked-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
20161208104539.3045-1-fziglio@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Samuel Thibault [Wed, 21 Dec 2016 00:38:06 +0000 (01:38 +0100)]
sdl2: set window ID
This uses the console API to record the window ID of the SDL2 windows.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id:
20161221003806.22412-4-samuel.thibault@ens-lyon.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Samuel Thibault [Wed, 21 Dec 2016 00:38:05 +0000 (01:38 +0100)]
console: move window ID code from baum to sdl
This moves the SDL bits for window ID from the baum driver to SDL, as
well as fixing the build for non-X11.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id:
20161221003806.22412-3-samuel.thibault@ens-lyon.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Samuel Thibault [Wed, 21 Dec 2016 00:38:04 +0000 (01:38 +0100)]
console: add API to get underlying gui window ID
This adds two console functions, qemu_console_set_window_id and
qemu_graphic_console_get_window_id, to let graphical backend record the
window id in the QemuConsole structure, and let the baum driver read it.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id:
20161221003806.22412-2-samuel.thibault@ens-lyon.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Daniel P. Berrange [Thu, 1 Dec 2016 09:41:17 +0000 (09:41 +0000)]
ui: use evdev keymap when running under wayland
Wayland always uses evdev as its input source, so QEMU
can use the existing evdev keymap data
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Tested-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
20161201094117.16407-1-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hervé Poussineau [Sun, 1 Jan 2017 09:39:45 +0000 (10:39 +0100)]
ui/gtk: fix crash at startup when no console is available
This patch fixes a segfault at QEMU startup, introduced in
a08156321ab9a7d2fed9ee77dbfeea2a61ffd153.
gd_vc_find_current() return NULL, which is dereferenced without checking it.
While at it, disable the whole 'View' menu if no console exists.
Reproducer: qemu-system-i386 -M none -nodefaults
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id:
1483263585-8101-1-git-send-email-hpoussin@reactos.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Michael S. Tsirkin [Tue, 10 Jan 2017 05:06:42 +0000 (07:06 +0200)]
acpi-test: update expected files
clean up warnings after latest hotplug changes.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Igor Mammedov [Mon, 5 Dec 2016 23:32:29 +0000 (00:32 +0100)]
memhp: move DIMM devices into dedicated scope with related common methods
Move DIMM devices from global _SB scope to a new \_SB.MHPC
container along with common methods used by DIMMs:
MCRS, MRST, MPXM, MOST, MEJ00, MSCN, MTFY
this reduces AML size on 12 * #slots bytes,
i.e. up to 3072 bytes for 265 slots.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Igor Mammedov [Mon, 5 Dec 2016 23:32:28 +0000 (00:32 +0100)]
memhp: don't generate memory hotplug AML if it's not enabled/supported
That reduces DSDT by 910 bytes when memory hotplug
isn't enabled.
While doing so drop intermediate variables/arguments
passing around ACPI_MEMORY_HOTPLUG_IO_LEN and making
it local to memory_hotplug.c, hardcoding it there as
it can't change.
Also don't pass around ACPI_MEMORY_HOTPLUG_BASE through
intermediate variables/arguments where it's not needed.
Instead initialize in module static variable when MMIO
region is mapped and use that within memory_hotplug.c
whenever it's required.
That way MMIO base specified only at one place and AML
with MMIO would always use the same value.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>