Re: [Qemu-devel] [PATCH for-2.9] qmp: Report QOM type name on query-cpu-definitions

2016-11-16 Thread Eduardo Habkost
On Wed, Nov 16, 2016 at 12:47:14PM -0600, Eric Blake wrote: > On 11/16/2016 12:21 PM, Eduardo Habkost wrote: > > The new typename attribute on query-cpu-definitions will be used > > to help management software use device-list-properties to check > > which properties can be set using -cpu or -global

[Qemu-devel] [PATCH 02/25] target-alpha: Use the ctz and clz opcodes

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/helper.h | 2 -- target-alpha/int_helper.c | 10 -- target-alpha/translate.c | 4 ++-- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/target-alpha/helper.h b/target-alpha/helper.h index 004221d..eed3906 100644 --- a

[Qemu-devel] [PATCH 03/25] target-cris: Use clz opcode

2016-11-16 Thread Richard Henderson
Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target-cris/helper.h| 1 - target-cris/op_helper.c | 5 - target-cris/translate.c | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/target-cris/helper.h b/target-cris/helper.h index ff35956..20d21c4 100644 ---

[Qemu-devel] [PATCH 07/25] target-ppc: Use clz and ctz opcodes

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Cc: David Gibson Signed-off-by: Richard Henderson --- target-ppc/helper.h | 4 target-ppc/int_helper.c | 20 target-ppc/translate.c | 20 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/target-ppc/helpe

[Qemu-devel] [PATCH 00/25] tcg: Handle clz, ctz, and clrsb generically

2016-11-16 Thread Richard Henderson
As you can see from the diffstat below, almost every target was defining its own helpers for these common bit manipulation ops. In the case of ctz and clz, they are often central to string search routines such as strlen, so it does benefit us to make them fast. So I do go ahead and add those as tc

[Qemu-devel] [PATCH 05/25] target-mips: Use clz opcode

2016-11-16 Thread Richard Henderson
Cc: Yongbok Kim Signed-off-by: Richard Henderson --- target-mips/helper.h| 7 --- target-mips/op_helper.c | 22 -- target-mips/translate.c | 23 --- 3 files changed, 16 insertions(+), 36 deletions(-) diff --git a/target-mips/helper.h b/target-mip

[Qemu-devel] [PATCH 04/25] target-microblaze: Use clz opcode

2016-11-16 Thread Richard Henderson
Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target-microblaze/helper.h| 1 - target-microblaze/op_helper.c | 5 - target-microblaze/translate.c | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/target-microblaze/helper.h b/target-microblaze/helper.h ind

[Qemu-devel] [PATCH 10/25] target-tricore: Use clz opcode

2016-11-16 Thread Richard Henderson
Cc: Bastian Koppelmann Signed-off-by: Richard Henderson --- target-tricore/helper.h| 2 -- target-tricore/op_helper.c | 10 -- target-tricore/translate.c | 5 +++-- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/target-tricore/helper.h b/target-tricore/helper.h ind

[Qemu-devel] [PATCH 01/25] tcg: Add clz and ctz opcodes

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg-runtime.c| 20 +++ tcg/README | 8 + tcg/aarch64/tcg-target.h | 4 +++ tcg/arm/tcg-target.h | 2 ++ tcg/i386/tcg-target.h| 4 +++ tcg/ia64/tcg-target.h| 4 +++ tcg/mips/tcg-target.h| 2 ++ tcg/opt

[Qemu-devel] [PATCH 09/25] target-tilegx: Use clz and ctz opcodes

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-tilegx/helper.c| 10 -- target-tilegx/helper.h| 2 -- target-tilegx/translate.c | 4 ++-- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/target-tilegx/helper.c b/target-tilegx/helper.c index b4fba9c..b6f5e29 100644 ---

[Qemu-devel] [PATCH 08/25] target-s390x: Use clz opcode

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-s390x/helper.h | 1 - target-s390x/int_helper.c | 6 -- target-s390x/translate.c | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/target-s390x/helper.h b/target-s390x/helper.h index 207a6e7..9102071 100644 --- a/target-s390

[Qemu-devel] [PATCH 17/25] tcg/ppc: Handle ctz and clz opcodes

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 8 +++ tcg/ppc/tcg-target.inc.c | 57 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h index 698

[Qemu-devel] [PATCH 06/25] target-openrisc: Use clz and ctz opcodes

