Re: [Qemu-devel] [fixed-up][PATCH v6 2/5] hw/timer: add sunxi timer device

2013-11-28 Thread Li Guang
Peter Crosthwaite wrote: On Wed, Nov 27, 2013 at 11:35 PM, Peter Crosthwaite wrote: On Wed, Nov 27, 2013 at 6:29 PM, liguang wrote: Signed-off-by: liguang --- default-configs/arm-softmmu.mak |2 + hw/timer/Makefile.objs |1 + hw/timer/sunxi-pit.c|

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Markus Armbruster
Peter Crosthwaite writes: > On Fri, Nov 29, 2013 at 1:03 AM, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> Il 28/11/2013 14:23, Igor Mammedov ha scritto: > object_property_set(Foo, bar, "baz", &abort_on_err); that is just another way to put burden on caller, instead of

Re: [Qemu-devel] [PATCH arm-devs v2 8/8] arm/highbank.c: Fix MPCore periphbase name

2013-11-28 Thread Andre Przywara
On 11/28/2013 08:41 PM, Peter Maydell wrote: (CCing Rob) On 28 November 2013 03:31, Peter Crosthwaite wrote: GIC_BASE_ADDR is not the base address of the GIC. Its clear from the code that this is the base address of the MPCore. Rename to MPCORE_PERIPHBASE accordingly. "MPCore" is one of tho

Re: [Qemu-devel] Patch v4 : POSIX timer implementation for linux-user.

2013-11-28 Thread Erik de Castro Lopo
er...@mega-nerd.com wrote: > > Changes from v3 version of patch (suggestions from agraf on irc): > * Fix checkpatch.pl issues. > * Use ARRAY_SIZE instead of custom macro. > * Pass 0 as last arg to unlock_user_struct() in host_to_target_itimerspec. > > Changes from original patch: > * Call host's

[Qemu-devel] [Patch v4 1/2] linux-user: Add target struct defs needed for POSIX timer syscalls.

2013-11-28 Thread erikd
From: Erik de Castro Lopo Signed-off-by: Erik de Castro Lopo --- linux-user/syscall_defs.h | 25 + 1 file changed, 25 insertions(+) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index fe540f6..cf08db5 100644 --- a/linux-user/syscall_defs.h +++ b/lin

[Qemu-devel] [Patch v4 2/2] linux-user: Implement handling of 5 POSIX timer syscalls.

2013-11-28 Thread erikd
From: Erik de Castro Lopo Implement timer_create, timer_settime, timer_gettime, timer_getoverrun and timer_delete. Signed-off-by: Erik de Castro Lopo --- linux-user/syscall.c | 176 +++ 1 file changed, 176 insertions(+) diff --git a/linux-user/s

[Qemu-devel] Patch v4 : POSIX timer implementation for linux-user.

2013-11-28 Thread erikd
Changes from v3 version of patch (suggestions from agraf on irc): * Fix checkpatch.pl issues. * Use ARRAY_SIZE instead of custom macro. * Pass 0 as last arg to unlock_user_struct() in host_to_target_itimerspec. Changes from original patch: * Call host's libc functions directly rather than _syscal

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-28 Thread 赵小强
于 11/29/2013 11:48 AM, Andreas Färber 写道: Am 29.11.2013 02:26, schrieb 赵小强: 于 11/12/2013 10:52 PM, Andreas Färber 写道: it would be nice if you could check whether these devices (the non-KVM versions at least) are covered by make check. For ICC bus I am certain that it is. 1. Does "make check

[Qemu-devel] [PATCHv4] qdev: Validate hex properties

2013-11-28 Thread Hannes Reinecke
strtoul(l) might overflow, in which case it'll return '-1' and set the appropriate error code. So update the calls to strtoul(l) when parsing hex properties to avoid silent overflows. And we should be using an intermediate variable to avoid clobbering of the passed-in point on error. Signed-off-by

Re: [Qemu-devel] [PATCH 2/2] hw/mips: use sizes.h macros

2013-11-28 Thread Antony Pavlov
On Thu, 28 Nov 2013 18:08:32 +0100 Stefan Weil wrote: > Am 28.11.2013 07:29, schrieb Antony Pavlov: > > Signed-off-by: Antony Pavlov > > Reviewed-by: Richard Henderson > > --- > > hw/mips/mips_malta.c | 25 + > > include/hw/mips/bios.h | 3 ++- > > 2 files changed, 1

Re: [Qemu-devel] [PATCH 2/2] hw/mips: use sizes.h macros

2013-11-28 Thread Antony Pavlov
On Thu, 28 Nov 2013 15:27:18 +0100 Andreas Färber wrote: > Am 28.11.2013 07:29, schrieb Antony Pavlov: > > Signed-off-by: Antony Pavlov > > Reviewed-by: Richard Henderson > > Are the int -> long changes caused by the BIT() macro usage? Otherwise I > would've recommended to put that in a follow

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-28 Thread 赵小强
于 11/29/2013 11:48 AM, Andreas Färber 写道: Am 29.11.2013 02:26, schrieb 赵小强: 于 11/12/2013 10:52 PM, Andreas Färber 写道: it would be nice if you could check whether these devices (the non-KVM versions at least) are covered by make check. For ICC bus I am certain that it is. 1. Does "make check

