[Qemu-devel] [Bug 1224444] Re: virtio-serial loses writes when used over virtio-mmio

2013-09-14 Thread Richard Jones
I can reproduce this bug on a second ARM machine which doesn't have KVM (ie. using TCG). Note it's still linked to virtio-mmio. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/122 Title:

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-14 Thread Stefan Weil
Am 12.09.2013 22:35, schrieb Peter Maydell: On 12 September 2013 20:45, Stefan Weil s...@weilnetz.de wrote: +else + + # Cross compilation, so we cannot launch a program. Require configure argument. + error_exit Unknown function argument alignment \ + The TCG interpreter must

Re: [Qemu-devel] [PATCH 0/4] lsi: small cleanup and add 53C810 variant

2013-09-14 Thread Paolo Bonzini
Il 13/09/2013 21:50, Hervé Poussineau ha scritto: Patch 4 may be more controversial, as it adds support for an older (albeit compatible) SCSI adapter, without removing emulation of newer features. I don't think that's a huge problem, but please add a comment about it. Paolo

Re: [Qemu-devel] [PATCH 0/4] lsi: small cleanup and add 53C810 variant

2013-09-14 Thread Hervé Poussineau
Paolo Bonzini a écrit : Il 13/09/2013 21:50, Hervé Poussineau ha scritto: Patch 4 may be more controversial, as it adds support for an older (albeit compatible) SCSI adapter, without removing emulation of newer features. I don't think that's a huge problem, but please add a comment about it.

Re: [Qemu-devel] [Qemu-trivial] [PATCH] docs: Fix IO port number for CPU present bitmap.

2013-09-14 Thread Michael Tokarev
10.09.2013 20:36, Anthony PERARD wrote: -CPU present bitmap (IO port 0xaf00-0xae1f, 1-byte access): +CPU present bitmap (IO port 0xaf00-0xaf1f, 1-byte access): Thanks, applied to the trivial-patches queue. I can't really verify whenever this is correct, but let's hope for the best ;) /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] translate-all: Fix formatting of dump output

2013-09-14 Thread Michael Tokarev
12.09.2013 22:09, Stefan Weil wrote: The page dump writes a table with 3 abi_ulong values in each row. These values take 8 or 16 characters (depending on sizeof abi_ulong). Fix the table headings to be aligned with the table columns. Thanks, applied to the trivial-patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] Ping http://patchwork.ozlabs.org/patch/251410/

2013-09-14 Thread Michael Tokarev
12.09.2013 12:51, Stefan Hajnoczi пишет: On Wed, Sep 11, 2013 at 04:08:01PM -0700, Richard Henderson wrote: There have been two patches posted for this uninitialized warning, outstanding since June 14. I still encounter this daily... I'm still happy with the patch. Michael: Do you want to

Re: [Qemu-devel] [Qemu-trivial] [PATCH] q35: Fix typo in constant DEFUALT - DEFAULT.

2013-09-14 Thread Richard W.M. Jones
On Sat, Sep 14, 2013 at 12:47:47PM +0400, Michael Tokarev wrote: 02.09.2013 17:43, Richard W.M. Jones wrote: From: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Richard W.M. Jones rjo...@redhat.com Thanks, applied to the trivial-patches queue. Thanks :-) I case you were wondering,

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tci: Fix qemu-alpha on 32 bit hosts (wrong assertions)

2013-09-14 Thread Michael Tokarev
12.09.2013 22:17, Stefan Weil wrote: Debian busybox-static for alpha has a load address of 0x00012000 which is mapped to 0x2000 for 32 bit hosts. qemu-alpha uses the TCG opcodes qemu_ld32, qemu_ld64, qemu_st32 and qemu_st64 which all raise the assertion (taddr == host_addr).

Re: [Qemu-devel] [Qemu-trivial] [PATCH] *-user: Improve documentation for lock_user function

2013-09-14 Thread Michael Tokarev
12.09.2013 21:57, Stefan Weil wrote: Add a missing function and replace and by any. BSD und Linux use the same documentation here, so fix both. Thanks, applied to the trivial-patches queue (with the commit comment fixup). /mjt

Re: [Qemu-devel] [Qemu-trivial] PING Re: [PATCH v3] target-i386: Fix segment cache dump

