mbox series

[PULL,00/18] tcg queued patches

Message ID 20180614193147.29680-1-richard.henderson@linaro.org
Headers show
Series tcg queued patches | expand

Message

Richard Henderson June 14, 2018, 7:31 p.m. UTC
The following changes since commit 2ab09bf2f9f55b9fb8d2de6eb2ba2a8570e268e2:

  Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180612-pull-request' into staging (2018-06-12 15:34:34 +0100)

are available in the Git repository at:

  https://github.com/rth7680/qemu.git tags/pull-tcg-20180614

for you to fetch changes up to ba3e9674da7b60ad627e122a6496d3e13f20c34f:

  tcg: remove tb_lock (2018-06-12 08:26:19 -1000)

----------------------------------------------------------------
Workaround macos assembler lossage.
Eliminate tb_lock.

----------------------------------------------------------------
Emilio G. Cota (17):
      qht: require a default comparison function
      qht: return existing entry when qht_insert fails
      tcg: track TBs with per-region BST's
      tcg: move tb_ctx.tb_phys_invalidate_count to tcg_ctx
      translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB
      translate-all: make l1_map lockless
      translate-all: remove hole in PageDesc
      translate-all: work page-by-page in tb_invalidate_phys_range_1
      translate-all: move tb_invalidate_phys_page_range up in the file
      translate-all: use per-page locking in !user-mode
      translate-all: add page_locked assertions
      translate-all: introduce assert_no_pages_locked
      translate-all: discard TB when tb_link_page returns an existing matching TB
      translate-all: protect TB jumps with a per-destination-TB lock
      cputlb: remove tb_lock from tlb_flush functions
      translate-all: remove tb_lock mention from cpu_restore_state_from_tb
      tcg: remove tb_lock

John Arbuckle (1):
      tcg/i386: Use byte form of xgetbv instruction

 accel/tcg/translate-all.h       |    6 +-
 include/exec/cpu-common.h       |    2 +-
 include/exec/exec-all.h         |   51 +-
 include/exec/memory-internal.h  |    6 +-
 include/exec/tb-context.h       |    4 -
 include/qemu/qht.h              |   32 +-
 tcg/tcg.h                       |   13 +-
 accel/tcg/cpu-exec.c            |   96 ++--
 accel/tcg/cputlb.c              |    8 -
 accel/tcg/translate-all.c       | 1045 +++++++++++++++++++++++++++------------
 exec.c                          |   26 +-
 linux-user/main.c               |    3 -
 tcg/i386/tcg-target.inc.c       |    5 +-
 tcg/tcg.c                       |  205 ++++++++
 tests/qht-bench.c               |   18 +-
 tests/test-qht.c                |   23 +-
 util/qht.c                      |   41 +-
 docs/devel/multi-thread-tcg.txt |   24 +-
 18 files changed, 1131 insertions(+), 477 deletions(-)

Comments

Peter Maydell June 15, 2018, 10:41 a.m. UTC | #1
On 14 June 2018 at 20:31, Richard Henderson
<richard.henderson@linaro.org> wrote:
> The following changes since commit 2ab09bf2f9f55b9fb8d2de6eb2ba2a8570e268e2:

>

>   Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180612-pull-request' into staging (2018-06-12 15:34:34 +0100)

>

> are available in the Git repository at:

>

>   https://github.com/rth7680/qemu.git tags/pull-tcg-20180614

>

> for you to fetch changes up to ba3e9674da7b60ad627e122a6496d3e13f20c34f:

>

>   tcg: remove tb_lock (2018-06-12 08:26:19 -1000)

>

> ----------------------------------------------------------------

> Workaround macos assembler lossage.

> Eliminate tb_lock.

>


Hi; I get compile failures with clang I'm afraid
(seen on x86-64 Linux, OSX and FreeBSD):