[Qemu-devel] [PATCH v2 36/60] target-i386: Change gen_op_mov_reg_A0 size parameter to TCGMemOp

2013-11-28 Thread Richard Henderson
Change the domain of the parameter and update all callers. Which lets us defer completely to gen_op_mov_reg_v. Signed-off-by: Richard Henderson --- target-i386/translate.c | 32 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/target-i386/translate.

[Qemu-devel] [PATCH v2 12/60] target-i386: Remove gen_op_st_T0_A0

2013-11-28 Thread Richard Henderson
Propagate its definition into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 83 - 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 268ed84..d3fc8f3 1

[Qemu-devel] [PATCH v2 50/60] target-i386: Remove gen_op_mov_reg_T0

2013-11-28 Thread Richard Henderson
Replace with its definition, via Coccinelle. Signed-off-by: Richard Henderson --- target-i386/translate.c | 127 +++- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 53e3103..ff0c6

[Qemu-devel] [PATCH v2 34/60] target-i386: Change gen_op_j*z_ecx size parameter to TCGMemOp

2013-11-28 Thread Richard Henderson
Change the domain of the parameter and update all callers. Signed-off-by: Richard Henderson --- target-i386/translate.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 087f0a2..1fdd56b 100644 --- a

[Qemu-devel] [PATCH v2 46/60] target-i386: Use gen_lea_v_seg in pusha/popa

2013-11-28 Thread Richard Henderson
More centralization of handling of segment bases. Also fixes the note about 16-bit wrap around not fully handled. Signed-off-by: Richard Henderson --- target-i386/translate.c | 50 +++-- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/t

Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c

2013-11-28 Thread Andreas Färber
Am 28.11.2013 22:33, schrieb Andreas Tobler: > Hello, > > On 09.11.13 00:15, Andreas Tobler wrote: >> Hello, >> >> the attached patch fixes compilation on FreeBSD for >> hw/ppc/mac_new/oldworld.c on FreeBSD. >> >> The affected function is present in machine/param.h on FreeBSD: >> >> #define round_

[Qemu-devel] [PATCH v2 40/60] target_i386: Clean up gen_pop_T0

2013-11-28 Thread Richard Henderson
Reduce ifdefs, share more code between paths, reduce the number of TCG ops generated. Avoid re-computing the size of the operation across gen_pop_T0 and gen_pop_update. Add forgotten zero-extension in the TARGET_X86_64, !CODE64, ss32 case. Signed-off-by: Richard Henderson --- target-i386/trans

[Qemu-devel] [PATCH v2 35/60] target-i386: Change aflag to TCGMemOp

2013-11-28 Thread Richard Henderson
Changing the domain to TCGMemOp makes it easier to interoperate with other portions of the rest of the translator. Signed-off-by: Richard Henderson --- target-i386/translate.c | 177 +++- 1 file changed, 86 insertions(+), 91 deletions(-) diff --git a/

[Qemu-devel] [PATCH v2 53/60] target-i386: Remove gen_op_mov_TN_reg

2013-11-28 Thread Richard Henderson
Replace with its definition, via Coccinelle. Signed-off-by: Richard Henderson --- target-i386/translate.c | 111 +++- 1 file changed, 53 insertions(+), 58 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index ab471b4..7f2c7

[Qemu-devel] [PATCH v2 27/60] target-i386: Remove gen_movtl_T*_im

2013-11-28 Thread Richard Henderson
Propagate the definitions into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 76eeaa1..58bea41 100644 --- a/target-i386/translate

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-28 Thread Andreas Färber
Am 29.11.2013 02:26, schrieb 赵小强: > 于 11/12/2013 10:52 PM, Andreas Färber 写道: >> it would be nice if you could check whether these >> devices (the non-KVM versions at least) are covered by make check. For >> ICC bus I am certain that it is. > 1. Does "make check" mean the build target in the Mak

[Qemu-devel] [PATCH v2 37/60] target-i386: Change dflag to TCGMemOp

2013-11-28 Thread Richard Henderson
Changing the domain to TCGMemOp makes it easier to interoperate with other portions of the rest of the translator. We now only have one domain for size operands inside the translator, which makes things less confusing all the way around. There are still a number of helpers that continue to use th

[Qemu-devel] [PATCH v2 47/60] target-i386: Rewrite gen_enter inline