2013-09-14 Thread Michael Tokarev
13.09.2013 18:05, Tobias Markus wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/25/2013 12:20 PM, Tobias Markus wrote: When in Long Mode, cpu_x86_seg_cache() logs DS16 because the Default operation size bit (D/B bit) is not set for Long Mode Data Segments since there are only Data

[Qemu-devel] ACPI enabled = qemu process exits when guest shuts down

2013-09-14 Thread Erik Rull
Hi all, I tried a guest OS that is ACPI capable with enabled ACPI in qemu (+kvm) and qemu quits when the guest OS was shut down (and the guest PC should be powered off). Well, from the guest point of view, this behavior seems to be okay, but I would like to keep qemu running to have e.g. a

Re: [Qemu-devel] [Qemu-trivial] [PATCH] q35: Fix typo in constant DEFUALT - DEFAULT.

2013-09-14 Thread Michael Tokarev
02.09.2013 17:43, Richard W.M. Jones wrote: From: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Richard W.M. Jones rjo...@redhat.com Thanks, applied to the trivial-patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] MAINTAINERS: Add missing entry to filelist for TCI target

2013-09-14 Thread Michael Tokarev
12.09.2013 22:24, Stefan Weil wrote: tci.c is also a maintained part of the TCI implementation. Thanks, applied to the trivial-patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] *-user: Fix typo in comment (ulocking - unlocking)

2013-09-14 Thread Michael Tokarev
Thanks, applied to the trivial-patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] trace-events: Clean up with scripts/cleanup-trace-events.pl again

2013-09-14 Thread Michael Tokarev
13.09.2013 12:49, arm...@redhat.com пишет: From: Markus Armbruster arm...@redhat.com Event qxl_render_blit_guest_primary_initialized is unused since commit c58c7b9, drop it. Commit 42e5b4c moved hw/ppc/xics.c to hw/intc/xics.c without updating the comment in trace-events.

Re: [Qemu-devel] [Qemu-trivial] [PATCH] ivshmem: allow the sharing of hugepages

2013-09-14 Thread Michael Tokarev
12.09.2013 22:23, Damien Millescamps wrote: According to shm_open specifications: A shared memory object should be identified by a name of the form /somename; that is, a null-terminated string of up to NAME_MAX (i.e., 255) characters consisting of an initial slash, followed by one or more

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Makefile: Remove some more files when cleaning

2013-09-14 Thread Michael Tokarev
Thanks, applied to the trivial-patches queue. /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tcg-sparc: Fix parenthesis warning

2013-09-14 Thread Michael Tokarev
07.09.2013 00:24, Richard Henderson wrote: error: suggest parentheses around comparison in operand of ‘’ [-Werror=parentheses] Thanks, applied to the trivial-patches queue. Cc'ing the SPARC code maintainer for possible NAK. /mjt

Re: [Qemu-devel] [PATCH 4/5] hw: arm_gic: Support setting/getting binary point reg

2013-09-14 Thread Peter Maydell
On 14 September 2013 02:52, Christoffer Dall christoffer.d...@linaro.org wrote: On Fri, Sep 06, 2013 at 03:41:04PM +0100, Peter Maydell wrote: The TCG QEMU GIC model is currently adopting the GIC without Security Extensions model, which implies that we should be implementing GIC_ABPR too. What

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-14 Thread Peter Maydell
On 14 September 2013 08:18, Stefan Weil s...@weilnetz.de wrote: Am 12.09.2013 22:35, schrieb Peter Maydell: You're not a native assembly backend, you can't rely on this to be sufficient. Use libffi or call the target function with the exact correct prototype. I had a look on libffi now and

Re: [Qemu-devel] [Qemu-trivial] [PATCH] ivshmem: allow the sharing of hugepages

2013-09-14 Thread Damien Millescamps
On 09/14/2013 11:36 AM, Michael Tokarev wrote: That to say, this is not a _definition_ of a shared memory object, it is just a suggested name syntax, suggested purely for portability. In other words, there may be other acceptable syntaxes for it. You are right, the definition can be found

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings

2013-09-14 Thread Michael Tokarev
03.09.2013 22:28, Stefan Weil wrote: Am 21.08.2013 07:44, schrieb Stefan Weil: Compiler option -Wextra enables an additional set of compiler warnings. Some of these warnings were already enabled explicitly in QEMU: -Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and -Wempty-body

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings

2013-09-14 Thread Stefan Weil
Am 14.09.2013 14:18, schrieb Michael Tokarev: 03.09.2013 22:28, Stefan Weil wrote: Am 21.08.2013 07:44, schrieb Stefan Weil: Compiler option -Wextra enables an additional set of compiler warnings. Some of these warnings were already enabled explicitly in QEMU: -Wold-style-declaration,

[Qemu-devel] [PATCH v2 2/5] lsi: check ssid versus sdid only if ssid is valid

2013-09-14 Thread Hervé Poussineau
This prevents some (invalid) error messages on console. Signed-off-by: Hervé Poussineau hpous...@reactos.org --- hw/scsi/lsi53c895a.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index ca01e86..764feaa 100644 ---

[Qemu-devel] [PATCH v2 4/5] lsi: remove todo

2013-09-14 Thread Hervé Poussineau
LSI emulation has been tested with Linux on PPC platform. Signed-off-by: Hervé Poussineau hpous...@reactos.org --- hw/scsi/lsi53c895a.c |3 --- 1 file changed, 3 deletions(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index a9a9eca..47e4680 100644 --- a/hw/scsi/lsi53c895a.c

[Qemu-devel] [PATCH v2 0/5] lsi: small cleanup and add 53C810 variant

2013-09-14 Thread Hervé Poussineau
Hi, This small patchset fixes a few issues I encountered while trying to add support for the IBM RS/6000 40p. Patches 1 to 4 are small cleanups. Patch 5 may be more controversial, as it adds support for an older (albeit compatible) SCSI adapter, without removing emulation of newer features.

[Qemu-devel] [PATCH v2 5/5] lsi: add 53C810 variant

2013-09-14 Thread Hervé Poussineau
Currently, treat it exactly as a 53C895A. 53C895A is a 53C810 with more capabilities, so this should work. However, this lets us test different code paths on Linux, which don't use lastest features if it detect a 810, or on some OSes which only support 810 and not 895A (like very old Windows NT

[Qemu-devel] [PATCH v2 1/5] lsi: use constant name instead of its value

2013-09-14 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau hpous...@reactos.org --- hw/scsi/lsi53c895a.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 0c36842..ca01e86 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -1521,7

[Qemu-devel] [PATCH v2 3/5] lsi: ignore write accesses to CTEST0 registers

2013-09-14 Thread Hervé Poussineau
53C895A datasheet says that this register is read/write, and that the value returned on read access is dependant of DMA FIFO state. However, nothing is said for written value. 53C810A datasheet gives more insight about this register: This was a general purpose read/write register in previous

[Qemu-devel] [PATCH v2] configure: Enable extra compiler warnings

2013-09-14 Thread Stefan Weil
Compiler option -Wextra enables an additional set of compiler warnings. Some of these warnings were already enabled explicitly in QEMU: -Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and -Wempty-body are now redundant and can be removed. Others don't work with the current code and

[Qemu-devel] [Bug] qemu-alpha broken on 32 bit hosts

2013-09-14 Thread Stefan Weil
All (?) syscalls fail to handle addresses larger than 32 bit correctly. See Bad address in the strace ouput below. Tested on arm and on i686 hosts with Debian's busybox-static. $ alpha-linux-user/qemu-alpha -d unimp,guest_errors -strace /usr/gnemul/qemu-alpha/bin/busybox ls -l block.c host

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings

2013-09-14 Thread Michael Tokarev
14.09.2013 19:30, Stefan Weil wrote: Am 14.09.2013 14:18, schrieb Michael Tokarev: [] Well. I see at least one hidden flag here which is not covered by the description: -gcc_flags=-Wendif-labels $gcc_flags +gcc_flags=-fstack-protector-all -Wendif-labels $gcc_flags Is it intentional? No,

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings

2013-09-14 Thread Stefan Weil
Am 14.09.2013 19:38, schrieb Michael Tokarev: 14.09.2013 19:30, Stefan Weil wrote: Am 14.09.2013 14:18, schrieb Michael Tokarev: [] Well. I see at least one hidden flag here which is not covered by the description: -gcc_flags=-Wendif-labels $gcc_flags +gcc_flags=-fstack-protector-all

Re: [Qemu-devel] [RFC v3 0/2] use sizes.h macros for power-of-two sizes

2013-09-14 Thread Richard Henderson
On 09/13/2013 12:33 AM, Antony Pavlov wrote: Changes since v2: * commit messages: drop ALL 'Reviewed-by' tags. Drop Aurelien Jarno's tag because the patchseries was completely reworked, so it need additional review. Changes since v1: * include/sizes.h - include/qemu/sizes.h * fix

Re: [Qemu-devel] [PATCH] pci: remove explicit check to 64K ioport size

2013-09-14 Thread Richard Henderson
On 09/13/2013 04:58 AM, Hervé Poussineau wrote: This check is useless, as bigger addresses will be ignored when added to 'io' MemoryRegion, which has a size of 64K. However, some architectures don't use the 'io' MemoryRegion, like the alpha and versatile platforms. They create a PCI I/O

Re: [Qemu-devel] [PATCH v2] configure: Enable extra compiler warnings

2013-09-14 Thread Michael Tokarev
14.09.2013 19:55, Stefan Weil wrote: Compiler option -Wextra enables an additional set of compiler warnings. Some of these warnings were already enabled explicitly in QEMU: -Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and -Wempty-body are now redundant and can be removed.

[Qemu-devel] [PULL 03/15] docs: Fix IO port number for CPU present bitmap.

2013-09-14 Thread Michael Tokarev
From: Anthony PERARD anthony.per...@citrix.com Signed-off-by: Anthony PERARD anthony.per...@citrix.com Reviewd-By: Igor Mammedov imamm...@redhat.com Signed-off-by: Michael Tokarev m...@tls.msk.ru --- docs/specs/acpi_cpu_hotplug.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PULL 02/15] q35: Fix typo in constant DEFUALT - DEFAULT.

