[Qemu-devel] [PATCH v2 1/9] tcg: Tidy generated code for tcg_outN

2013-08-17 Thread Richard Henderson
Aliasing was forcing s-code_ptr to be re-read after the store. Keep the pointer in a local variable to help the compiler. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/tcg.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index

[Qemu-devel] [PATCH v2 0/9] Improve tcg ldst optimization

2013-08-17 Thread Richard Henderson
V2: * Feedback from Aurelien * Added the first patch. * ARM patches fixed. Sorry about not merging back from the tree on my arm machine before posting the patch set last time. r~ Richard Henderson (9): tcg: Tidy generated code for tcg_outN tcg-i386: Add and use tcg_out64

[Qemu-devel] [PATCH v2 5/9] tcg: Add mmu helpers that take a return address argument

2013-08-17 Thread Richard Henderson
Allow the code that tcg generates to be less obtuse, passing in the return address directly instead of computing it in the helper. Maintain the old entrance point unchanged as an alternate entry point. Delete the helper_st*_cmmu prototypes; the implementations did not exist. Signed-off-by:

[Qemu-devel] [PATCH v2 3/9] tcg-i386: Try pc-relative lea for constant formation

2013-08-17 Thread Richard Henderson
Use a 7 byte lea before the ultimate 10 byte movq. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/i386/tcg-target.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 841bd75..8226171

[Qemu-devel] [PATCH v2 8/9] tcg-arm: Use ldrd/strd for appropriate qemu_ld/st64

2013-08-17 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/arm/tcg-target.c | 48 +++- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 6c4854d..6cfceff 100644 --- a/tcg/arm/tcg-target.c +++

[Qemu-devel] [PATCH v2 6/9] tcg: Tidy softmmu_template.h

2013-08-17 Thread Richard Henderson
Avoid a loop in the tlb_fill path; the fill will either succeed or generate an exception. Inline the slow_ld/st function; it was a complete copy of the main helper except for the actual cross-page unaligned code, and the compiler was inlining it anyway. Add unlikely markers optimizing for the

[Qemu-devel] [PATCH v2 2/9] tcg-i386: Add and use tcg_out64

2013-08-17 Thread Richard Henderson
No point in splitting the write into 32-bit pieces. Reviewed-by: Aurelien Jarno aurel...@aurel32.net Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/i386/tcg-target.c | 3 +-- tcg/tcg.c | 7 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v2 4/9] tcg-i386: Tidy qemu_ld/st slow path

2013-08-17 Thread Richard Henderson
Use existing stack space for arguments; don't push/pop. Use less ifdefs and more C ifs. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/i386/tcg-target.c | 165 ++ 1 file changed, 74 insertions(+), 91 deletions(-) diff --git

[Qemu-devel] [PATCH v2 7/9] tcg-i386: Use new return-argument ld/st helpers

2013-08-17 Thread Richard Henderson
Discontinue the jump-around-jump-to-jump scheme, trading it for a single immediate move instruction. The two extra jumps always consume 7 bytes, whereas the immediate move is either 5 or 7 bytes depending on where the code_gen_buffer gets located. Signed-off-by: Richard Henderson

[Qemu-devel] [PATCH v2 9/9] tcg-arm: Rearrange slow-path qemu_ld/st

2013-08-17 Thread Richard Henderson
Instead of using a branch-call-branch sequence, arrange for a call-branch sequence, using the ARM's conditional call insn. This reduces the size of the slow-path within the TB, and makes the GETPC_EXT implementation identical for TCG and not-TCG. Signed-off-by: Richard Henderson r...@twiddle.net

[Qemu-devel] [PULL 0/4] alpha-softmmu improvements

2013-08-17 Thread Richard Henderson
No changes since the patch set was first posted, but rebased against head. r~ The following changes since commit f202039811d8746b0586d2fd5f61de6c8cf68056: Open up 1.7 development branch (2013-08-15 15:41:13 -0500) are available in the git repository at:

[Qemu-devel] [PULL 1/4] target-alpha: Implement call_pal without an exception

2013-08-17 Thread Richard Henderson
The destination of the call_pal, and the cpu state, is very predictable; there's no need for exiting the cpu loop. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/helper.h | 1 + target-alpha/sys_helper.c | 12 target-alpha/translate.c | 25

[Qemu-devel] [PULL 2/4] target-alpha: Use goto_tb in call_pal

