Re: [Qemu-devel] [PATCH 1/3] qemu-char: Add new char backend CirMemCharDriver

2013-01-23 Thread Lei Li
On 01/23/2013 11:31 PM, Luiz Capitulino wrote: On Wed, 23 Jan 2013 11:15:40 +0800 Lei Li wrote: +static int cirmem_chr_write(CharDriverState *chr, const uint8_t *buf, int len) +{ +CirMemCharDriver *d = chr->opaque; +int i; + +if (!buf || (len < 0)) { +return -1; +} Is

Re: [Qemu-devel] [PATCH] aio-posix: Fix return value of aio_poll()

2013-01-23 Thread Dietmar Maurer
> > But when I use a thread it triggers the bug in bdrv_drain_all(). So > > how can I fix bdrv_drain_all() if I use a separate thread to write data? > > The bug is, in all likelihood, in your own code. Sorry. :) yes. I still not fully understand that aio code. If I detect a incomplete write, I

Re: [Qemu-devel] [RESEND PATCH for 1.4 v10 0/3] char: Add CirMemCharDriver and provide QMP interface

2013-01-23 Thread Lei Li
On 01/23/2013 11:47 PM, Luiz Capitulino wrote: On Wed, 23 Jan 2013 17:06:09 +0800 Lei Li wrote: Hi Anthony, Resubmit this series with your comments squashed in and Luiz's new comments fixed up. I will push console command part in another thread. There are two bugs in this series. QEMU starte

[Qemu-devel] [RFC] Virtio-desktop: Virtio-based virtual desktop

2013-01-23 Thread Anup Patel
Hi All, How about having a generic Virtio-based machine for emulating a virtual desktop ? I know folks have already thought about this and probably also tried something or other on this front but, it will be good to know the downsides. Virtio-desktop can be a separate specification describing a

Re: [Qemu-devel] [PATCH] gdbstub: Do not kill target in system emulation mode

2013-01-23 Thread Joel Brobecker
> qAttached is not supported in Qemu yet, this explains why Gdb sends > "kill" at the end of debug session. I will implement it and revert your > patch. Gdb will automatically detach instead of kill at the end of > debugging session. I would make it configurable by the command-line, to allow for b

[Qemu-devel] [PATCH 0/3] accel:some cleanup work for vm accelerator

2013-01-23 Thread liguang
do some cleanup work fo vm accelerator patch 1/3: skip init accelerator if it's not available patch 2/3: correct error message when fail to init kvm patch 3/3: change {xen,kvm,tcg,qtest}_allowed from int to bool hw/xen.h |4 +- include/sysemu/kvm.h |2 +- include/sysemu/q

[Qemu-devel] [PATCH 13/57] target-i386: Name the cc_op enumeration

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/cpu.h | 4 ++-- target-i386/translate.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index fe50698..04ac339 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -582,7 +582,

[Qemu-devel] [PATCH 2/3] vl: correct error message when fail to init kvm

2013-01-23 Thread liguang
command: qemu-system-x86_64 -hda disk.img -smp 32 --enable-kvm error: Number of SMP cpus requested (32) exceeds max cpus supported by KVM (16) failed to initialize KVM: Invalid argument No accelerator found! well, it did find kvm, but failed to init, so message "No accelerator found!" is confusing

[Qemu-devel] [PATCH 1/3] vl: skip init accelerator if it's not available