2013-09-14 Thread Michael Tokarev
From: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Michael Tokarev m...@tls.msk.ru --- hw/pci-host/q35.c |2 +- include/hw/pci-host/q35.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PULL 00/15] trivial patches for 2013-09-14

2013-09-14 Thread Michael Tokarev
Just a bit late but here's the next trivial-patches pull request. Thanks, /mjt The following changes since commit 2d1fe1873a984d1c2c89ffa3d12949cafc718551: Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into staging (2013-09-11 14:46:52 -0500) are available in the

[Qemu-devel] [PULL 07/15] *-user: Improve documentation for lock_user function

2013-09-14 Thread Michael Tokarev
From: Stefan Weil s...@weilnetz.de Add a missing function and replace and by any. BSD and Linux use the same documentation here, so fix both. Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Michael Tokarev m...@tls.msk.ru ---

[Qemu-devel] [PULL 05/15] translate-all: Fix formatting of dump output

2013-09-14 Thread Michael Tokarev
From: Stefan Weil s...@weilnetz.de The page dump writes a table with 3 abi_ulong values in each row. These values take 8 or 16 characters (depending on sizeof abi_ulong). Fix the table headings to be aligned with the table columns. old: startend size prot

[Qemu-devel] [PULL 01/15] configure: Undefine _FORTIFY_SOURCE prior using it

2013-09-14 Thread Michael Tokarev
From: Michal Privoznik mpriv...@redhat.com Currently, we are enforcing the _FORTIFY_SOURCE=2 without any previous detection if the macro has been already defined, e.g. by environment, or is just enabled by compiler by default. Signed-off-by: Michal Privoznik mpriv...@redhat.com Signed-off-by:

[Qemu-devel] [PULL 09/15] trace-events: Clean up with scripts/cleanup-trace-events.pl again

2013-09-14 Thread Michael Tokarev
From: Markus Armbruster arm...@redhat.com Event qxl_render_blit_guest_primary_initialized is unused since commit c58c7b9, drop it. Commit 42e5b4c moved hw/ppc/xics.c to hw/intc/xics.c without updating the comment in trace-events. scripts/cleanup-trace-events.pl trace-events | diff trace-events

