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 rea

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 it

[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

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

2013-08-17 Thread Richard Henderson
Signed-off-by: Richard Henderson --- 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 do_constant_folding_2(TCGOpco

[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 --- tcg/ppc64/tcg-target.c | 32 +++- tcg/ppc64/tcg-target.h | 8 2 files changed

[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 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 --- tcg/mips/tcg-target.c | 10 ++ tcg/mips/tcg-target.h | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/t

[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 --- tcg/aarch64/tcg-target.h | 4 tcg/arm/tcg-target.h | 2 ++ tcg/hppa/tcg-target.h| 2 ++ tcg/i386/tcg-target.h| 4 tcg/ia64/tcg-target.h

[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 --- include/qemu/cache-utils.h | 4 ++-- linux-user/main.c | 2 +- util/cache-utils.c | 51 ++-

[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 --- util/getauxval.c | 56 ++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/util/getauxval.c b/util/getauxval.c index 55b639c..2e93a14 100644 --- a/u

[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 --- include/elf.h| 22 ++ tcg/arm/tcg-target.c | 15 ++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/include/elf.h b/include/elf.h index

[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 --- include/elf.h | 14

[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_get

[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 --- include/elf.h | 34 ++ tcg/ppc64/tcg-target.c | 11 ++- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/include/elf.h b/include

[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 --- include/qemu/osdep.h | 20 linux-user/main.c| 1 + util/Makefile.objs | 1 + util/getauxval.c | 91 vl.c

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

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 t

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 i

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 > > 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 CPU hot-add and

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 >> >> 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.

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 > > 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, the > first

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 > > 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 > last patch.

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 > > 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 care

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 > > Pass on the generic arguments unadulterated, and the machine-specific > ones as separate argument. > > Signed-off-by: Markus Armbruster > Acked-by: Alexander Graf > --- > hw/ppc/e500.c | 35

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 > > Don't explode when the variable is used just once, and never changed. > > Signed-off-by: Markus Armbruster > Acked-by: Alexander Graf > --- > hw/ppc/e500plat.c | 18 ++ > hw/ppc/mpc8544ds.c | 18 ++-

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 > > Don't explode QEMUMachineInitArgs before passing it to > sun4m_hw_init(), sun4uv_init(). > > Signed-off-by: Markus Armbruster > --- > hw/sparc/sun4m.c | 113 > --

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 > > Don't explode when the variable is used just a few times, and never > changed. > > Signed-off-by: Markus Armbruster > --- > hw/i386/pc_q35.c | 22 +- > 1 file changed, 9 insertions(+), 13 deletions(-)

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 = args->

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] [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 pa

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

[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 --- version.rc |2 ++ 1 file changed, 2 insertions(+) diff --git a/version.rc b/version.rc index 82e10ec..a50d62f 100644 --- a/version.rc +++ b/version.rc @@ -26,3