2016-11-16 Thread Richard Henderson
Cc: Jia Liu Signed-off-by: Richard Henderson --- target-openrisc/helper.h | 2 -- target-openrisc/int_helper.c | 19 --- target-openrisc/translate.c | 6 -- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/target-openrisc/helper.h b/target-openrisc/helpe

[Qemu-devel] [PATCH 13/25] target-arm: Use clz opcode

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- target-arm/helper-a64.c| 10 -- target-arm/helper-a64.h| 2 -- target-arm/helper.c| 5 - target-arm/helper.h| 1 - target-arm/translate-a64.c | 8 target-arm/translate.c | 6 +++---

[Qemu-devel] [PATCH 11/25] target-unicore32: Use clz opcode

2016-11-16 Thread Richard Henderson
Cc: Guan Xuetao Signed-off-by: Richard Henderson --- target-unicore32/helper.c| 10 -- target-unicore32/helper.h| 3 --- target-unicore32/translate.c | 6 +++--- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/target-unicore32/helper.c b/target-unicore32/helper.

[Qemu-devel] [PATCH 19/25] tcg/arm: Handle ctz and clz opcodes

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 4 ++-- tcg/arm/tcg-target.inc.c | 27 +++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index 02cc242..4cb94dc 100644 ---

[Qemu-devel] [PATCH 21/25] tcg/s390: Handle clz opcode

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.h | 2 +- tcg/s390/tcg-target.inc.c | 36 +++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h index 3ac2dc9..22500ba 100644 --- a/tcg/s390/t

[Qemu-devel] [PATCH 12/25] target-xtensa: Use clz opcode

2016-11-16 Thread Richard Henderson
Cc: Max Filippov Signed-off-by: Richard Henderson --- target-xtensa/helper.h| 2 -- target-xtensa/op_helper.c | 13 - target-xtensa/translate.c | 13 +++-- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/target-xtensa/helper.h b/target-xtensa/helper.h in

[Qemu-devel] [PATCH 20/25] tcg/mips: Handle clz opcode

2016-11-16 Thread Richard Henderson
Cc: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.h | 4 ++-- tcg/mips/tcg-target.inc.c | 34 ++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h index f133684..0526018 100

[Qemu-devel] [PATCH 14/25] target-i386: Use clz and ctz opcodes

2016-11-16 Thread Richard Henderson
Cc: Eduardo Habkost Signed-off-by: Richard Henderson --- target-i386/helper.h | 2 -- target-i386/int_helper.c | 11 --- target-i386/translate.c | 31 ++- 3 files changed, 14 insertions(+), 30 deletions(-) diff --git a/target-i386/helper.h b/target-i386

[Qemu-devel] [PATCH 15/25] disas/i386.c: Handle tzcnt