[Qemu-devel] [PULL 13/15] Makefile: Remove some more files when cleaning

2013-09-14 Thread Michael Tokarev
From: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Michael Tokarev m...@tls.msk.ru --- Makefile |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 362fe3e..f6da5fe 100644 --- a/Makefile +++ b/Makefile @@

[Qemu-devel] [PULL 10/15] vscclient: remove unnecessary use of uninitialized variable

2013-09-14 Thread Michael Tokarev
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Michael Tokarev m...@tls.msk.ru --- libcacard/vscclient.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c

[Qemu-devel] [PULL 14/15] tcg-sparc: Fix parenthesis warning

2013-09-14 Thread Michael Tokarev
From: Richard Henderson r...@twiddle.net error: suggest parentheses around comparison in operand of ‘’ [-Werror=parentheses] Signed-off-by: Richard Henderson r...@twiddle.net Signed-off-by: Michael Tokarev m...@tls.msk.ru --- tcg/sparc/tcg-target.h |2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PULL 11/15] iov: avoid orig_len may be used unitialized warning

2013-09-14 Thread Michael Tokarev
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Michael Tokarev m...@tls.msk.ru --- util/iov.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/util/iov.c b/util/iov.c index f705586..bb46c04

[Qemu-devel] [PULL 06/15] MAINTAINERS: Add missing entry to filelist for TCI target

2013-09-14 Thread Michael Tokarev
From: Stefan Weil s...@weilnetz.de tci.c is also a maintained part of the TCI implementation. Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Michael Tokarev m...@tls.msk.ru --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff

[Qemu-devel] [PULL 12/15] target-i386: Fix segment cache dump

2013-09-14 Thread Michael Tokarev
From: Tobias Markus tob...@markus-regensburg.de When in Long Mode, cpu_x86_seg_cache() logs DS16 because the Default operation size bit (D/B bit) is not set for Long Mode Data Segments since there are only Data Segments in Long Mode and no explicit 16/32/64-bit Descriptors. This patch fixes this

[Qemu-devel] [PULL 08/15] tci: Fix qemu-alpha on 32 bit hosts (wrong assertions)

2013-09-14 Thread Michael Tokarev
From: Stefan Weil s...@weilnetz.de Debian busybox-static for alpha has a load address of 0x00012000 which is mapped to 0x2000 for 32 bit hosts. qemu-alpha uses the TCG opcodes qemu_ld32, qemu_ld64, qemu_st32 and qemu_st64 which all raise the assertion (taddr == host_addr).

[Qemu-devel] [PULL 15/15] configure: Enable extra compiler warnings

2013-09-14 Thread Michael Tokarev
From: Stefan Weil s...@weilnetz.de Compiler option -Wextra enables an additional set of compiler warnings. Some of these warnings were already enabled explicitly in QEMU: -Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and -Wempty-body are now redundant and can be removed. Others

[Qemu-devel] [PULL 04/15] *-user: Fix typo in comment (ulocking - unlocking)

2013-09-14 Thread Michael Tokarev
From: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Michael Tokarev m...@tls.msk.ru --- bsd-user/qemu.h |2 +- linux-user/qemu.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-14 Thread Richard Henderson
Michael Walle and Jia Liu, see below wrt minor lm32 and openrisc mistakes. On 09/14/2013 02:51 AM, Peter Maydell wrote: I had a look on libffi now and don't see how it could solve my problem. As far as I could see, libffi must be ported to new architectures, so its use would restrict the

Re: [Qemu-devel] [PATCH RFC v3 2/2] hw/pci: handle unassigned pci addresses

2013-09-14 Thread Michael S. Tsirkin
On Mon, Sep 09, 2013 at 02:21:36PM +0300, Marcel Apfelbaum wrote: Created a MemoryRegion with negative priority that spans over all the pci address space. It intercepts the accesses to unassigned pci address space and will follow the pci spec: 1. returns -1 on read 2. does nothing on write

[Qemu-devel] subregion collisions

2013-09-14 Thread Michael S. Tsirkin
Enabling the print in memory.c shows quite a lot of these: warning: subregion collision fec0/1000 (ioapic) vs 800/f800 (pci-hole) warning: subregion collision fed0/400 (hpet) vs 800/f800 (pci-hole) warning: subregion collision 0/80 (ich9-pm) vs 8/8 (dma-cont) warning:

[Qemu-devel] [PATCH v4 05/33] tcg-aarch64: Change enum aarch64_arith_opc to AArch64Insn

2013-09-14 Thread Richard Henderson
And since we're no longer talking about opcodes, change the values to be shifted into the opcode field, avoiding a shift at runtime. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 43 +++ 1 file changed, 23 insertions(+),

[Qemu-devel] [PATCH v4 02/33] tcg-aarch64: Set ext based on TCG_OPF_64BIT

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index cf36551..983a74a 100644 --- a/tcg/aarch64/tcg-target.c +++

[Qemu-devel] [PATCH v4 01/33] tcg-aarch64: Change all ext variables to TCGType

2013-09-14 Thread Richard Henderson
We assert that the values for _I32 and _I64 are 0 and 1 respectively. This will make a couple of functions declared by tcg.c cleaner. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 64 1 file changed, 37

[Qemu-devel] [PATCH v4 04/33] tcg-aarch64: Hoist common argument loads in tcg_out_op

2013-09-14 Thread Richard Henderson
This reduces the code size of the function significantly. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 95 +--- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 00/33] tcg-aarch64 improvements

2013-09-14 Thread Richard Henderson
Changes since v3: * Using TCGType instead of bool for the ext variables. * Marginal tidying of the tcg_fmt_* functions to match fields names with the architecture document now that it's released. In particular, the ext variables incoming to them have been renamed sf. I have not

[Qemu-devel] [PATCH v4 03/33] tcg-aarch64: Don't handle mov/movi in tcg_out_op

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 983a74a..8f19b50 100644 --- a/tcg/aarch64/tcg-target.c +++

[Qemu-devel] [PATCH v4 09/33] tcg-aarch64: Introduce tcg_fmt_Rdn_aimm

2013-09-14 Thread Richard Henderson
This merges the implementation of tcg_out_addi and tcg_out_subi. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 79 +++- 1 file changed, 31 insertions(+), 48 deletions(-) diff --git a/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 14/33] tcg-aarch64: Handle zero as first argument to sub

2013-09-14 Thread Richard Henderson
In order to properly handle neg, as generated by TCG generic code. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 20/33] tcg-aarch64: Support div, rem

2013-09-14 Thread Richard Henderson
For remainder, generic code will produce mul+sub, whereas we can implement with msub. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 51 +++- tcg/aarch64/tcg-target.h | 8 2 files changed, 46 insertions(+),

[Qemu-devel] [PATCH v4 06/33] tcg-aarch64: Merge enum aarch64_srr_opc with AArch64Insn

2013-09-14 Thread Richard Henderson
And since we're no longer talking about opcodes, merge the 0x1ac02000 data2 primary opcode with the shift subcode to create the full insn. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 49 1 file changed, 24

[Qemu-devel] [PATCH v4 11/33] tcg-aarch64: Handle constant operands to add, sub, and compare

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 103 --- 1 file changed, 80 insertions(+), 23 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 93badfd..59499fd 100644 ---

[Qemu-devel] [PATCH v4 21/33] tcg-aarch64: Introduce tcg_fmt_Rd_uimm

2013-09-14 Thread Richard Henderson
Cleaning up the implementation of tcg_out_movi at the same time. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 49 +++- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 12/33] tcg-aarch64: Handle constant operands to and, or, xor

2013-09-14 Thread Richard Henderson
Handle a simplified set of logical immediates for the moment. The way gcc and binutils do it, with 52k worth of tables, and a binary search depth of log2(5334) = 13, seems slow for the most common cases. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 155

[Qemu-devel] [PATCH v4 22/33] tcg-aarch64: Use MOVN in tcg_out_movi

2013-09-14 Thread Richard Henderson
When profitable, initialize the register with MOVN instead of MOVZ, before setting the remaining lanes with MOVK. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 88 +--- 1 file changed, 75 insertions(+), 13

[Qemu-devel] [PATCH v4 24/33] tcg-aarch64: Special case small constants in tcg_out_movi

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 9effee7..e50abcb 100644 --- a/tcg/aarch64/tcg-target.c +++ b/tcg/aarch64/tcg-target.c @@ -573,6