2013-11-28 Thread Richard Henderson
Use gen_lea_v_seg for centralized segment base knowledge. Unify code across 32- and 64-bit. Fix note about "must save state" before using the out-of-line helpers. Signed-off-by: Richard Henderson --- target-i386/helper.h | 4 --- target-i386/seg_helper.c | 68 -

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-28 Thread Andreas Färber
Am 29.11.2013 01:46, schrieb Li Guang: > Andreas Färber wrote: >> Am 27.11.2013 10:22, schrieb Andreas Färber: >> >>> Hi, >>> >>> Am 26.11.2013 10:22, schrieb Peter Crosthwaite: >>> On Tue, Nov 26, 2013 at 5:22 PM, liguang wrote: > Signed-off-by: liguang > ---

[Qemu-devel] [PATCH v2 52/60] target-i386: Remove gen_op_addl_T0_T1

2013-11-28 Thread Richard Henderson
Replace with its definition, via Coccinelle. Signed-off-by: Richard Henderson --- target-i386/translate.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index ba43678..ab471b4 100644 --- a/target-i386/translate.c

[Qemu-devel] [PATCH v2 59/60] target-i386: Tidy ljmp

2013-11-28 Thread Richard Henderson
Remove an unnecessary move opcode. Signed-off-by: Richard Henderson --- target-i386/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index fcf4c67..1a52c51 100644 --- a/target-i386/translate.c +++ b/target-i386/tr

[Qemu-devel] [PATCH v2 57/60] target-i386: Tidy some size computation

2013-11-28 Thread Richard Henderson
Clean up relics of multiple size domains: - MO_16 + 1 => - 1 + 1 => 0. Signed-off-by: Richard Henderson --- target-i386/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index ee9d586..9052907 100644 --- a/targ

[Qemu-devel] [PATCH v2 51/60] target-i386: Remove gen_op_mov_reg_T1

2013-11-28 Thread Richard Henderson
Replace with its definition, via Coccinelle. Signed-off-by: Richard Henderson --- target-i386/translate.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index ff0c6a9..ba43678 100644 --- a/target-i386/tra

[Qemu-devel] [PATCH v2 55/60] target-i386: Remove gen_op_movl_A0_reg

2013-11-28 Thread Richard Henderson
No longer used. Signed-off-by: Richard Henderson --- target-i386/translate.c | 5 - 1 file changed, 5 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 62a2cbc..19cabf6 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -376,11 +376,6 @@ st

[Qemu-devel] [PATCH v2 49/60] target-i386: Rewrite leave

2013-11-28 Thread Richard Henderson
Unify the code across stack pointer widths. Fix the note about not updating ESP before the potential exception. Signed-off-by: Richard Henderson --- target-i386/translate.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/target-i386/translate.

[Qemu-devel] [PATCH v2 58/60] target-i386: Rename gen_op_jmp_T0 to gen_op_jmp_v

2013-11-28 Thread Richard Henderson
And make the destination argument explicit. Signed-off-by: Richard Henderson --- target-i386/translate.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 9052907..fcf4c67 100644 --- a/target-i386/transl

[Qemu-devel] [PATCH v2 56/60] target-i386: Tidy gen_add_A0_im

2013-11-28 Thread Richard Henderson
Merge gen_op_addl_A0_im and gen_op_addq_A0_im into gen_add_A0_im and clean up the ifdef. Replace the one remaining user of gen_op_addl_A0_im with gen_add_A0_im. Signed-off-by: Richard Henderson --- target-i386/translate.c | 27 +-- 1 file changed, 5 insertions(+), 22 del

[Qemu-devel] [PATCH v2 33/60] target-i386: Change gen_op_add_reg_* size parameter to TCGMemOp

2013-11-28 Thread Richard Henderson
These functions used the aflags/dflags domain, which is log2-1 of the byte size. Confusingly, they used enumeration values from the log2 domain. Change the domain of the parameter and update all callers. Since we're now in a common domain, defer the deposit/extend/mov decision to gen_op_mov_reg_

[Qemu-devel] [PATCH v2 42/60] target-i386: Use gen_lea_v_seg in gen_lea_modrm

2013-11-28 Thread Richard Henderson
Centralize handling of segment bases. Signed-off-by: Richard Henderson --- target-i386/translate.c | 82 ++--- 1 file changed, 23 insertions(+), 59 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 02b45ef..c655e65 1006

[Qemu-devel] [PATCH v2 41/60] target-i386: Create gen_lea_v_seg

2013-11-28 Thread Richard Henderson
Add forgotten zero-extension in the TARGET_X86_64, !CODE64, ss32 case; use this new function to implement gen_string_movl_A0_EDI, gen_string_movl_A0_ESI, gen_add_A0_ds_seg. Signed-off-by: Richard Henderson --- target-i386/translate.c | 159 1 file

[Qemu-devel] [PATCH v2 54/60] target-i386: Remove gen_op_mov_reg_A0

2013-11-28 Thread Richard Henderson
Replace with its definition. Signed-off-by: Richard Henderson --- target-i386/translate.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 7f2c718..62a2cbc 100644 --- a/target-i386/translate.c +++ b/target-i386/tran

[Qemu-devel] [PATCH v2 44/60] target-i386: Tidy cpu_regs initialization