2016-11-16 Thread Richard Henderson
Cc: Eduardo Habkost Signed-off-by: Richard Henderson --- disas/i386.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/disas/i386.c b/disas/i386.c index 57145d0..07f871f 100644 --- a/disas/i386.c +++ b/disas/i386.c @@ -682,6 +682,7 @@ fetch_data(struct disassembl

[Qemu-devel] [PATCH 25/25] target-xtensa: Use clrsb helper

2016-11-16 Thread Richard Henderson
Cc: Max Filippov Signed-off-by: Richard Henderson --- target-xtensa/translate.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 5c719a4..5a93705 100644 --- a/target-xtensa/translate.c +++ b/target-xtensa/

[Qemu-devel] [PATCH 16/25] tcg/i386: Handle ctz and clz opcodes

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 8 ++--- tcg/i386/tcg-target.inc.c | 83 ++- 2 files changed, 78 insertions(+), 13 deletions(-) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index f2d9955..8fff287 100644 -

[Qemu-devel] [PATCH 18/25] tcg/aarch64: Handle ctz and clz opcodes

2016-11-16 Thread Richard Henderson
Cc: Claudio Fontana Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 8 tcg/aarch64/tcg-target.inc.c | 47 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h

[Qemu-devel] [PATCH 23/25] target-arm: Use clrsb helper

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- target-arm/helper-a64.c| 10 -- target-arm/helper-a64.h| 2 -- target-arm/translate-a64.c | 8 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c

[Qemu-devel] [RFC 11/14] tcg: Introduce temp_info for the optimize pass

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 215 + 1 file changed, 123 insertions(+), 92 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index f41ed2c..0e5d9d8 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -43,25 +

[Qemu-devel] [RFC 01/14] tcg: Use NULL for TCGV_UNUSED_*

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 6 +- tcg/tcg.h | 12 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index aabf94f..057c1ea 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -329,7 +329,11 @@ void tcg_context_init(TCGContext *s)

[Qemu-devel] [PATCH 22/25] tcg: Add helpers for clrsb

2016-11-16 Thread Richard Henderson
The number of actual invocations does not warrent an opcode, and the backends generating it. But at least we can eliminate redundant helpers. Signed-off-by: Richard Henderson --- tcg-runtime.c | 10 ++ tcg/tcg-op.c | 28 tcg/tcg-op.h | 4

[Qemu-devel] [RFC 06/14] tcg: More use of arg_temp

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 840c8b5..4bcdb1e 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -523,7 +523,7 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type

[Qemu-devel] [RFC 00/14] tcg: Use TCGTemp pointers instead of indices

2016-11-16 Thread Richard Henderson
The comment clarification that Peter asked for in this last cycle made me wonder if we couldn't make better use of the data that we're already storing. We have pointer sized integers that we're passing around. Why should we not simply pass the pointers themselves, to save on looking them up later

[Qemu-devel] [RFC 12/14] tcg: Store pointers to temporaries directly in TCGArg

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 103 +++-- tcg/tcg.c | 28 ++-- tcg/tcg.h | 20 +-- 3 files changed, 84 insertions(+), 67 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 0e5d

[Qemu-devel] [PATCH 24/25] target-tricore: Use clrsb helper

2016-11-16 Thread Richard Henderson
Cc: Bastian Koppelmann Signed-off-by: Richard Henderson --- target-tricore/helper.h| 1 - target-tricore/op_helper.c | 5 - target-tricore/translate.c | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/target-tricore/helper.h b/target-tricore/helper.h index 2cf04e1..d2

[Qemu-devel] [RFC 10/14] tcg: Map TCG_CALL_DUMMY_ARG to NULL

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 36 +--- tcg/tcg.h | 2 +- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index e8b3fbb..c62f161 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1415,7 +1415,6 @@ static void liven

[Qemu-devel] [RFC 04/14] tcg: Add temp_global bit to TCGTemp

2016-11-16 Thread Richard Henderson
This avoids needing to test the index of a temp against nb_globals. Signed-off-by: Richard Henderson --- tcg/tcg.c | 12 +--- tcg/tcg.h | 12 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 8ae41a6..b186b38 100644 --- a/tcg/tcg.c +

[Qemu-devel] [patch v3 02/18] tcg: Minor adjustments to deposit expanders

2016-11-16 Thread Richard Henderson
Assert that len is not 0. Since we have asserted that ofs + len <= N, a later check for len == N implies that ofs == 0. Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index c185b9c..b17f03f

Re: [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes

2016-11-16 Thread Christian Borntraeger
On 11/15/2016 02:46 PM, Paolo Bonzini wrote: > Patch 1 fixes vhost, patches 2-3 fix Windows hibernation. > > Paolo > > Paolo Bonzini (3): > virtio: introduce grab/release_ioeventfd to fix vhost > virtio: access ISR atomically > virtio: set ISR on dataplane notifications > > hw/block/datap

[Qemu-devel] [RFC 05/14] tcg: Avoid loops against variable bounds

2016-11-16 Thread Richard Henderson
Copy s->nb_globals or s->nb_temps to a local variable for the purposes of iteration. This should allow the compiler to use low-overhead looping constructs on some hosts. Signed-off-by: Richard Henderson --- tcg/tcg.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletio

[Qemu-devel] [patch v3 03/18] tcg: Add deposit_z expander

2016-11-16 Thread Richard Henderson
While we don't require a new opcode, it is handy to have an expander that knows the first source is zero. Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 143 +++ tcg/tcg-op.h | 6 +++ 2 files changed, 149 insertions(+) diff --git a/

[Qemu-devel] [patch v3 01/18] tcg: Add field extraction primitives

2016-11-16 Thread Richard Henderson
Adds tcg_gen_extract_* and tcg_gen_sextract_* for extraction of fixed position bitfields, much like we already have for deposit. Signed-off-by: Richard Henderson --- tcg/README | 20 ++- tcg/aarch64/tcg-target.h | 4 + tcg/arm/tcg-target.h | 2 + tcg/i386/tcg-target.h|

Re: [Qemu-devel] [PATCH v6 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-11-16 Thread Aviv B.D.
On Wed, Nov 16, 2016 at 5:34 PM, Alex Williamson wrote: > On Wed, 16 Nov 2016 15:54:56 +0200 > "Michael S. Tsirkin" wrote: > > > On Thu, Nov 10, 2016 at 12:44:47PM -0700, Alex Williamson wrote: > > > On Thu, 10 Nov 2016 21:20:36 +0200 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Thu, Nov

[Qemu-devel] [RFC 07/14] tcg: Change temp_allocate_frame arg to TCGTemp

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 4bcdb1e..c9e0da5 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1865,10 +1865,8 @@ static void check_regs(TCGContext *s) } #endif -static void tem

[Qemu-devel] [patch v3 08/18] tcg/mips: Implement field extraction opcodes

2016-11-16 Thread Richard Henderson
Cc: Aurelien Jarno Cc: Yongbok Kim Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.h | 2 +- tcg/mips/tcg-target.inc.c | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h index 1bcea3b..f1c3137 100644 --- a/tcg/mips/

[Qemu-devel] [patch v3 07/18] tcg/i386: Implement field extraction opcodes

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 12 +--- tcg/i386/tcg-target.inc.c | 38 ++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index 7625188..dc19c47 100644 ---

[Qemu-devel] [RFC 08/14] tcg: Remove unused TCG_CALL_DUMMY_TCGV

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index dbd6308..acc0cfb 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -483,7 +483,6 @@ typedef TCGv_ptr TCGv_env; #define TCG_CALL_NO_WG_SE (TCG_CALL_NO_WG | TCG_CALL_NO_SE)

[Qemu-devel] [RFC 02/14] tcg: Define actual structures for TCGv_*

2016-11-16 Thread Richard Henderson
Pointers that devolve to TCGTemp may tidy things up eventually. At present, we still store indicies in TCGArg. Signed-off-by: Richard Henderson --- tcg/tcg.c | 84 +++ tcg/tcg.h | 230 +++--- 2 files changed, 138 insert

[Qemu-devel] [patch v3 10/18] tcg/s390: Expose host facilities to tcg-target.h

2016-11-16 Thread Richard Henderson
This lets us expose facilities to TCG_TARGET_HAS_* defines directly, rather than hiding behind function calls. Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.h | 126 -- tcg/s390/tcg-target.inc.c | 74 +++ 2 files

[Qemu-devel] [patch v3 16/18] target-mips: Use the new extract op

2016-11-16 Thread Richard Henderson
Use extract for EXT and DEXT. Reviewed-by: Yongbok Kim Signed-off-by: Richard Henderson --- target-mips/translate.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index d8dde7a..cf79aa4 100644 --- a/target-mips/

[Qemu-devel] [RFC 03/14] tcg: Use per-temp state data in liveness

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 219 +- tcg/tcg.h | 16 + 2 files changed, 132 insertions(+), 103 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 7118bce..8ae41a6 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -13

[Qemu-devel] [RFC 13/14] tcg: Use temp number 0 again

2016-11-16 Thread Richard Henderson
Now that we're storing pointers, we don't have to reserve index 0 to avoid the apperance of a NULL pointer. Signed-off-by: Richard Henderson --- tcg/tcg.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index a2a0b90..d4409ad 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @

[Qemu-devel] [patch v3 11/18] tcg/s390: Implement field extraction opcodes

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.h | 4 ++-- tcg/s390/tcg-target.inc.c | 11 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tcg/s390/tcg-target.h b/tcg/s390/tcg-target.h index d650a72..e9ac12e 100644 --- a/tcg/s390/tcg-target.h +++ b/tcg/s

[Qemu-devel] [patch v3 17/18] target-ppc: Use the new deposit and extract ops

2016-11-16 Thread Richard Henderson
Use the new primitives for RDWINM and RLDICL. Reviewed-by: David Gibson Signed-off-by: Richard Henderson --- target-ppc/translate.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 59e

[Qemu-devel] [RFC 14/14] tcg/optimize: Fold movcond 0/1 into setcond

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index 06a8c13..28ce624 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1143,6 +1143,21 @@ void tcg_optimize(TCGContext *s)

[Qemu-devel] [RFC 09/14] tcg: More use of arg_index

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index c9e0da5..e8b3fbb 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1024,13 +1024,14 @@ void tcg_dump_ops(TCGContext *s) arg

[Qemu-devel] [patch v3 13/18] target-alpha: Use deposit and extract ops

2016-11-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/translate.c | 67 ++-- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 114927b..5ac2277 100644 --- a/target-alpha/translate.c +++

[Qemu-devel] [patch v3 18/18] target-s390x: Use the new deposit and extract ops

2016-11-16 Thread Richard Henderson
Use the new primitives for RISBG. Signed-off-by: Richard Henderson --- target-s390x/translate.c | 34 ++ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 02bc705..6cebb7e 100644 --- a/target-

Re: [Qemu-devel] [PATCH v6 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 09:50:46PM +0200, Aviv B.D. wrote: > > > On Wed, Nov 16, 2016 at 5:34 PM, Alex Williamson > wrote: > > On Wed, 16 Nov 2016 15:54:56 +0200 > "Michael S. Tsirkin" wrote: > > > On Thu, Nov 10, 2016 at 12:44:47PM -0700, Alex Williamson wrote: > > > On Thu,

Re: [Qemu-devel] [PATCH v6 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-11-16 Thread Alex Williamson
On Wed, 16 Nov 2016 21:50:46 +0200 "Aviv B.D." wrote: > On Wed, Nov 16, 2016 at 5:34 PM, Alex Williamson > wrote: > > > On Wed, 16 Nov 2016 15:54:56 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Nov 10, 2016 at 12:44:47PM -0700, Alex Williamson wrote: > > > > On Thu, 10 Nov 201

[Qemu-devel] [patch v3 15/18] target-i386: Use new deposit and extract ops

2016-11-16 Thread Richard Henderson
A couple of places where it was easy to identify a right-shift followed by an extract or and-with-immediate, and the obvious sign-extract from a high byte register. Acked-by: Eduardo Habkost Signed-off-by: Richard Henderson --- target-i386/translate.c | 45 +++---

[Qemu-devel] [patch v3 06/18] tcg/arm: Implement field extraction opcodes

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 4 ++-- tcg/arm/tcg-target.inc.c | 22 ++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index d1fe12b..4e30728 100644 --- a/tc

[Qemu-devel] [PATCH 0/4] POWER9 TCG enablements - BCD functions part II

2016-11-16 Thread Jose Ricardo Ziviani
This serie contains 4 new instructions for POWER9 ISA3.0 bcdcfsq.: Convert signed quadword to packed BCD bcdctsq.: Convert packed BCD to signed quadword bcdcpsgn.: Copy the sign of a register to another bcdsetsgn.: Set the BCD sign according to a preferred sign Jose Ricardo Ziviani (4): target-

[Qemu-devel] [patch v3 00/18] tcg field extract primitives

2016-11-16 Thread Richard Henderson
Changes since v2: * Fixes to aarch64 guest. Some tcg_debug_asserts were triggering. * Silly typo fixed in tcg/mips * tcg/README updated. Changes since v1: * Added tcg_gen_deposit_z_*. Depositing into zero turns out to be quite common among targets. Providing that as a primitive expa

[Qemu-devel] [PATCH 3/4] target-ppc: Implement bcdcpsgn. instruction

2016-11-16 Thread Jose Ricardo Ziviani
bcdcpsgn.: Decimal copy sign. Given two registers vra and vrb, it copies the vra value with vrb sign to the result register vrt. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 30 ++ target-ppc

[Qemu-devel] [patch v3 12/18] tcg/s390: Support deposit into zero

2016-11-16 Thread Richard Henderson
Since we can no longer use matching constraints, this does mean we must handle that data movement by hand. Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.inc.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/tcg/s390/tcg-target.inc.c

[Qemu-devel] [patch v3 04/18] tcg/aarch64: Implement field extraction opcodes

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Cc: Claudio Fontana Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 8 tcg/aarch64/tcg-target.inc.c | 14 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index

[Qemu-devel] [PATCH 1/4] target-ppc: Implement bcdcfsq. instruction

2016-11-16 Thread Jose Ricardo Ziviani
bcdcfsq.: Decimal convert from signed quadword. It is possible to convert values less than 10^31-1 or greater than -10^31-1 to be represented in packed decimal format. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 48 +++

Re: [Qemu-devel] [PATCH] translate-all: Enable locking debug in a debug build

2016-11-16 Thread Richard Henderson
On 11/16/2016 04:57 PM, Alex Bennée wrote: > +#define assert_tb_locked() do { \ > +tcg_debug_assert(have_tb_lock); \ > +} while (0) > + > +#define assert_tb_unlocked() do { \ > +tcg_debug_assert(!have_tb_lock);\ > +} while (0) > + I'm not sur

[Qemu-devel] [patch v3 14/18] target-arm: Use new deposit and extract ops

2016-11-16 Thread Richard Henderson
Use the new primitives for UBFX and SBFX. Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- target-arm/translate-a64.c | 79 +++--- target-arm/translate.c | 37 +- 2 files changed, 34 insertions(+), 82 deletions(-) diff

[Qemu-devel] [patch v3 05/18] tcg/arm: Move isa detection to tcg-target.h

2016-11-16 Thread Richard Henderson
Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 36 tcg/arm/tcg-target.inc.c | 41 + 2 files changed, 33 insertions(+), 44 deletions(-) diff --git a/tcg/arm/tcg-target.h b/tcg/arm

Re: [Qemu-devel] [PATCH] target-m68k: free TCG variables that are not

2016-11-16 Thread Richard Henderson
On 11/15/2016 11:16 PM, Laurent Vivier wrote: This is a cleanup patch. It adds call to tcg_temp_free() when it is missing. Signed-off-by: Laurent Vivier --- target-m68k/translate.c | 41 - 1 file changed, 32 insertions(+), 9 deletions(-) Reviewed-by: R

Re: [Qemu-devel] [PATCH v2] hw/isa/lpc_ich9: inject SMI on all VCPUs if APM_STS == 'Q'

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 01:04:00PM -0500, Paolo Bonzini wrote: > > I guess that's what the next paragraph is about: > > > > > - we could have another magic 0xB2 value, which is implemented directly > > > in QEMU and sets 0xB3 to a magic value. Then OVMF can invoke it > > > after SMBASE relocation

[Qemu-devel] [PATCH 2/4] target-ppc: Implement bcdctsq. instruction

2016-11-16 Thread Jose Ricardo Ziviani
bcdctsq.: Decimal convert to signed quadword. It is possible to convert packed decimal values to signed quadwords. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 39 + target-ppc/transl

[Qemu-devel] [patch v3 09/18] tcg/ppc: Implement field extraction opcodes

2016-11-16 Thread Richard Henderson
Reviewed-by: David Gibson Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 4 ++-- tcg/ppc/tcg-target.inc.c | 10 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h index c765d3e..b42c57a 100644 --- a/tcg/ppc/tcg

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 03:38:11PM -0500, Paolo Bonzini wrote: > > > +void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue *vq) > > > +{ > > > +if (!virtio_should_notify(vdev, vq)) { > > > +return; > > > +} > > > + > > > +trace_virtio_notify_irqfd(vdev, vq); > > > +virtio_

[Qemu-devel] [PATCH] virtio-crypto: fix virtio_queue_set_notification() race

2016-11-16 Thread Stefan Hajnoczi
We must check for new virtqueue buffers after re-enabling notifications. This prevents the race condition where the guest added buffers just after we stopped popping the virtqueue but before we re-enabled notifications. I think the virtio-crypto code was based on virtio-net but this crucial detail

[Qemu-devel] [PATCH 4/4] target-ppc: Implement bcdsetsgn. instruction

2016-11-16 Thread Jose Ricardo Ziviani
bcdsetsgn.: Decimal set sign. This instruction copies the register value to the result register but adjust the signal according to the preferred sign value. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 9 + targe

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 07:05:51PM +0100, Paolo Bonzini wrote: > Dataplane has been omitting forever the step of setting ISR when > an interrupt is raised. This caused little breakage, because the > specification actually says that ISR may not be updated in MSI mode. > > Some versions of the Wind

Re: [Qemu-devel] [PATCH v2] hw/isa/lpc_ich9: inject SMI on all VCPUs if APM_STS == 'Q'

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 06:37:30PM +0100, Laszlo Ersek wrote: > On 11/16/16 13:47, Paolo Bonzini wrote: > > > >> If the consensus is that the patch is a QEMU bugfix (as opposed to a > >> feature) and that it is eligible for the currently supported upstream > >> stable branches, that's the best, no

Re: [Qemu-devel] [PATCH for-2.8 0/3] virtio fixes

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 03:03:13PM -0500, Farhan Ali wrote: > Hi Paolo, > > I was able to test your patches in our s390 environment. I don't see the > qemu crashes anymore which I noticed before. > > Testing a guest running high stress I/O workload, without iothreads does > show a delay in guest

Re: [Qemu-devel] [PATCH v6 0/3] IOMMU: intel_iommu support map and unmap notifications

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 01:03:14PM -0700, Alex Williamson wrote: > On Wed, 16 Nov 2016 21:50:46 +0200 > "Aviv B.D." wrote: > > > On Wed, Nov 16, 2016 at 5:34 PM, Alex Williamson > > wrote: > > > > > On Wed, 16 Nov 2016 15:54:56 +0200 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Thu,

Re: [Qemu-devel] dpdk/vpp and cross-version migration for vhost

2016-11-16 Thread Maxime Coquelin
Hi Michael, On 10/13/2016 07:50 PM, Michael S. Tsirkin wrote: Hi! So it looks like we face a problem with cross-version migration when using vhost. It's not new but became more acute with the advent of vhost user. For users to be able to migrate between different versions of the hypervisor the

Re: [Qemu-devel] [PATCH v2] hw/isa/lpc_ich9: inject SMI on all VCPUs if APM_STS == 'Q'

2016-11-16 Thread Michael S. Tsirkin
On Wed, Nov 16, 2016 at 07:03:27PM +0100, Laszlo Ersek wrote: > On 11/16/16 15:05, Paolo Bonzini wrote: > > > > > > On 16/11/2016 14:18, Michael S. Tsirkin wrote: > >>> - we could have another magic 0xB2 value, which is implemented directly > >>> in QEMU and sets 0xB3 to a magic value. Then OVMF

[Qemu-devel] [PATCH v14 14/22] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-11-16 Thread Kirti Wankhede
Update msix_sparse_mmap_cap() to use vfio_info_add_capability() Update region type capability to use vfio_info_add_capability() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I52bb28c7875a6da5a79ddad1843e6088aff58a45 --- drivers/vfio/pci/vfio_pci.c | 49 ++--

[Qemu-devel] [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma

2016-11-16 Thread Kirti Wankhede
Add task structure to vfio_dma structure. Task structure is used for: - During DMA_UNMAP, same task who mapped it or other task who shares same address space is allowed to unmap, otherwise unmap fails. QEMU maps few iova ranges initially, then fork threads and from the child thread calls DMA_UNMAP

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Paolo Bonzini
> > +void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > +if (!virtio_should_notify(vdev, vq)) { > > +return; > > +} > > + > > +trace_virtio_notify_irqfd(vdev, vq); > > +virtio_set_isr(vq->vdev, 0x1); > > So here, I think we need a comment with parts of >

[Qemu-devel] [PATCH v14 01/22] vfio: Mediated device Core driver

2016-11-16 Thread Kirti Wankhede
Design for Mediated Device Driver: Main purpose of this driver is to provide a common interface for mediated device management that can be used by different drivers of different devices. This module provides a generic interface to create the device, add it to mediated bus, add device to IOMMU grou

[Qemu-devel] [PATCH v14 16/22] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-16 Thread Kirti Wankhede
Updated vfio_pci.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I9f3daba89d8dba5cb5b01a8cff420412f30686c7 --- drivers/vfio/pci/vfio_pci.c | 34 +++--- 1 file changed, 7 insertions(+), 27 deletions(-)

[Qemu-devel] [PATCH v14 10/22] vfio iommu type1: Add support for mediated devices

2016-11-16 Thread Kirti Wankhede
VFIO IOMMU drivers are designed for the devices which are IOMMU capable. Mediated device only uses IOMMU APIs, the underlying hardware can be managed by an IOMMU domain. Aim of this change is: - To use most of the code of TYPE1 IOMMU driver for mediated devices - To support direct assigned device

[Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-16 Thread Kirti Wankhede
This series adds Mediated device support to Linux host kernel. Purpose of this series is to provide a common interface for mediated device management that can be used by different devices. This series introduces Mdev core module that creates and manages mediated devices, VFIO based driver for media

[Qemu-devel] [PATCH v14 06/22] vfio iommu type1: Update arguments of vfio_lock_acct

2016-11-16 Thread Kirti Wankhede
Added task structure as input argument to vfio_lock_acct() function. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I5d3673cc9d3786bb436b395d5f74537f1a36da80 --- drivers/vfio/vfio_iommu_type1.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(

[Qemu-devel] [PATCH v14 17/22] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()

2016-11-16 Thread Kirti Wankhede
Updated vfio_platform_common.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Id87cd6b78ae901610b39bf957974baa6f40cd7b0 --- drivers/vfio/platform/vfio_platform_common.c | 31 +++- 1 file changed, 8 inserti

[Qemu-devel] [PATCH v14 07/22] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-11-16 Thread Kirti Wankhede
Update arguments of vaddr_get_pfn() to take struct mm_struct *mm as input argument. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I885fd4cd4a9f66f4ee2c1caf58267464ec239f52 --- drivers/vfio/vfio_iommu_type1.c | 32 1 file changed, 24 insertions(

[Qemu-devel] [PATCH v14 02/22] vfio: VFIO based driver for Mediated devices

2016-11-16 Thread Kirti Wankhede
vfio_mdev driver registers with mdev core driver. mdev core driver creates mediated device and calls probe routine of vfio_mdev driver for each device. Probe routine of vfio_mdev driver adds mediated device to VFIO core module This driver forms a shim layer that pass through VFIO devices operation

[Qemu-devel] [PATCH v14 13/22] vfio: Introduce common function to add capabilities

2016-11-16 Thread Kirti Wankhede
Vendor driver using mediated device framework should use vfio_info_add_capability() to add capabilities. Introduced this function to reduce code duplication in vendor drivers. vfio_info_cap_shift() manipulated a data buffer to add an offset to each element in a chain. This data buffer is documente

[Qemu-devel] [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-16 Thread Kirti Wankhede
Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers about DMA_UNMAP. Exported two APIs vfio_register_notifier() and vfio_unregister_notifier(). Notifier should be registered, if external user wants to use vfio_pin_pages()/vfio_unpin_pages() APIs to pin/unpin pages. Vendor driver

[Qemu-devel] [PATCH v14 20/22] docs: Sysfs ABI for mediated device framework

2016-11-16 Thread Kirti Wankhede
Added details of sysfs ABI for mediated device framework Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: Icb0fd4ed58a2fa793fbcb1c3d5009a4403c1f3ac --- Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ 1 file changed, 111 insertions(+) create mode 1

[Qemu-devel] [PATCH v14 03/22] vfio: Rearrange functions to get vfio_group from dev

2016-11-16 Thread Kirti Wankhede
This patch rearranges functions to get vfio_group from device Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Reviewed-by: Jike Song Change-Id: I1f93262bdbab75094bc24b087b29da35ba70c4c6 --- drivers/vfio/vfio.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-)

Re: [Qemu-devel] [PATCH 3/3] virtio: set ISR on dataplane notifications

2016-11-16 Thread Paolo Bonzini
- Original Message - > From: "Michael S. Tsirkin" > To: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org, "alex williamson" , > borntrae...@de.ibm.com, fel...@nutanix.com > Sent: Wednesday, November 16, 2016 9:39:24 PM > Subject: Re: [PATCH 3/3] virtio: set ISR on dataplane notifications >

Re: [Qemu-devel] [PATCH] translate-all: Enable locking debug in a debug build

2016-11-16 Thread Pranith Kumar
On Wed, Nov 16, 2016 at 10:57 AM, Alex Bennée wrote: > > Pranith Kumar writes: > >> Unconditionally enable locking checks in debug builds so that we get >> wider testing. Using tcg_debug_assert() allows us to remove >> DEBUG_LOCKING define. > > Interesting. The other option would be to add a debu

[Qemu-devel] [PATCH v14 21/22] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-11-16 Thread Kirti Wankhede
The Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mediated-device.txt | 103 ++- samples/vfio-mdev/Makefile | 13 + sampl

[Qemu-devel] [PATCH v14 05/22] vfio iommu: Added pin and unpin callback functions to vfio_iommu_driver_ops

2016-11-16 Thread Kirti Wankhede
Added APIs for pining and unpining set of pages. These call back into backend iommu module to actually pin and unpin pages. Added two new callback functions to struct vfio_iommu_driver_ops. Backend IOMMU module that supports pining and unpinning pages for mdev devices should provide these functions

<    1   2   3   >