[Qemu-devel] [PATCH v4 13/33] tcg-aarch64: Support andc, orc, eqv, not

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 65 ++-- tcg/aarch64/tcg-target.h | 16 ++-- 2 files changed, 65 insertions(+), 16 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl

2013-09-14 Thread Richard Henderson
Now that we've converted opcode fields to pre-shifted insns, we can merge the implementation of arithmetic and shift insns. Simplify the left/right shift parameter to just the left shift needed by tcg_out_tlb_read. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c |

[Qemu-devel] [PATCH v4 28/33] tcg-aarch64: Use tcg_out_call for qemu_ld/st

2013-09-14 Thread Richard Henderson
In some cases, a direct branch will be in range. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index ce3c17b..3d1108c 100644 ---

[Qemu-devel] [PATCH v4 27/33] tcg-aarch64: Pass return address to load/store helpers directly.

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- include/exec/exec-all.h | 11 --- tcg/aarch64/tcg-target.c | 44 ++-- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index

[Qemu-devel] [PATCH v4 10/33] tcg-aarch64: Implement mov with tcg_fmt_* functions

2013-09-14 Thread Richard Henderson
Avoid the magic numbers in the current implementation. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index

[Qemu-devel] [PATCH v4 31/33] tcg-aarch64: Reuse FP and LR in translated code

2013-09-14 Thread Richard Henderson
We don't need the FP within translated code, and the LR is otherwise unused. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 36 +++- tcg/aarch64/tcg-target.h | 32 +--- 2 files changed, 32

[Qemu-devel] [PATCH v4 16/33] tcg-aarch64: Use tcg_fmt_Rdnm_cond for setcond

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index e9a0f9b..5f2c437 100644 --- a/tcg/aarch64/tcg-target.c +++

[Qemu-devel] [PATCH v4 30/33] tcg-aarch64: Implement tcg_register_jit

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 93 1 file changed, 70 insertions(+), 23 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 335a5d0..7d2fd99 100644 ---

[Qemu-devel] [PATCH v4 15/33] tcg-aarch64: Support movcond

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 24 +++- tcg/aarch64/tcg-target.h | 4 ++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 08a0cc4..e9a0f9b 100644 ---

[Qemu-devel] [PATCH v4 17/33] tcg-aarch64: Support deposit

2013-09-14 Thread Richard Henderson
Also tidy the implementation of ubfm, sbfm, extr in order to share code. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 49 +++- tcg/aarch64/tcg-target.h | 4 ++-- 2 files changed, 38 insertions(+), 15 deletions(-)

[Qemu-devel] [PATCH v4 18/33] tcg-aarch64: Support add2, sub2

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 78 tcg/aarch64/tcg-target.h | 8 ++--- 2 files changed, 82 insertions(+), 4 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index

[Qemu-devel] [PATCH v4 19/33] tcg-aarch64: Support muluh, mulsh

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 12 tcg/aarch64/tcg-target.h | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index bc1ca84..b7f7fa5 100644 ---

[Qemu-devel] [PATCH v4 25/33] tcg-aarch64: Use adrp in tcg_out_movi

2013-09-14 Thread Richard Henderson
Loading an qemu pointer as an immediate happens often. E.g. - exit_tb $0x7fa8140013 + exit_tb $0x7f81ee0013 ... - : d2800260mov x0, #0x13 - : f2b50280movkx0, #0xa814, lsl #16 - : f2c00fe0movkx0, #0x7f, lsl #32 + : 90ff1000adrpx0, 0x7f81ee +

[Qemu-devel] [PATCH v4 23/33] tcg-aarch64: Use ORRI in tcg_out_movi

2013-09-14 Thread Richard Henderson
The subset of logical immediates that we support is quite quick to test, and such constants are quite common to want to load. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 26/33] tcg-aarch64: Avoid add with zero in tlb load

2013-09-14 Thread Richard Henderson
Some guest env are small enough to reach the tlb with only a 12-bit addition. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 32/33] tcg-aarch64: Introduce tcg_out_ldst_pair

2013-09-14 Thread Richard Henderson
Combines 4 other inline functions and tidies the prologue. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 84 1 file changed, 27 insertions(+), 57 deletions(-) diff --git a/tcg/aarch64/tcg-target.c