2013-11-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 87 - 1 file changed, 36 insertions(+), 51 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 07dac7c..5a5c8b6 100644 --- a/target-i386/translate.c +++ b/

[Qemu-devel] [PATCH v2 48/60] target-i386: Introduce mo_stacksize

2013-11-28 Thread Richard Henderson
Centralize computation of a MO_SIZE for the stack pointer. Signed-off-by: Richard Henderson --- target-i386/translate.c | 43 ++- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index fa707c

[Qemu-devel] [PATCH v2 43/60] target-i386: Use gen_lea_v_seg in stack subroutines

2013-11-28 Thread Richard Henderson
I.e. gen_push_v, gen_pop_T0, gen_stack_A0. More centralization of handling of segment bases. Signed-off-by: Richard Henderson --- target-i386/translate.c | 49 +++-- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/target-i386/translate.

[Qemu-devel] [PATCH v2 31/60] target-i386: Remove gen_op_andl_A0_ffff

2013-11-28 Thread Richard Henderson
Replace it with tcg_gen_ext16u_tl, and in two cases merge with a previous move from cpu_regs. Signed-off-by: Richard Henderson --- target-i386/translate.c | 33 + 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/target-i386/translate.c b/target-i386

[Qemu-devel] [PATCH v2 45/60] target-i386: Access segs via TCG registers

2013-11-28 Thread Richard Henderson
Having segs[].base as a register significantly improves code generation for real and protected modes, particularly for TBs that have multiple memory references where the segment base can be held in a hard register through the TB. Signed-off-by: Richard Henderson --- target-i386/translate.c | 71

[Qemu-devel] [PATCH v2 39/60] target-i386: Combine gen_push_T* into gen_push_v

2013-11-28 Thread Richard Henderson
Reduce ifdefs, share more code between paths, reduce the number of TCG ops generated. Add forgotten zero-extension in the TARGET_X86_64, !CODE64, ss32 case. Signed-off-by: Richard Henderson --- target-i386/translate.c | 106 +++- 1 file changed, 32 in

[Qemu-devel] [PATCH v2 29/60] target-i386: Remove gen_op_andl_T0_im

2013-11-28 Thread Richard Henderson
Replace it with its definition. Signed-off-by: Richard Henderson --- target-i386/translate.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 236d0a7..009529e 100644 --- a/target-i386/translate.c +++

[Qemu-devel] [PATCH v2 30/60] target-i386: Remove gen_op_movl_T0_T1

2013-11-28 Thread Richard Henderson
Replace it with its definition. Signed-off-by: Richard Henderson --- target-i386/translate.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 009529e..bb45c2b 100644 --- a/target-i386/translate.c +++ b/target-i386/t

[Qemu-devel] [PATCH v2 38/60] target-i386: Tidy addr16 code in gen_lea_modrm

2013-11-28 Thread Richard Henderson
Unlike the addr32, there was no bug. But we can use the same technique to reduce the number of TCG ops. Signed-off-by: Richard Henderson --- target-i386/translate.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/target-i386/translate.c b

[Qemu-devel] [PATCH v2 25/60] target-i386: Remove gen_op_movl_T0_im*

2013-11-28 Thread Richard Henderson
Propagate the definitions into all users. The only time that gen_op_movl_T1_imu was used, the input was type 'unsigned', so the replacement works identically. Signed-off-by: Richard Henderson --- target-i386/translate.c | 30 ++ 1 file changed, 10 insertions(+), 20 d

[Qemu-devel] [PATCH v2 24/60] target-i386: Remove gen_op_movl_T0_im*

2013-11-28 Thread Richard Henderson
Propagate the definition of gen_op_movl_T0_im to all users. The function gen_op_movl_T0_imu was unused. Signed-off-by: Richard Henderson --- target-i386/translate.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/target-i386/translate.c b/ta

[Qemu-devel] [PATCH v2 22/60] target-i386: Tidy extend + move

2013-11-28 Thread Richard Henderson
For the known MO_32/MO_64 cases, we don't need to extend a 32-bit temp into a 64-bit temp before storing into the hardware register. We do need the extension for the MO_8/MO_16 cases, in order for the deposit_tl operation to work, so leave those alone. Signed-off-by: Richard Henderson --- targe

[Qemu-devel] [PATCH v2 32/60] target-i386: Use TCGMemOp for 'ot' variables

2013-11-28 Thread Richard Henderson
The 'ot' variables (operand type?) hold the log2(byte size) of the operand being manipulated. This is the same as the MO_SIZE subset of the TCGMemOp. Indeed, we often pass 'ot' to the tcg_gen_qemu_ld/st functions. Changing the type from 'int' makes it easier to see what domain the variable shoul

[Qemu-devel] [PATCH v2 20/60] target-i386: Tidy load + truncate

2013-11-28 Thread Richard Henderson
We can now use tcg_gen_qemu_ld_i32 directly to avoid the truncation. Signed-off-by: Richard Henderson --- target-i386/translate.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index