/home/petmay01/linaro/qemu-for-merges/accel/tcg/translate-all.c:1800:44:
error: incompatible integer to pointer conversion passing 'uintptr_t'
(aka 'unsigned long') to parameter of type 'void *'
[-Werror,-Wint-conversion]
        atomic_set(&tcg_ctx->code_gen_ptr, orig_aligned);
                                           ^~~~~~~~~~~~
/home/petmay01/linaro/qemu-for-merges/include/qemu/atomic.h:134:30:
note: expanded from macro 'atomic_set'
    atomic_set__nocheck(ptr, i);                      \
                             ^
/home/petmay01/linaro/qemu-for-merges/include/qemu/atomic.h:130:27:
note: expanded from macro 'atomic_set__nocheck'
    __atomic_store_n(ptr, i, __ATOMIC_RELAXED)
                          ^
1 error generated.

thanks
-- PMM
Emilio Cota June 15, 2018, 2:01 p.m. UTC | #2
On Fri, Jun 15, 2018 at 11:41:28 +0100, Peter Maydell wrote:
> Hi; I get compile failures with clang I'm afraid

> (seen on x86-64 Linux, OSX and FreeBSD):

> 

> /home/petmay01/linaro/qemu-for-merges/accel/tcg/translate-all.c:1800:44:

> error: incompatible integer to pointer conversion passing 'uintptr_t'

> (aka 'unsigned long') to parameter of type 'void *'

> [-Werror,-Wint-conversion]

>         atomic_set(&tcg_ctx->code_gen_ptr, orig_aligned);


Fixed with:

--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1797,7 +1797,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
         uintptr_t orig_aligned = (uintptr_t)gen_code_buf;
 
         orig_aligned -= ROUND_UP(sizeof(*tb), qemu_icache_linesize);
-        atomic_set(&tcg_ctx->code_gen_ptr, orig_aligned);
+        atomic_set(&tcg_ctx->code_gen_ptr, (void *)orig_aligned);
         return existing_tb;
     }
     tcg_tb_insert(tb);

This applies to patch 14/18 ("translate-all: discard TB when
tb_link_page returns an existing matching TB") of the pull request.

The rest compiles OK for me on clang 7.0.0.

Richard: can you fold this fixup into patch 14?

Thanks,

		Emilio
Richard Henderson June 15, 2018, 5:54 p.m. UTC | #3
On 06/15/2018 04:01 AM, Emilio G. Cota wrote:
> On Fri, Jun 15, 2018 at 11:41:28 +0100, Peter Maydell wrote:

>> Hi; I get compile failures with clang I'm afraid

>> (seen on x86-64 Linux, OSX and FreeBSD):

>>

>> /home/petmay01/linaro/qemu-for-merges/accel/tcg/translate-all.c:1800:44:

>> error: incompatible integer to pointer conversion passing 'uintptr_t'

>> (aka 'unsigned long') to parameter of type 'void *'

>> [-Werror,-Wint-conversion]

>>         atomic_set(&tcg_ctx->code_gen_ptr, orig_aligned);

> 

> Fixed with:

> 

> --- a/accel/tcg/translate-all.c

> +++ b/accel/tcg/translate-all.c

> @@ -1797,7 +1797,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,

>          uintptr_t orig_aligned = (uintptr_t)gen_code_buf;

>  

>          orig_aligned -= ROUND_UP(sizeof(*tb), qemu_icache_linesize);

> -        atomic_set(&tcg_ctx->code_gen_ptr, orig_aligned);

> +        atomic_set(&tcg_ctx->code_gen_ptr, (void *)orig_aligned);

>          return existing_tb;

>      }

>      tcg_tb_insert(tb);

> 

> This applies to patch 14/18 ("translate-all: discard TB when

> tb_link_page returns an existing matching TB") of the pull request.

> 

> The rest compiles OK for me on clang 7.0.0.

> 

> Richard: can you fold this fixup into patch 14?


Will do.


r~