[Qemu-devel] [PATCH v4 33/33] tcg-aarch64: Remove redundant CPU_TLB_ENTRY_BITS check

2013-09-14 Thread Richard Henderson
Removed from other targets in 56bbc2f967ce185fa1c5c39e1aeb5b68b26242e9. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 94f9ac1..a7d0785 100644 ---

[Qemu-devel] [PATCH v4 29/33] tcg-aarch64: Use symbolic names for branches

2013-09-14 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 3d1108c..335a5d0 100644 ---

[Qemu-devel] [PATCH v4 07/33] tcg-aarch64: Remove the shift_imm parameter from tcg_out_cmp

2013-09-14 Thread Richard Henderson
It was unused. Let's not overcomplicate things before we need them. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index

[Qemu-devel] [PATCH 1/8] tcg: Delete tcg_helper_get_name declaration

2013-09-14 Thread Richard Henderson
The function was deleted in 4dc81f2822187f4503d4bdb76785cafa5b28db0b. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/tcg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index 902c751..20543f6 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -681,7 +681,6 @@ TCGArg

[Qemu-devel] [PATCH 3/8] target-m68k: Rename helpers.h to helper.h

2013-09-14 Thread Richard Henderson
This brings the m68k target in line with all other targets. Signed-off-by: Richard Henderson r...@twiddle.net --- target-m68k/helper.c| 2 +- target-m68k/{helpers.h = helper.h} | 0 target-m68k/op_helper.c | 2 +- target-m68k/translate.c | 6 +++--- 4

[Qemu-devel] [PATCH 2/8] tcg: Use a GHashTable for tcg_find_helper

2013-09-14 Thread Richard Henderson
Slightly changes the interface, in that we now return name instead of a TCGHelperInfo structure, which goes away. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/tcg.c | 74 --- tcg/tcg.h | 10 + 2 files changed, 19

[Qemu-devel] [PATCH 5/8] tcg: Remove stray semi-colons from target-*/helper.h

2013-09-14 Thread Richard Henderson
During GEN_HELPER=1, these are actually stray top-level semi-colons which are technically invalid ISO C, but GCC accepts as an extension. If we added enough __extension__ markers that we could dare use -Wpedantic, we'd see warning: ISO C does not allow extra ‘;’ outside of a function This will

[Qemu-devel] [PATCH 6/8] tcg: Put target helper data into an array.

2013-09-14 Thread Richard Henderson
One call inside of a loop to tcg_register_helper instead of hundreds of sequential calls. Presumably more icache and branch prediction friendly; resulting binary size mostly unchanged on x86_64, as we're trading 32-bit rip-relative references in .text for full 64-bit pointers in .rodata.

[Qemu-devel] [PATCH 4/8] tcg: Move helper registration into tcg_context_init

2013-09-14 Thread Richard Henderson
No longer needs to be done on a per-target basis. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/translate.c | 4 target-arm/translate.c| 3 --- target-cris/translate.c | 3 --- target-i386/translate.c | 4 target-m68k/translate.c | 3

[Qemu-devel] [PATCH 7/8] tcg: Add tcg-runtime.c helpers to all_helpers

2013-09-14 Thread Richard Henderson
For the few targets that actually use these, we'd not report them symbolicly in the tcg opcode logs. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/tcg.c | 16 1 file changed, 16 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index 9ace8fc..bf4edfd 100644 ---

[Qemu-devel] [PATCH 8/8] tcg: Merge tcg_register_helper into tcg_context_init

2013-09-14 Thread Richard Henderson
Eliminates the repeated checks for having created the s-helpers hash table. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/tcg.c | 21 ++--- tcg/tcg.h | 1 - 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index bf4edfd..f401044

[Qemu-devel] [PATCH 0/8] tcg: Tidy helpers registration

2013-09-14 Thread Richard Henderson
The subject came up in the contect of review of other patches this weekend, and it was pretty easy to whip up. r~ Richard Henderson (8): tcg: Delete tcg_helper_get_name declaration tcg: Use a GHashTable for tcg_find_helper target-m68k: Rename helpers.h to helper.h tcg: Move helper