[Qemu-devel] [PATCH v2 26/60] target-i386: Remove gen_op_mov*_A0_im

2013-11-28 Thread Richard Henderson
Propagate the definitions into all users. In two cases, this allows us to share code between the 32-bit and 64-bit immediate moves. Signed-off-by: Richard Henderson --- target-i386/translate.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/target-i386/tra

[Qemu-devel] [PATCH v2 14/60] target-i386: Fix typo in gen_push_T1

2013-11-28 Thread Richard Henderson
By inspection, obviously we should be storing T[1] not T[0]. This could only happen for x86_64 in 64-bit mode with 0x66 prefix to call insn -- i.e. never. Signed-off-by: Richard Henderson --- target-i386/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/

[Qemu-devel] [PATCH v2 28/60] target-i386: Remove gen_op_andl_T0_ffff

2013-11-28 Thread Richard Henderson
Replace it with tcg_gen_ext16u_tl. In four places we can combine that with a previous move into cpu_T[0], and in one place we can infer that the zero-extension has already happened via the previous load. Signed-off-by: Richard Henderson --- target-i386/translate.c | 43 ++---

[Qemu-devel] [PATCH v2 19/60] target-i386: Tidy gen_op_mov_TN_reg+tcg_gen_trunc_tl_i32

2013-11-28 Thread Richard Henderson
For the 16 and 32-bit cases, we don't need to truncate via a temporary register. Signed-off-by: Richard Henderson --- target-i386/translate.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 107f0e6..16fae82 1006

[Qemu-devel] [PATCH v2 11/60] target-i386: Introduce gen_op_st_rm_T0_A0

2013-11-28 Thread Richard Henderson
Too many places have the same test vs OR_TMP0 to indicate a write back to memory. Hoist that to a subroutine. Signed-off-by: Richard Henderson --- target-i386/translate.c | 85 ++--- 1 file changed, 24 insertions(+), 61 deletions(-) diff --git a/targ

[Qemu-devel] [PATCH v2 17/60] target-i386: Remove unused arguments to gen_lea_modrm

2013-11-28 Thread Richard Henderson
The reg_ptr and offset_ptr outputs are universally unused. Signed-off-by: Richard Henderson --- target-i386/translate.c | 146 +++- 1 file changed, 69 insertions(+), 77 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index

[Qemu-devel] [PATCH v2 23/60] target-i386: Remove gen_op_movl_T0_0

2013-11-28 Thread Richard Henderson
Propagate its definition into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 51ee579..6f88ed9 100644 --- a/target-i386/translate

[Qemu-devel] [PATCH v2 18/60] target-i386: Use MO_BE for movbe

2013-11-28 Thread Richard Henderson
Fold the bswap into the memory operation. Signed-off-by: Richard Henderson --- target-i386/translate.c | 40 +--- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 45a00ba..107f0e6 100644 ---

[Qemu-devel] [PATCH v2 09/60] target-i386: Remove gen_op_ld_T1_A0

2013-11-28 Thread Richard Henderson
Propagate its definition into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index c64203e..586e5af 100644 --- a/target-i386/tra

[Qemu-devel] [PATCH v2 16/60] target-i386: Tidy movsl

2013-11-28 Thread Richard Henderson
Always perform a sign-extending load. In the extremely unlikely case that we've used an 0x66 prefix, the extension to 64-bits is unnecessary but not wrong; the store will still examine only 16 bits. Signed-off-by: Richard Henderson --- target-i386/translate.c | 6 +- 1 file changed, 1 inser

[Qemu-devel] [PATCH v2 13/60] target-i386: Remove gen_op_st_T1_A0

2013-11-28 Thread Richard Henderson
Propagate its definition into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index d3fc8f3..b28663b 100644 --- a/target-i386/translate.c +++ b/t

[Qemu-devel] [PATCH v2 21/60] target-i386: Tidy extend + store

2013-11-28 Thread Richard Henderson
We can now use tcg_gen_qemu_st_i32 directly to avoid the extension. Signed-off-by: Richard Henderson --- target-i386/translate.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 117714

[Qemu-devel] [PATCH v2 10/60] target-i386: Remove gen_op_lds_T0_A0

2013-11-28 Thread Richard Henderson
Replace its users by gen_op_ld_v with the MO_SIGN bit set. Signed-off-by: Richard Henderson --- target-i386/translate.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 586e5af..8c3d7ae 100644 --- a/target-i

[Qemu-devel] [PATCH v2 15/60] target-i386: Tidy mov[sz][bw]

2013-11-28 Thread Richard Henderson
We can use the MO_SIGN bit to tidy the reg-reg switch statement as well as pass it on to gen_op_ld_v, eliminating one call. Signed-off-by: Richard Henderson --- target-i386/translate.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/target-i386/trans

[Qemu-devel] [PATCH v2 05/60] target-i386: Use new tcg_gen_qemu_st_* helpers

2013-11-28 Thread Richard Henderson
In preference to the older helpers. Stores only in this patch. Signed-off-by: Richard Henderson --- target-i386/translate.c | 75 ++--- 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c i