2013-08-17 Thread Richard Henderson
With appropriate flushing when the PALBR changes, the target of a CALL_PAL is so predictable we can chain to it. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/helper.h | 1 + target-alpha/sys_helper.c | 5 + target-alpha/translate.c | 20 3

[Qemu-devel] [PULL 3/4] target-alpha: Consider the superpage when threading and ending TBs

2013-08-17 Thread Richard Henderson
This allows significantly more threading, and occasionally larger TBs, when processing code for the kernel and PALcode. Signed-off-by: Richard Henderson r...@twiddle.net --- target-alpha/translate.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-)

[Qemu-devel] [PULL 4/4] target-alpha: Implement the typhoon iommu

2013-08-17 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- hw/alpha/typhoon.c | 202 + 1 file changed, 174 insertions(+), 28 deletions(-) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index b7fb044..2450045 100644 --- a/hw/alpha/typhoon.c +++

Re: [Qemu-devel] [PATCH v5] spapr-vscsi: add task management

2013-08-17 Thread Paolo Bonzini
Il 16/08/2013 11:45, Alexey Kardashevskiy ha scritto: Did this patch go anywhere? I could not find it in git://github.com/bonzini/qemu.git scsi-next or anywhere else. Should I repost it as qemu 1.6 was released and we started new cycle? I am asking because I have 2 more patches about

Re: [Qemu-devel] qemu-1.4.0 support in CentOS 6.3

2013-08-17 Thread Paolo Bonzini
Il 16/08/2013 14:41, ashish yadav ha scritto: Hi All, I am using CentOS 6.3 . I want to use qemu-1.4.0 with it ( due to dpdk_ovs requirement) . If qemu-1.4.0 is supported with Centos 6.3 ( kernel version 2.6.32-279) ? It works, you just have to compile it yourself. Paolo

Re: [Qemu-devel] [PATCH for-next 00/15] Collection of improvements for tcg/ppc64

2013-08-17 Thread Richard Henderson
Ping. r~ On 08/05/2013 11:28 AM, Richard Henderson wrote: About half of these patches are focused on reducing the number of full 64-bit constants that need to be generated for addresses: E.g. patch 5, looking through the function descriptor. If the program is built --disable-pie, the