2013-01-23 Thread liguang
Signed-off-by: liguang --- vl.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vl.c b/vl.c index 4ee1302..25aa8e8 100644 --- a/vl.c +++ b/vl.c @@ -2540,18 +2540,18 @@ static int configure_accelerator(void) p = get_opt_name(buf, sizeof (buf), p, ':

[Qemu-devel] [PATCH 33/57] target-i386: introduce gen_cmovcc1

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 70 + 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 9b57fb4..2a220c1 100644 --- a/target-i

[Qemu-devel] [PATCH 37/57] target-i386: introduce gen_jcc1_noeob

2013-01-23 Thread Richard Henderson
A jump that ends a basic block or otherwise falls back to CC_OP_DYNAMIC will always have to call gen_op_set_cc_op. However, not all jumps end a basic block, so introduce a variant that does not do this. This was partially undone earlier (i386: drop cc_op argument of gen_jcc1), redo it now also to

Re: [Qemu-devel] [RFC] qemu snapshot enchancement

2013-01-23 Thread Dietmar Maurer
> > * Like Case 2, the benefit isn't clear to me. In a scenario where you > > use both QEMU and LVM snapshots there is now an extra management > > overhead of cleaning up 2 snapshots instead of just 1 when the user > > wants to delete a snapshot. I think this will be a headache. > >

[Qemu-devel] [PATCH 10/57] target-i386: clean up sahf

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Discard CC_DST and set s->cc_op immediately after computing EFLAGS. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-i386/translate.c b/target-i386/transl

[Qemu-devel] [PATCH 19/57] target-i386: no need to flush out cc_op before gen_eob

2013-01-23 Thread Richard Henderson
This makes code more similar to the other callers of gen_eob, especially loopz/loopnz/jcxz. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-i386/translate.c b/target-i386/tran

[Qemu-devel] [PATCH 34/57] target-i386: expand cmov via movcond

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 52 ++--- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 2a220c1..9752c16 100644 --- a/target-i386/translate.c +++ b/

[Qemu-devel] [PATCH 41/57] target-i386: Don't reference ENV through most of cc helpers

2013-01-23 Thread Richard Henderson
In preparation for making this a const helper. By using the proper types in the parameters to the helper functions, we get to avoid quite a lot of subsequent casting. Signed-off-by: Richard Henderson --- target-i386/cc_helper.c | 97 +++ target-i386/cc_helper_templ

[Qemu-devel] [PATCH 07/57] target-i386: move carry computation for inc/dec closer to gen_op_set_cc_op

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini This ensures the invariant that cpu_cc_op matches s->cc_op when calling the helpers. The next patches need this because gen_compute_eflags and gen_compute_eflags_c will take care of setting cpu_cc_op. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- targe

[Qemu-devel] [PATCH 17/57] target-i386: add helper functions to get other flags

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Introduce new functions to extract PF, SF, OF, ZF in addition to CF. These provide single entry points for optimizing accesses to a single flag. Reviewed-by: Blue Swirl Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 48

[Qemu-devel] [PATCH 12/57] target-i386: factor gen_op_set_cc_op/tcg_gen_discard_tl around computing flags

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Before computing flags we need to store the cc_op to memory. Move this to gen_compute_eflags_c and gen_compute_eflags rather than doing it all over the place. Alo, after computing the flags in cpu_cc_src we are in EFLAGS mode. Set s->cc_op and discard cpu_cc_dst in gen_compu

[Qemu-devel] [PATCH 09/57] target-i386: compute eflags outside rcl/rcr helper

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Always compute EFLAGS first since it is needed whenever the shift is non-zero, i.e. most of the time. This makes it possible to remove some writes of CC_OP_EFLAGS to cpu_cc_op and more importantly removes cases where s->cc_op becomes CC_OP_DYNAMIC. Also, we can remove cc_tmp

[Qemu-devel] [PATCH 28/57] target-i386: introduce CCPrepare

2013-01-23 Thread Richard Henderson
Introduce a struct that describes how to build a *cond operation that checks for a given x86 condition code. For now, just change gen_compute_eflags_* to return the new struct, generate code for the CCPrepare struct, and go on as before. [rth: Use ctz with the proper width rather than ffs.] Sign

[Qemu-devel] [PATCH 47/57] target-i386: Implement BEXTR

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 40 1 file changed, 40 insertions(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index 8e75cba..bb9cdcf 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@

[Qemu-devel] [PATCH 06/57] target-i386: drop cc_op argument of gen_jcc1

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini As in the gen_repz_scas/gen_repz_cmps case, delay setting CC_OP_DYNAMIC in gen_jcc until after code generation. All of gen_jcc1/is_fast_jcc/gen_setcc_slow_T0 now work on s->cc_op, which makes things a bit easier to follow and to patch. Signed-off-by: Paolo Bonzini Signed-of

[Qemu-devel] [PATCH 14/57] target-i386: Introduce set_cc_op

2013-01-23 Thread Richard Henderson
This will provide a good hook into which we can consolidate all of the cc variable discards. Signed-off-by: Richard Henderson --- target-i386/translate.c | 134 +--- 1 file changed, 69 insertions(+), 65 deletions(-) diff --git a/target-i386/translate.

[Qemu-devel] [PATCH 15/57] target-i386: Don't clobber s->cc_op in gen_update_cc_op

2013-01-23 Thread Richard Henderson
Use a dirty flag to know whether env->cc_op is up to date, rather than forcing s->cc_op to DYNAMIC and losing info. Signed-off-by: Richard Henderson --- target-i386/translate.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/target-i386

[Qemu-devel] [PATCH 04/57] target-i386: introduce gen_ext_tl

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Introduce a function that abstracts extracting an 8, 16, 32 or 64-bit value with or without sign, generalizing gen_extu and gen_exts. Reviewed-by: Blue Swirl Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 146 --

[Qemu-devel] [PATCH 27/57] target-i386: optimize setcc instructions

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Reconstruct the arguments for complex conditions involving CC_OP_SUBx (BE, L, LE). In the others do it via setcond and gen_setcc_slow (which is not that slow in many cases). Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 95 +++

[Qemu-devel] [PATCH 54/57] target-i386: Implement ADX extension

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/cc_helper.c | 25 +++ target-i386/cpu.c | 4 +- target-i386/cpu.h | 4 ++ target-i386/helper.c| 4 ++ target-i386/translate.c | 107 ++-- 5 files changed, 139 insertions(+),

[Qemu-devel] [PATCH 3/3] accel: change {xen, kvm, tcg, qtest}_allowed from int to bool

2013-01-23 Thread liguang
Signed-off-by: liguang --- hw/xen.h |4 ++-- include/sysemu/kvm.h |2 +- include/sysemu/qtest.h |2 +- qtest.c|2 +- vl.c | 12 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/xen.h b/hw/xen.h ind

[Qemu-devel] [PATCH 29/57] target-i386: introduce gen_prepare_cc

2013-01-23 Thread Richard Henderson
This makes the i386 front-end able to create CCPrepare structs for all condition, not just those that come from a single flag. In particular, JCC_L and JCC_LE can be optimized because gen_prepare_cc is not forced to return a result in bit 0 (unlike gen_setcc_slow). However, for now the slow jcc o

[Qemu-devel] [PATCH 02/57] test-i386: make it compile with a recent gcc

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- tests/tcg/test-i386.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c index b18fe20..b05572b 100644 --- a/tests/tcg/test-i386.c +++ b/test

[Qemu-devel] [PATCH 24/57] target-i386: change gen_setcc_slow_T0 to gen_setcc_slow

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Do not hard code the destination register. Reviewed-by: Blue Swirl Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/targe

[Qemu-devel] [PATCH 30/57] target-i386: use CCPrepare to generate conditional jumps

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini This simplifies all the jump generation code. CCPrepare allows the code to create an efficient brcond always, so there is no need to duplicate the setcc and jcc code. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 119 -

[Qemu-devel] [PATCH 22/57] target-i386: use inverted setcond when computing NS or NZ

2013-01-23 Thread Richard Henderson
Make gen_compute_eflags_z and gen_compute_eflags_s able to compute the inverted condition, and use this in gen_setcc_slow_T0. We cannot do it yet in gen_compute_eflags_c, but prepare the code for it anyway. It is not worthwhile for PF, as usual. shr+and+xor could be replaced by and+setcond. I'm

[Qemu-devel] [PATCH 26/57] target-i386: optimize setle

2013-01-23 Thread Richard Henderson
And allow gen_setcc_slow to operate on cpu_cc_src. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 2cf668b..44cdf

[Qemu-devel] [PATCH 03/57] target-i386: use OT_* consistently

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Reviewed-by: Blue Swirl Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 88 +++-- 1 file changed, 49 insertions(+), 39 deletions(-) diff --git a/target-i386/translate.c b/target-i386/t

[Qemu-devel] [PATCH 21/57] target-i386: do not call helper to compute ZF/SF

2013-01-23 Thread Richard Henderson
ZF, SF and PF can always be computed from CC_DST except in the CC_OP_EFLAGS case (and CC_OP_DYNAMIC, which just resolves to CC_OP_EFLAGS in gen_compute_eflags). Use setcond to compute ZF and SF. We could also use a table lookup to compute PF. Reviewed-by: Blue Swirl Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 20/57] target-i386: Move CC discards to set_cc_op

2013-01-23 Thread Richard Henderson
This gets us universal coverage, rather than scattering discards around at various places. As a bonus, we do not emit redundant discards e.g. between sequential logic insns. Signed-off-by: Richard Henderson --- target-i386/translate.c | 48 +++- 1 fil

[Qemu-devel] [PATCH 42/57] target-i386: Make helper_cc_compute_all const

2013-01-23 Thread Richard Henderson
Pass the data in explicitly, rather than indirectly via env. Signed-off-by: Richard Henderson --- target-i386/cc_helper.c | 16 +--- target-i386/helper.h| 2 +- target-i386/translate.c | 32 ++-- 3 files changed, 36 insertions(+), 14 deletions(-) dif

[Qemu-devel] [PATCH 25/57] target-i386: optimize setbe

2013-01-23 Thread Richard Henderson
This is looking at EFLAGS, but it can do so more efficiently with setcond. Reviewed-by: Blue Swirl Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target-i386/translate.c b/targ

[Qemu-devel] [PATCH 52/57] target-i386: Implement SHLX, SARX, SHRX

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index 5e1ee03..1519566 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -4171,6

[Qemu-devel] [PATCH 32/57] target-i386: cleanup temporary macros for CCPrepare

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 86 ++--- 1 file changed, 39 insertions(+), 47 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index df2cb3d.

[Qemu-devel] [PATCH 45/57] target-i386: Implement MOVBE

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/cpu.c | 16 +-- target-i386/translate.c | 122 ++-- 2 files changed, 110 insertions(+), 28 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 376d4c8..776b670 100644 --- a/t

[Qemu-devel] [PATCH 50/57] target-i386: Implement MULX

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/helper.h | 1 + target-i386/int_helper.c | 7 +++ target-i386/translate.c | 36 3 files changed, 44 insertions(+) diff --git a/target-i386/helper.h b/target-i386/helper.h index aa313bd..b1bae6c 10064

[Qemu-devel] [PATCH 38/57] target-i386: Update cc_op before TCG branches

2013-01-23 Thread Richard Henderson
Placing the CC_OP_DYNAMIC at the join is less effective than before the branch, as the branch will have forced global registers to their home locations. This way we have a chance to discard CC_SRC2 before it gets stored. Signed-off-by: Richard Henderson --- target-i386/translate.c | 8

[Qemu-devel] [PATCH 51/57] target-i386: Implement PDEP, PEXT

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/helper.h | 3 +++ target-i386/int_helper.c | 32 target-i386/translate.c | 36 3 files changed, 71 insertions(+) diff --git a/target-i386/helper.h b/target-i386/helper.h i

[Qemu-devel] [PATCH 46/57] target-i386: Implement ANDN

2013-01-23 Thread Richard Henderson
As this is the first of the BMI insns to be implemented, this carries quite a bit more baggage than normal. Signed-off-by: Richard Henderson --- target-i386/cpu.c | 10 +- target-i386/translate.c | 19 +-- 2 files changed, 22 insertions(+), 7 deletions(-) diff --gi

[Qemu-devel] [PATCH 48/57] target-i386: Implement BLSR, BLSMSK, BLSI

2013-01-23 Thread Richard Henderson
Do all of group 17 at one time for ease. Signed-off-by: Richard Henderson --- target-i386/cc_helper.c | 9 + target-i386/cc_helper_template.h | 14 ++ target-i386/cpu.h| 5 + target-i386/helper.c | 7 ++- target-i386/translate.c

[Qemu-devel] [PATCH 36/57] target-i386: use gen_op for cmps/scas

2013-01-23 Thread Richard Henderson
Replace low-level ops with a higher-level "cmp %al, (A0)" in the case of scas, and "cmp T0, (A0)" in the case of cmps. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --gi

[Qemu-devel] [PATCH 39/57] target-i386: optimize flags checking after sub using CC_SRC2

2013-01-23 Thread Richard Henderson
After a comparison or subtraction, the original value of the LHS will currently be reconstructed using an addition. However, in most cases it is already available: store it in a temp-local variable and save 1 or 2 TCG ops (2 if the result of the addition needs to be extended). The temp-local can

[Qemu-devel] [PATCH 49/57] target-i386: Implement BZHI

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index d68537c..46e7b24 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -4072,6 +407

[Qemu-devel] [PATCH 35/57] target-i386: kill cpu_T3

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini It is almost unused, and it is simpler to pass a TCG value directly to gen_shiftd_rm_T1_T3. This value is then written to t2 without going through a temporary register. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 19

[Qemu-devel] [PATCH 40/57] target-i386: Use CC_SRC2 for ADC and SBB

2013-01-23 Thread Richard Henderson
Now that we've got two slots in ENV, store two of the three inputs. This lets us do less work when carry-out is not needed, and avoids the unpredictable CC_OP after translating these insns. Signed-off-by: Richard Henderson --- target-i386/cc_helper_template.h | 44 +-

[Qemu-devel] [PATCH 31/57] target-i386: inline gen_prepare_cc_slow

2013-01-23 Thread Richard Henderson
Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 91 + 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index be8d3a3..df2cb3d 100644 --- a/

[Qemu-devel] [PATCH 57/57] target-i386: Implement tzcnt and fix lzcnt

2013-01-23 Thread Richard Henderson
We weren't computing flags for lzcnt at all. Signed-off-by: Richard Henderson --- target-i386/helper.h | 5 ++--- target-i386/int_helper.c | 11 +++ target-i386/translate.c | 50 3 files changed, 38 insertions(+), 28 deletions(-) di

[Qemu-devel] [PATCH 55/57] target-i386: Use clz/ctz for bsf/bsr helpers

2013-01-23 Thread Richard Henderson
And mark the helpers as NO_RWG_SE. Signed-off-by: Richard Henderson --- target-i386/helper.h | 6 +++--- target-i386/int_helper.c | 45 +++-- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/target-i386/helper.h b/target-i386/helper.h

[Qemu-devel] [PATCH 43/57] target-i386: Tidy prefix parsing

2013-01-23 Thread Richard Henderson
Avoid duplicating switch statement between 32 and 64-bit modes. Signed-off-by: Richard Henderson --- target-i386/translate.c | 134 +++- 1 file changed, 52 insertions(+), 82 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c i

[Qemu-devel] [PATCH 23/57] target-i386: convert gen_compute_eflags_c to TCG

2013-01-23 Thread Richard Henderson
Do the switch at translation time, converting the helper templates to TCG opcodes. In some cases CF can be computed with a single setcond, though others it may require a little more work. In the CC_OP_DYNAMIC case, compute the whole EFLAGS, same as for ZF/SF/PF. Reviewed-by: Blue Swirl Signed-o

[Qemu-devel] [PATCH 53/57] target-i386: Implement RORX

2013-01-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 32 1 file changed, 32 insertions(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index 1519566..ec8234d 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -4429,6

[Qemu-devel] [PATCH 44/57] target-i386: Decode the VEX prefixes

2013-01-23 Thread Richard Henderson
No actual required uses of these encodings yet. Signed-off-by: Richard Henderson --- target-i386/translate.c | 68 ++--- 1 file changed, 64 insertions(+), 4 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 91d3957..a9c

[Qemu-devel] [PATCH 11/57] target-i386: use gen_jcc1 to compile loopz

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 55eaba2..124fe52 100644 --- a/target-i386/translate.c

[Qemu-devel] [PATCH 16/57] target-i386: Use gen_update_cc_op everywhere

2013-01-23 Thread Richard Henderson
All of the conditional calls to gen_op_set_cc_op go away, and gen_op_set_cc_op itself gets inlined into its only remaining caller. Signed-off-by: Richard Henderson --- target-i386/translate.c | 176 +++- 1 file changed, 56 insertions(+), 120 deletions(

[Qemu-devel] [PATCH 56/57] target-i386: Simplify bsf/bsr flags computation

2013-01-23 Thread Richard Henderson
There's no need for a branch or for a local temporary. Signed-off-by: Richard Henderson --- target-i386/translate.c | 60 + 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index fdb0

[Qemu-devel] [PATCH 18/57] target-i386: do not compute eflags multiple times consecutively

2013-01-23 Thread Richard Henderson
After calling gen_compute_eflags, leave the computed value in cc_reg_src and set cc_op to CC_OP_EFLAGS. The next few patches will remove anyway most calls to gen_compute_eflags. As a result of this change it is more natural to remove the register argument from gen_compute_eflags and change all th

[Qemu-devel] [PATCH 05/57] target-i386: factor setting of s->cc_op handling for string functions

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Set it to the appropriate CC_OP_SUBx constant in gen_scas/gen_cmps. In the repz case it can be overridden to CC_OP_DYNAMIC after generating the code. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target-i386/translate.c | 9 + 1 file changed, 5

[Qemu-devel] [PATCH 08/57] target-i386: move eflags computation closer to gen_op_set_cc_op

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini This ensures the invariant that cpu_cc_op matches s->cc_op when calling the helpers. The next patches need this because gen_compute_eflags and gen_compute_eflags_c will take care of setting cpu_cc_op. Always compute EFLAGS first since it is needed whenever the shift is non-z

[Qemu-devel] [PATCH 00/57] target-i386 eflags cleanup and bmi/adx extensions

2013-01-23 Thread Richard Henderson
This is a re-working of Paolo's eflags cleanup from October, which I consider a pre-requisite to implementing the ADX extension. I've rearranged most of the patches in trivial ways, and some quite significantly. I've tested the result by running the FC17 installer in both i386 and x86_64 mode, an

[Qemu-devel] [PATCH 01/57] test-i386: QEMU_PACKED is not defined here

2013-01-23 Thread Richard Henderson
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- tests/tcg/test-i386.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c index 6dc730d..b18fe20 100644 --- a/tests/tcg/test-i386.c +++ b/te

[Qemu-devel] [PATCH 1/6] target-ppc: Give a meaningful error if too many threads are specified

2013-01-23 Thread David Gibson
From: Mike Qiu Currently the target-ppc tcg code only supports a single thread. You can specify more, but they're treated identically to multiple cores. On KVM we obviously can't support more threads than the hardware; if more are specified it will cause strange and cryptic errors. This patch

[Qemu-devel] buildbot failure in qemu on monitor_x86_64_debian_6_0

2013-01-23 Thread qemu
The Buildbot has detected a new failure on builder monitor_x86_64_debian_6_0 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/monitor_x86_64_debian_6_0/builds/522 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: yuzuki

[Qemu-devel] buildbot failure in qemu on monitor_i386_debian_6_0

2013-01-23 Thread qemu
The Buildbot has detected a new failure on builder monitor_i386_debian_6_0 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/monitor_i386_debian_6_0/builds/522 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: yuzuki Buil

[Qemu-devel] [PATCH V5 03/13] block: add bdrv_can_read_snapshot() function

2013-01-23 Thread Wenchao Xia
Compared to bdrv_can_snapshot(), this function return whether bs* is ready to read snapshot info from instead of write. If yes, caller can then query snapshot information, but taking snapshot is not always possible for that *bs may be read only. Signed-off-by: Wenchao Xia --- block.c

[Qemu-devel] [PATCH 5/6] target-ppc: Synchronize VPA state with KVM

2013-01-23 Thread David Gibson
For PAPR guests, KVM tracks the various areas registered with the H_REGISTER_VPA hypercall. For full emulation, of course, these are tracked within qemu. At present these values are not synchronized. This is a problem for reset (qemu's reset of the VPA address is not pushed to KVM) and will also

[Qemu-devel] [PATCH 3/6] target-ppc: Synchronize more SPRs to KVM using ONE_REG interface

2013-01-23 Thread David Gibson
There are currently a batch of occasionally used SPRs whose state we do not synchronize with KVM. This might be a problem for debugging, and will definitely be a problem for savevm / migration. KVM now supports accessing these registers via the KVM_{GET,SET}_ONE_REG interface, so this patch wires

[Qemu-devel] [PATCH 6/6] pseries: Adjust default VIO address allocations to play better with libvirt

2013-01-23 Thread David Gibson
Currently, if VIO devices for pseries don't have addresses explicitly allocated, they get automatically numbered from 0x1000. This is in the same general range that libvirt will typically assign VIO device addresses. That means that if there is a device libvirt doesn't know about, and it gets an

[Qemu-devel] [PATCH 4/6] target-ppc: Synchronize FPU state with KVM

2013-01-23 Thread David Gibson
Currently qemu does not get and put the state of the floating point and vector registers to KVM. This is obviously a problem for savevm, as well as possibly being problematic for debugging of FP-using guests. This patch fixes this by using new extensions to the ONE_REG interface to synchronize th

[Qemu-devel] [PATCH V5 04/13] block: add snapshot info query function bdrv_query_snapshot_infolist()

2013-01-23 Thread Wenchao Xia
This patch add function bdrv_query_snapshot_infolist(), which will return snapshot info of an image in qmp object format. The implementation code are mostly copied from qemu-img.c with modification to fit more for qmp based block layer API. To help filter out snapshot info not needed, a call ba

[Qemu-devel] [PATCH V5 02/13] block: add bdrv_get_filename() function

2013-01-23 Thread Wenchao Xia
This function will simply return the uri or filename used to open the image. Reviewed-by: Eric Blake Signed-off-by: Wenchao Xia --- block.c |5 + include/block/block.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 6fa7c9

[Qemu-devel] [PATCH V5 10/13] qmp: add interface query-snapshots

2013-01-23 Thread Wenchao Xia
This interface now return valid internal snapshots for whole vm or a single block device. Note that filter use bdrv_can_read_snapshot() instead of bdrv_can_snapshot(), which should be the correct behavior in information retrieving funtion. Signed-off-by: Wenchao Xia --- block.c |

[Qemu-devel] [PATCH 2/6] pseries: Improve handling of multiple PCI host bridges

2013-01-23 Thread David Gibson
Multiple - even many - PCI host bridges (i.e. PCI domains) are very common on real PAPR compliant hardware. For reasons related to the PAPR specified IOMMU interfaces, PCI device assignment with VFIO will generally require at least two (virtual) PHBs and possibly more depending on which devices ar

[Qemu-devel] [PATCH V5 12/13] hmp: switch snapshot info function to qmp based one

2013-01-23 Thread Wenchao Xia
This patch using new added function in last commit which retrieve info from qmp for snapshot info. Signed-off-by: Wenchao Xia --- monitor.c |2 +- savevm.c | 64 - 2 files changed, 1 insertions(+), 65 deletions(-) diff --git a

[Qemu-devel] [0/6] Revised outstanding pseries patches

2013-01-23 Thread David Gibson
Hello again, Alex This series has the brown paper bag mistake in the ONE_REG code corrected and also adds a trivial convenience patch which makes conflicts with libvirt less likely. Please apply.

Re: [Qemu-devel] [RFC] qemu snapshot enchancement

2013-01-23 Thread Wenchao Xia
I like the use cases section. I think it would be best to start there and fill in the details all the way down to the QMP API calls that need to be made. At that point we can be sure the use cases are covered and the API proposal will be easy to put together from the wiki page. Comments about

[Qemu-devel] [PATCH V5 08/13] qmp: add interface query-images.

2013-01-23 Thread Wenchao Xia
This mirror function will return all image info including snapshots. Now Qemu have both query-images and query-block interfaces. Signed-off-by: Wenchao Xia --- block.c | 32 ++ qapi-schema.json | 27 +++ qmp-commands.hx | 76 +

Re: [Qemu-devel] memcpy speed (Re: [PATCH v2] netmap backend (revised))

2013-01-23 Thread Luigi Rizzo
On Wed, Jan 23, 2013 at 8:03 AM, Luigi Rizzo wrote: > > I'm even doubtful that it's always a win on FreeBSD. You have a > > threshold to fall back to bcopy() and who knows what the "best" value > > for various CPUs is. > > indeed. > With the attached program (which however might be affected by t

[Qemu-devel] [PATCH V5 13/13] hmp: show snapshots on single block device

2013-01-23 Thread Wenchao Xia
This patch added the support of showing internal snapshots on a single block device in hmp layer, by simply change parameter in calling of qmp funtion. Signed-off-by: Wenchao Xia --- hmp.c |7 ++- monitor.c |6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH V5 11/13] hmp: add function hmp_info_snapshots()

2013-01-23 Thread Wenchao Xia
This function will simply call qmp interface qmp_query_snapshots() added in last commit and then dump information in monitor console. Now snapshot info retrieving code in qemu and qemu-img are merged by calling same block layer function, and then they just translate the qmp object to strings in

[Qemu-devel] [PATCH V5 09/13] block: export function bdrv_find_snapshot()

2013-01-23 Thread Wenchao Xia
This patch move it from savevm.c to block.c and export it. To make it clear about id and name in searching, the API was changed a bit to distinguish them. Caller can choose to search by id or name now. Signed-off-by: Wenchao Xia --- block.c | 51

[Qemu-devel] [PATCH V5 06/13] qemu-img: switch image retrieving function

2013-01-23 Thread Wenchao Xia
Now qemu-img call block layer function to get image info and check if error happens. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- qemu-img.c | 90 1 files changed, 6 insertions(+), 84 deletions(-) diff --git a/qemu-img.

[Qemu-devel] [PATCH V5 07/13] block: rename bdrv_query_info to bdrv_query_block_info

2013-01-23 Thread Wenchao Xia
Now that we have bdrv_query_image_info, rename this function to make it more obvious what it is doing. Reviewed-by: Eric Blake Signed-off-by: Wenchao Xia --- block.c |4 ++-- include/block/block.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bloc

[Qemu-devel] [PATCH V5 05/13] block: add image info query function bdrv_query_image_info()

2013-01-23 Thread Wenchao Xia
This patch add function bdrv_query_image_info(), which will return image info in qmp object format. The implementation code are mostly copied from qemu-img.c, but use block layer function to get snapshot info. A check with bdrv_can_read_snapshot(), was done before collecting snapshot info. Sig

[Qemu-devel] [PATCH V5 01/13] qemu-img: remove unused parameter in collect_image_info()

2013-01-23 Thread Wenchao Xia
Parameter *fmt was not used, so remove it. Reviewed-by: Eric Blake Signed-off-by: Wenchao Xia --- qemu-img.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 85d3740..9dab48f 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1186,8 +1186,7

[Qemu-devel] [PATCH V5 00/13] add qmp/hmp interfaces for internal snapshot info

2013-01-23 Thread Wenchao Xia
This serial of patches does two things: merge some info code in qemu-img, and add following interfaces: 1) qmp: query-images 2) qmp: query-snapshots 3) hmp: show internal snapshot info on a single block device These patches follows the rule that use qmp to retieve information, hmp layer just do

[Qemu-devel] [PATCH v10 2/4] use uimage_reset to reload uImage

2013-01-23 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 64 +++ 1 files changed, 51 insertions(+), 13 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 4fa9965..288a1ba 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -458,15 +458,15 @@ static s

[Qemu-devel] [PATCH v10 3/4] use elf_reset to reload elf image

2013-01-23 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/elf_ops.h | 45 - hw/loader.c | 11 +++ hw/loader.h |9 + 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/hw/elf_ops.h b/hw/elf_ops.h index 531a425..25ee02a 100644 --- a/hw/elf_o

[Qemu-devel] [PATCH v10 1/4] use image_file_reset to reload initrd

2013-01-23 Thread Olivia Yin
Signed-off-by: Olivia Yin --- hw/loader.c | 25 + hw/loader.h |6 ++ 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index ba01ca6..4fa9965 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -86,6 +86,24 @@ int load_image(cons

[Qemu-devel] [PATCH v10 0/4] reload images from host rootfs on reset to save footprint

2013-01-23 Thread Olivia Yin
The current model of loader copy "rom blobs" and kept in memory until a reset occurs and waste host memory. This serial of patches set uimage/initrd/vmlinux as reloadable images and use private reset handlers to load these images from hard disk on reset, which could make loader framework more dy

Re: [Qemu-devel] [PATCH for-1.4] target-microblaze: Drop unused cpu_mb_close() prototype

2013-01-23 Thread Peter Crosthwaite
On Sat, Jan 19, 2013 at 6:26 PM, Andreas Färber wrote: > Such a function never existed. > > Signed-off-by: Andreas Färber Acked-by: Peter Crosthwaite > --- > Peter, can you ack this? Or feel free to commit, Edgar. > As for cris, I am going to base v2 of my CPU realizefn series on this > cle

[Qemu-devel] [PATCH for-1.4 qom-cpu 9/9 v6] pc: Set fw_cfg data based on APIC ID calculation

2013-01-23 Thread Eduardo Habkost
This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), so the NUMA table can be based on the APIC IDs, instead of CPU index (SeaBIOS knows nothing about CPU indexes, just APIC IDs). Signed-off-by: Eduardo Habkost --- Changes v2: - Get PC object as argument - Add more detailed co

[Qemu-devel] 答复: [RFC qom-cpu v2 27/28] target-unicore32: Move TCG initialization to UniCore32CPU initfn

2013-01-23 Thread Guan Xuetao
> -邮件原件- > 发件人: Andreas Färber [mailto:afaer...@suse.de] > 发送时间: Sunday, January 20, 2013 15:23 > 收件人: qemu-devel@nongnu.org > 抄送: Andreas Färber; Guan Xuetao (maintainer:UniCore32) > 主题: [RFC qom-cpu v2 27/28] target-unicore32: Move TCG initialization to > UniCore32CPU initfn > > Normal

  1   2   3   >