[Qemu-devel] [PATCH v2 08/60] target-i386: Remove gen_op_ldu_T0_A0

2013-11-28 Thread Richard Henderson
Propagate its definition into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 8e231b3..c64203e 100644 --- a/target-i386/translate.c

[Qemu-devel] [PATCH v2 04/60] target-i386: Use new tcg_gen_qemu_ld_* helpers

2013-11-28 Thread Richard Henderson
In preference to the older helpers. Loads only in this patch. Signed-off-by: Richard Henderson --- target-i386/translate.c | 84 ++--- 1 file changed, 31 insertions(+), 53 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c in

[Qemu-devel] [PATCH v2 02/60] target-i386: Push DisasContext into load/store helpers

2013-11-28 Thread Richard Henderson
Rather than add s->mem_index into a combined size+mem_index argument, pass the context down. This will allow cleaning up s->mem_index later. Signed-off-by: Richard Henderson --- target-i386/translate.c | 331 +--- 1 file changed, 170 insertions(+), 16

[Qemu-devel] [PATCH v2 07/60] target-i386: Remove gen_op_ld_T0_A0

2013-11-28 Thread Richard Henderson
Propagate its definition into all users. Signed-off-by: Richard Henderson --- target-i386/translate.c | 77 +++-- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 87f4470..8e231b3 1

[Qemu-devel] [PATCH v2 03/60] target-i386: Stop encoding DisasContext.mem_index

2013-11-28 Thread Richard Henderson
Now that we don't combine mem_index with operand size info, we don't need to encode it. Which tidies many places that access it. Signed-off-by: Richard Henderson --- target-i386/translate.c | 67 ++--- 1 file changed, 25 insertions(+), 42 deletions(-)

[Qemu-devel] [PATCH v2 00/60] target-i386 improvements

2013-11-28 Thread Richard Henderson
Changes v1-v2: * Rebased on master, with one of the patches already applied to 1.7. r~ Richard Henderson (60): exec: Delay CPU_LOG_TB_CPU until we actually execute a TB target-i386: Push DisasContext into load/store helpers target-i386: Stop encoding DisasContext.mem_index target-i38

[Qemu-devel] [PATCH v2 01/60] exec: Delay CPU_LOG_TB_CPU until we actually execute a TB

2013-11-28 Thread Richard Henderson
The previous placement could result in duplicate logging while still processing interrupts. Signed-off-by: Richard Henderson --- cpu-exec.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 30cfa2a..3c4800f 10

Re: [Qemu-devel] [PATCH V2 0/8] qapi script: support enum as discriminator and better enum name

2013-11-28 Thread Wenchao Xia
于 2013/11/28 22:24, Luiz Capitulino 写道: On Thu, 28 Nov 2013 14:19:48 +0800 Wenchao Xia wrote: 于 2013/11/26 0:47, Luiz Capitulino 写道: On Wed, 13 Nov 2013 06:25:00 +0800 Wenchao Xia wrote: This series is respined from RFC series at: http://lists.nongnu.org/archive/html/qemu-devel/2013-11/msg

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic & icc_bus

2013-11-28 Thread 赵小强
于 11/13/2013 02:06 PM, 赵小强 写道: 于 11/12/2013 10:52 PM, Andreas Färber 写道: Resending yesterday's message since it hasn't arrived on qemu-devel... Am 11.11.2013 04:58, schrieb 赵小强: 于 11/05/2013 04:51 PM, 赵小强 写道: 于 2013年11月05日 16:25, Chen Fan 写道: On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao

Re: [Qemu-devel] [PATCH] block: Use BDRV_O_NO_BACKING where appropriate

2013-11-28 Thread Fam Zheng
On 2013年11月28日 19:02, Kevin Wolf wrote: If you open an image temporarily just because you want to check its size or get it flushed, there's no real reason to open the whole backing file chain. Signed-off-by: Kevin Wolf --- block.c | 3 ++- block/qcow2.c | 3 ++- block/vmdk.c | 2 +-

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-28 Thread Peter Crosthwaite
On Fri, Nov 29, 2013 at 10:46 AM, Li Guang wrote: > Andreas Färber wrote: >> >> Am 27.11.2013 10:22, schrieb Andreas Färber: >> >>> >>> Hi, >>> >>> Am 26.11.2013 10:22, schrieb Peter Crosthwaite: >>> On Tue, Nov 26, 2013 at 5:22 PM, liguang wrote: > > Signed-off-by: lig

Re: [Qemu-devel] [fixed-up][PATCH v6 2/5] hw/timer: add sunxi timer device

2013-11-28 Thread Peter Crosthwaite
On Wed, Nov 27, 2013 at 11:35 PM, Peter Crosthwaite wrote: > On Wed, Nov 27, 2013 at 6:29 PM, liguang wrote: >> Signed-off-by: liguang >> --- >> default-configs/arm-softmmu.mak |2 + >> hw/timer/Makefile.objs |1 + >> hw/timer/sunxi-pit.c| 254 >> +

Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type