Re: [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers

2013-08-17 Thread Richard Henderson
Ping. r~ On 07/24/2013 12:50 PM, Richard Henderson wrote: It has been pointed out on LKML that the alpha umount syscall numbers are named wrong, and a patch to rectify that has been posted for 3.11. Glibc works around this by treating NR_umount as NR_umount2 if NR_oldumount exists.

Re: [Qemu-devel] [PATCH v3 04/19] block: update bs-total_sectors on writes

2013-08-17 Thread Paolo Bonzini
Il 02/08/2013 09:05, Peter Lieven ha scritto: can you give an update what are to current plans/schedule to merge this series? I have a few patches in the queue that in their current version depend on this series being merged. It should go in soon, perhaps a couple of weeks. Paolo

[Qemu-devel] [PATCH v2 0/3] Disassembly with external objdump

2013-08-17 Thread Richard Henderson
V2 adds the --adjust-vma idea from Max Filippov. r~ Richard Henderson (3): disas: Implement fallback to dump object code as hex disas: Add disas-objdump.pl disas-objdump: Pass --adjust-vma to objdump disas.c | 47 ++- scripts/disas-objdump.pl | 99

[Qemu-devel] [PATCH v2 1/3] disas: Implement fallback to dump object code as hex

2013-08-17 Thread Richard Henderson
The OBJD-[HT] tags will be used by a script to run the hex blob through objdump --disassemble. Signed-off-by: Richard Henderson r...@twiddle.net --- disas.c | 47 +-- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/disas.c b/disas.c

[Qemu-devel] [PATCH v2 2/3] disas: Add disas-objdump.pl

2013-08-17 Thread Richard Henderson
The script massages the output produced for architectures that are not supported internally by qemu though an external objdump program for disassembly. Signed-off-by: Richard Henderson r...@twiddle.net --- scripts/disas-objdump.pl | 87 1 file

Re: [Qemu-devel] [RFC PATCH 0/3] v2.2 RCU Implementation for QEMU

2013-08-17 Thread Paolo Bonzini
Il 16/08/2013 16:41, Mike Day ha scritto: This patch set merges Paolo's conversion of address spaces to enable RCU. There is one more patchset coming for TLB access that I'm debugging right now. After I submit the last one I'll start working on enabling RCU more widely - and the series will

[Qemu-devel] [PATCH v2 3/3] disas-objdump: Pass --adjust-vma to objdump

2013-08-17 Thread Richard Henderson
This gives the dumped blob its correct address during disassembly, which makes pc-relative insns much easier to interpret. Signed-off-by: Richard Henderson r...@twiddle.net --- scripts/disas-objdump.pl | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-17 Thread Paolo Bonzini
Il 16/08/2013 23:58, Alex Williamson ha scritto: Since commit 23326164 we align access sizes to match the alignment of the address, but we don't align the access size itself. This means we let illegal access sizes (ex. 3) slip through if the address is sufficiently aligned (ex. 4). This

[Qemu-devel] [PATCH] w32: Add an icon resource

2013-08-17 Thread Stefan Weil
The QEMU mascot which was already used for the NSIS installer is now used for all QEMU executables. Signed-off-by: Stefan Weil s...@weilnetz.de --- version.rc |2 ++ 1 file changed, 2 insertions(+) diff --git a/version.rc b/version.rc index 82e10ec..a50d62f 100644 --- a/version.rc +++

Re: [Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-17 Thread Laszlo Ersek
On 08/16/13 23:58, Alex Williamson wrote: Since commit 23326164 we align access sizes to match the alignment of the address, but we don't align the access size itself. This means we let illegal access sizes (ex. 3) slip through if the address is sufficiently aligned (ex. 4). This results in

Re: [Qemu-devel] [Xen-devel] Cirrus VGA slow screen update, show blank screen last 13s or so for windows XP guest

2013-08-17 Thread Gonglei (Arei)
Hi, The fundamental reason is traditional qemu-dm and upstream qemu using a different vgabios-cirrus.bin, qemu-dm is using xen-4.1.2/tools/firmware/vgabios/ VGABIOS-lgpl-latest.cirrus.bin, but upstream qemu is using qemu-1.2.2/pc-bios/vgabios-cirrus.bin the pivotal patch is : # HG changeset

Re: [Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-17 Thread Laszlo Ersek
(side point) On 08/17/13 10:23, Laszlo Ersek wrote: if (l = access_size_max) { return access_size_max; } return 1 max(3, lmb(l)); lol, of course this should have been min()... Alex's patch is OK of course. Laszlo

Re: [Qemu-devel] [PATCH v4 1/6] pc: Don't prematurely explode QEMUMachineInitArgs

2013-08-17 Thread Laszlo Ersek
On 08/16/13 13:13, arm...@redhat.com wrote: static void pc_init_isa(QEMUMachineInitArgs *args) { -ram_addr_t ram_size = args-ram_size; -const char *cpu_model = args-cpu_model; -const char *kernel_filename = args-kernel_filename; -const char *kernel_cmdline =

Re: [Qemu-devel] [PATCH v4 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-17 Thread Laszlo Ersek
On 08/16/13 13:13, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com Don't explode when the variable is used just a few times, and never changed. Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/i386/pc_q35.c | 22 +- 1 file changed, 9

Re: [Qemu-devel] [PATCH v4 3/6] sun4: Don't prematurely explode QEMUMachineInitArgs

2013-08-17 Thread Laszlo Ersek
comments below On 08/16/13 13:13, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com Don't explode QEMUMachineInitArgs before passing it to sun4m_hw_init(), sun4uv_init(). Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/sparc/sun4m.c | 113

Re: [Qemu-devel] [PATCH v4 4/6] ppc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-17 Thread Laszlo Ersek
On 08/16/13 13:13, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com Don't explode when the variable is used just once, and never changed. Signed-off-by: Markus Armbruster arm...@redhat.com Acked-by: Alexander Graf ag...@suse.de --- hw/ppc/e500plat.c | 18

Re: [Qemu-devel] [PATCH v4 5/6] ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params

2013-08-17 Thread Laszlo Ersek
comments below On 08/16/13 13:13, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com Pass on the generic arguments unadulterated, and the machine-specific ones as separate argument. Signed-off-by: Markus Armbruster arm...@redhat.com Acked-by: Alexander Graf ag...@suse.de

Re: [Qemu-devel] [PATCH v4 6/6] hw: Clean up bogus default boot order

2013-08-17 Thread Laszlo Ersek
On 08/16/13 13:13, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com We set default boot order cad in every single machine definition except pseries and moxiesim, even though very few boards actually care for boot order, and cad makes sense for even fewer. Machines that

Re: [Qemu-devel] [PATCH v2 0/7] smbios cleanup nicer defaults for type 1

2013-08-17 Thread Laszlo Ersek
Eric, On 08/16/13 15:18, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com This gets rid of one of the last get_param_value() users, makes multiple -smbios work sanely, cleans up the gross side effect in qemu_uuid_parse(), and more. Topped off with a little feature in the

Re: [Qemu-devel] [PATCH v2 4/7] smbios: Make multiple -smbios type= accumulate sanely

2013-08-17 Thread Eric Blake
On 08/16/2013 07:18 AM, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) with value VAL to fw_cfg for each unique NAME. If NAME occurs multiple times, the last one's VAL is used (before the QemuOpts conversion,

Re: [Qemu-devel] [PATCH v2 0/7] smbios cleanup nicer defaults for type 1

2013-08-17 Thread Eric Blake
On 08/17/2013 06:08 AM, Laszlo Ersek wrote: Eric, On 08/16/13 15:18, arm...@redhat.com wrote: From: Markus Armbruster arm...@redhat.com This gets rid of one of the last get_param_value() users, makes multiple -smbios work sanely, cleans up the gross side effect in qemu_uuid_parse(), and

Re: [Qemu-devel] [PATCH v2 6/7] vl: Set current_machine early

2013-08-17 Thread Andreas Färber
Am 16.08.2013 15:18, schrieb arm...@redhat.com: From: Markus Armbruster arm...@redhat.com I'd like to access QEMUMachine from a QEMUMachine init() method, which is currently not possible. Instead of passing it as an argument, I simply set current_machine earlier. We had such a patch for

Re: [Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-17 Thread Alex Williamson
On Sat, 2013-08-17 at 10:23 +0200, Laszlo Ersek wrote: On 08/16/13 23:58, Alex Williamson wrote: Since commit 23326164 we align access sizes to match the alignment of the address, but we don't align the access size itself. This means we let illegal access sizes (ex. 3) slip through if the

Re: [Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-17 Thread Alex Williamson
On Sat, 2013-08-17 at 08:33 +0200, Paolo Bonzini wrote: Il 16/08/2013 23:58, Alex Williamson ha scritto: Since commit 23326164 we align access sizes to match the alignment of the address, but we don't align the access size itself. This means we let illegal access sizes (ex. 3) slip through

Re: [Qemu-devel] [PATCH v4] exec: Fix non-power-of-2 sized accesses

2013-08-17 Thread Paolo Bonzini
Il 17/08/2013 10:23, Laszlo Ersek ha scritto: What Paolo posted seems almost identical. clz32(l): leading zeros in l qemu_fls(l) == 32 - clz32(l): position of leftmost bit set, 1-based qemu_fls(l) - 1: position of leftmost bit set, 0-based Not sure if the

[Qemu-devel] [PATCH 2/6] tcg-ppc64: Use qemu_getauxval

2013-08-17 Thread Richard Henderson
Allow host detection on linux systems without glibc 2.16 or later. Signed-off-by: Richard Henderson r...@twiddle.net --- include/elf.h | 34 ++ tcg/ppc64/tcg-target.c | 11 ++- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH 1/6] osdep: Create qemu_getauxval and qemu_init_auxval

2013-08-17 Thread Richard Henderson
Abstract away dependence on a system implementation of getauxval. Signed-off-by: Richard Henderson r...@twiddle.net --- include/qemu/osdep.h | 20 linux-user/main.c| 1 + util/Makefile.objs | 1 + util/getauxval.c | 91

[Qemu-devel] [PATCH 0/6] Improve getauxval support

2013-08-17 Thread Richard Henderson
The getauxval routine was added to glibc for 2.16. In order to better support qemu on systems prior to 2.16, add a qemu_getauxval entry point, and add the relevant defines to our own elf.h. r~ Richard Henderson (6): osdep: Create qemu_getauxval and qemu_init_auxval tcg-ppc64: Use

[Qemu-devel] [PATCH 4/6] tcg-s390: Use qemu_getauxval in query_facilities

2013-08-17 Thread Richard Henderson
No need to set up a SIGILL signal handler for detection anymore. Remove a ton of sanity checks that must be true, given that we're requiring a 64-bit build (the note about 31-bit KVM is satisfied by configuring with TCI). Signed-off-by: Richard Henderson r...@twiddle.net --- include/elf.h

[Qemu-devel] [PATCH 3/6] tcg-arm: Use qemu_getauxval

2013-08-17 Thread Richard Henderson
Allow host detection on linux systems without glibc 2.16 or later. Signed-off-by: Richard Henderson r...@twiddle.net --- include/elf.h| 22 ++ tcg/arm/tcg-target.c | 15 ++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/include/elf.h

[Qemu-devel] [PATCH 5/6] util: Provide fallback hwcap and platform for powerpc

2013-08-17 Thread Richard Henderson
Allow host detection on non-linux hosts. Signed-off-by: Richard Henderson r...@twiddle.net --- util/getauxval.c | 56 ++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/util/getauxval.c b/util/getauxval.c index 55b639c..2e93a14

[Qemu-devel] [PATCH 6/6] util: Use qemu_getauxval in linux qemu_cache_utils_init

2013-08-17 Thread Richard Henderson
With this we no longer pass down envp, and thus all systems can have the same void prototype. So also eliminate a useless thunk. Signed-off-by: Richard Henderson r...@twiddle.net --- include/qemu/cache-utils.h | 4 ++-- linux-user/main.c | 2 +- util/cache-utils.c | 51

[Qemu-devel] [PATCH 2/4] tcg-mips: Implement mulsh, muluh

2013-08-17 Thread Richard Henderson
With the optimization in tcg_liveness_analysis, we can avoid the MFLO when it is unused. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/mips/tcg-target.c | 10 ++ tcg/mips/tcg-target.h | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 1/4] tcg: Add muluh and mulsh opcodes

2013-08-17 Thread Richard Henderson
Use them in places where mulu2 and muls2 are used. Optimize mulx2 with dead low part to mulxh. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/aarch64/tcg-target.h | 4 tcg/arm/tcg-target.h | 2 ++ tcg/hppa/tcg-target.h| 2 ++ tcg/i386/tcg-target.h| 4

[Qemu-devel] [PATCH 0/4] tcg: Add muluh and mulsh opcodes

2013-08-17 Thread Richard Henderson
We have -- or will have -- several targets which have a native multiply-highpart instruction: ppc*, ia64, aarch64, alpha. If we leave only the mul[us]2 opcode with which to expose this, we have to handle the register allocation bits in the backends. Better, IMO, to expose the two parts at the TCG

[Qemu-devel] [PATCH 3/4] tcg-ppc64: Implement muluh, mulsh

2013-08-17 Thread Richard Henderson
Using these instead of mulu2 and muls2 lets us avoid having to argument overlap analysis in the backend. Normal register allocation will DTRT. Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/ppc64/tcg-target.c | 32 +++- tcg/ppc64/tcg-target.h | 8

[Qemu-devel] [PATCH 4/4] tcg: Constant fold div, rem

2013-08-17 Thread Richard Henderson
Signed-off-by: Richard Henderson r...@twiddle.net --- tcg/optimize.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index e8dedf3..b29bf25 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -304,6 +304,25 @@ static TCGArg

[Qemu-devel] single step is too slow, if compare to bochs

2013-08-17 Thread Peter Cheung
Hi Alli have written a java program, keep sending the gdb single step command to qemu, i can execute ~60 single steps per seconds. But in bochs i can execute ~130. How can I make qemu run faster in single step? Thanksfrom Peter

Re: [Qemu-devel] single step is too slow, if compare to bochs

2013-08-17 Thread Peter Cheung
The socket is lagging, i keep sending gdb command to qemu and read the result, for every 60 commands, i got 4 seconds lagging, it hangs on the socket:read() in my side for 4 seconds. The qemu is using g_io_channel_write_chars() function to send back the data through socket, anyway to optimize

Re: [Qemu-devel] minimal linux distribution for qemu

2013-08-17 Thread Rob Landley
On 08/16/2013 11:17:06 AM, Herbei Dacian wrote: my system should run in far less memory. something like 2-4MB. but first I need to have a system running so that I can monitor with qemu the addresses accessed for read execute and write by the code run by the emulator. if I reach that is a