2013-11-28 Thread Li Guang
Andreas Färber wrote: Am 27.11.2013 10:22, schrieb Andreas Färber: Hi, Am 26.11.2013 10:22, schrieb Peter Crosthwaite: On Tue, Nov 26, 2013 at 5:22 PM, liguang wrote: Signed-off-by: liguang --- hw/arm/Makefile.objs |1 + hw/arm/sunxi-soc.c | 98 ++

Re: [Qemu-devel] [PATCH v2 0/2] qemu-iotests: Filter out "qemu-io> " in all tests

2013-11-28 Thread Fam Zheng
于2013年11月29日 星期五 01时57分42秒,Eric Blake写到: On 11/28/2013 07:49 AM, Kevin Wolf wrote: https://github.com/famz/qemu.git 035-filter-qemu-io v2: Rebase to current master. [01] Add Reviewed-by for Eric. [02] Update comment to describe the command for mechanical substitution. (Eric)

Re: [Qemu-devel] [PATCH] qom: abort on error in property setter if caller passed errp == NULL

2013-11-28 Thread Peter Crosthwaite
On Fri, Nov 29, 2013 at 1:03 AM, Markus Armbruster wrote: > Paolo Bonzini writes: > >> Il 28/11/2013 14:23, Igor Mammedov ha scritto: >>> > object_property_set(Foo, bar, "baz", &abort_on_err); >>> >>> that is just another way to put burden on caller, instead of doing it >>> in one place. >> >> It

Re: [Qemu-devel] [PATCH arm-devs v3 0/4] A9 global timer + mpcore trivials

2013-11-28 Thread Peter Crosthwaite
On Fri, Nov 29, 2013 at 4:30 AM, Peter Maydell wrote: > On 28 November 2013 06:19, Peter Crosthwaite > wrote: >> Hi Peter, >> >> Another spin of the ARM MPCore global timer work. Patches 1 & 2 are some >> trivial cleanup to MPCore I did along the way. > > I'm happy with all of these, except that

Re: [Qemu-devel] [PATCH arm-devs v2 8/8] arm/highbank.c: Fix MPCore periphbase name

2013-11-28 Thread Peter Crosthwaite
On Fri, Nov 29, 2013 at 5:41 AM, Peter Maydell wrote: > On 28 November 2013 03:31, Peter Crosthwaite > wrote: >> GIC_BASE_ADDR is not the base address of the GIC. Its clear from the >> code that this is the base address of the MPCore. Rename to >> MPCORE_PERIPHBASE accordingly. > > "MPCore" is on

Re: [Qemu-devel] [PATCH arm-devs v2 5/8] arm/highbank: Fix CBAR intialisation

2013-11-28 Thread Peter Crosthwaite
On Fri, Nov 29, 2013 at 5:34 AM, Peter Maydell wrote: > On 28 November 2013 03:29, Peter Crosthwaite > wrote: >> Fix the CBAR initialisation by using the newly defined static property. >> CBAR is now set before realization, so the intended value is now >> actually used. >> >> So I have kinda test

Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c

2013-11-28 Thread Andreas Tobler
On 28.11.13 23:38, Peter Maydell wrote: > On 28 November 2013 21:33, Andreas Tobler wrote: >> Hello, >> >> On 09.11.13 00:15, Andreas Tobler wrote: >>> Hello, >>> >>> the attached patch fixes compilation on FreeBSD for >>> hw/ppc/mac_new/oldworld.c on FreeBSD. >>> >>> The affected function is pres

Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c

2013-11-28 Thread Peter Maydell
On 28 November 2013 21:33, Andreas Tobler wrote: > Hello, > > On 09.11.13 00:15, Andreas Tobler wrote: >> Hello, >> >> the attached patch fixes compilation on FreeBSD for >> hw/ppc/mac_new/oldworld.c on FreeBSD. >> >> The affected function is present in machine/param.h on FreeBSD: >> >> #define ro

Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c

2013-11-28 Thread Andreas Tobler
Hello, On 09.11.13 00:15, Andreas Tobler wrote: > Hello, > > the attached patch fixes compilation on FreeBSD for > hw/ppc/mac_new/oldworld.c on FreeBSD. > > The affected function is present in machine/param.h on FreeBSD: > > #define round_page(x) unsigned long)(x)) + PAGE_MASK) & ~(PAGE_M

Re: [Qemu-devel] Bug#728876: qemu: smbd forked by qemu uses global directory /var/run/samba/ncalrpc

2013-11-28 Thread Michael Tokarev
Jan, there's one more samba-related fix for slirp, also from Michael Büsch. Add my Signed-off-By: Michael Tokarev if needed. Thanks, /mjt 06.11.2013 17:01, Michael Büsch wrote: > Package: qemu > Version: 1.6.0+dfsg-2 > Severity: normal > Tags: patch > > The smbd forked by qemu still uses th

Re: [Qemu-devel] [PATCH arm-devs v2 7/8] arm/xilinx_zynq: Implement CBAR intialisation

2013-11-28 Thread Peter Maydell
On 28 November 2013 03:30, Peter Crosthwaite wrote: > Fix the CBAR initialisation by using the newly defined static property. > Zynq will now correctly init the CBAR to the SCU base address. > > Needed to boot Linux on the xilinx_zynq machine model. Typo in subject: "initialization". thanks --

Re: [Qemu-devel] [PATCH arm-devs v2 8/8] arm/highbank.c: Fix MPCore periphbase name

2013-11-28 Thread Peter Maydell
On 28 November 2013 03:31, Peter Crosthwaite wrote: > GIC_BASE_ADDR is not the base address of the GIC. Its clear from the > code that this is the base address of the MPCore. Rename to > MPCORE_PERIPHBASE accordingly. "MPCore" is one of those terms I dislike because it doesn't actually match up w

Re: [Qemu-devel] [PATCH arm-devs v2 5/8] arm/highbank: Fix CBAR intialisation

2013-11-28 Thread Peter Maydell
On 28 November 2013 03:29, Peter Crosthwaite wrote: > Fix the CBAR initialisation by using the newly defined static property. > CBAR is now set before realization, so the intended value is now > actually used. > > So I have kinda tested this. I booted an ARM kernel on Highbank with the > stock Hig

Re: [Qemu-devel] Changed host CPU from Core2Duo to Core i3 or i5 => Windows 8 reboots infinitely

2013-11-28 Thread Erik Rull
Erik Rull wrote: Hi all, I have the following qemu commandline on an i3 or i5 CPU (both behave the same), Windows XP (Standard PC installation) runs fine, Windows 7 and Windows 8 reboot in an infinite loop either shortly before the logo is displayed (Windows 7) or after the boot logo is displaye

[Qemu-devel] slirp smb with modern win guests when samba is also running on host

2013-11-28 Thread Michael Tokarev
After numerous reports that -smb (or -netdev user,smb=foo) not working with modern windows (win7 and vista are reported as non-working), I started digging myself. And found that indeed it doesn't work, and why. The thing is that modern win tries to connect to port 445 (microsoft-ds) first, and if

[Qemu-devel] [PULL v3 09/12] lm32_sys: print test result on stderr

2013-11-28 Thread Michael Walle
Do not use qemu_log(). Signed-off-by: Michael Walle --- hw/misc/lm32_sys.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/lm32_sys.c b/hw/misc/lm32_sys.c index 8176cdb..6af0cca 100644 --- a/hw/misc/lm32_sys.c +++ b/hw/misc/lm32_sys.c @@ -80,7 +80,7 @@ static void

[Qemu-devel] [PULL v3 12/12] hw/lm32: print error if cpu model is not found

2013-11-28 Thread Michael Walle
QEMU crashed if a the given cpu_model is not found. Signed-off-by: Michael Walle --- hw/lm32/lm32_boards.c | 10 ++ hw/lm32/milkymist.c |5 + 2 files changed, 15 insertions(+) diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c index c032bb8..5e22e9b 100644 --- a/hw/l

[Qemu-devel] [PULL v3 00/12] target-lm32 updates

2013-11-28 Thread Michael Walle
Hi Anthony, This is a pull for various updates and fixes for the LatticeMico32 target. Please pull. changes since v2: - rebased - replaced ifdef HOST_WORDS_BIGENDIAN with be16_to_cpu() in "milkymist-vgafb: swap pixel data in source buffer" - bumped "target-lm32: move model features to LM32

Re: [Qemu-devel] [PATCH 1/4 v4] block: rename pflash_t member width to bank_width

2013-11-28 Thread Peter Maydell
On 22 October 2013 17:35, Roy Franz wrote: > Rename the 'width' member of the pflash_t structuer > in preparation for adding a bank_width member. > > Signed-off-by: Roy Franz Reviewed-by: Peter Maydell -- PMM

[Qemu-devel] [PULL v3 03/12] milkymist-uart: use qemu_chr_fe_write_all() instead of qemu_chr_fe_write()

2013-11-28 Thread Michael Walle
From: Antony Pavlov qemu_chr_fe_write() is capable of returning 0 to indicate EAGAIN (and friends) and we don't handle this. Just change it to qemu_chr_fe_write_all() to fix. Reported-by: Peter Crosthwaite Acked-by: Peter Crosthwaite Signed-off-by: Antony Pavlov Signed-off-by: Michael Walle

[Qemu-devel] [PULL v3 02/12] tests: lm32: new rule for single test cases

2013-11-28 Thread Michael Walle
Introduce new target "check_%" to run indiviudal test caes, eg. make check_mmu Signed-off-by: Michael Walle --- tests/tcg/lm32/Makefile |3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tcg/lm32/Makefile b/tests/tcg/lm32/Makefile index 9a00ef7..19e0664 100644 --- a/tests/tcg/lm32

  1   2   3   >