qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 196685: accel/tcg: Adjust parameters and lock


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 196685: accel/tcg: Adjust parameters and locking with do_{...
Date: Sat, 05 Aug 2023 20:38:28 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 1966855e567686e6547b058d8664aefd0e969a0f
      
https://github.com/qemu/qemu/commit/1966855e567686e6547b058d8664aefd0e969a0f
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M accel/tcg/cputlb.c

  Log Message:
  -----------
  accel/tcg: Adjust parameters and locking with do_{ld,st}_mmio_*

Replace MMULookupPageData* with CPUTLBEntryFull, addr, size.
Move QEMU_IOTHREAD_LOCK_GUARD to the caller.

This simplifies the usage from do_ld16_beN and do_st16_leN, where
we weren't locking the entire operation, and required hoop jumping
for passing addr and size.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 190aba803fbcac30b29bdab25f454b1284a96201
      
https://github.com/qemu/qemu/commit/190aba803fbcac30b29bdab25f454b1284a96201
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M accel/tcg/cputlb.c

  Log Message:
  -----------
  accel/tcg: Issue wider aligned i/o in do_{ld,st}_mmio_*

If the address and size are aligned, send larger chunks
to the memory subsystem.  This will be required to make
more use of these helpers.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: f7eaf9d702efdd02481d5f1c25f7d8e0ffb64c6e
      
https://github.com/qemu/qemu/commit/f7eaf9d702efdd02481d5f1c25f7d8e0ffb64c6e
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M accel/tcg/cputlb.c

  Log Message:
  -----------
  accel/tcg: Do not issue misaligned i/o

In the single-page case we were issuing misaligned i/o to
the memory subsystem, which does not handle it properly.
Split such accesses via do_{ld,st}_mmio_*.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1800
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 4be4be8cd627daf97f857e80f7c51c280cd090d8
      
https://github.com/qemu/qemu/commit/4be4be8cd627daf97f857e80f7c51c280cd090d8
  Author: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M gdbstub/gdbstub.c

  Log Message:
  -----------
  gdbstub: use 0 ("any process") on packets with no PID

Previously, qemu-user would always report PID 1 to GDB. This was changed
at dc14a7a6e9 (gdbstub: Report the actual qemu-user pid, 2023-06-30),
but read_thread_id() still considers GDB packets with "no PID" as "PID
1", which is not the qemu-user PID. Fix that by parsing "no PID" as "0",
which the GDB Remote Protocol defines as "any process".

Note that this should have no effect for system emulation as, in this
case, gdb_create_default_process() will assign PID 1 for the first
process and that is what the gdbstub uses for GDB requests with no PID,
or PID 0.

This issue was found with hexagon-lldb, which sends a "Hg" packet with
only the thread-id, but no process-id, leading to the invalid usage of
"PID 1" by qemu-hexagon and a subsequent "E22" reply.

Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: 
<78a3b06f6ab90a7ff8e73ae14a996eb27ec76c85.1690904195.git.quic_mathbern@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 298a89cfb0ee3a1cc0acc36a1e21e49556de0d5e
      
https://github.com/qemu/qemu/commit/298a89cfb0ee3a1cc0acc36a1e21e49556de0d5e
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/mmap.c

  Log Message:
  -----------
  linux-user: Unset MAP_FIXED_NOREPLACE for host

Passing MAP_FIXED_NOREPLACE to host will fail for reserved_va because
the address space is reserved with mmap.  Replace it with MAP_FIXED
in that case.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-2-akihiko.odaki@daynix.com>
[rth: Expand inline commentary.]
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c4317725fe004b38d2aab35f778320c093464706
      
https://github.com/qemu/qemu/commit/c4317725fe004b38d2aab35f778320c093464706
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/mmap.c

  Log Message:
  -----------
  linux-user: Fix MAP_FIXED_NOREPLACE on old kernels

The man page states:
> Note that older kernels which do not recognize the MAP_FIXED_NOREPLACE
> flag will typically (upon detecting a collision with a preexisting
> mapping) fall back to a “non-MAP_FIXED” type of behavior: they will
> return an address that is different from the requested address.
> Therefore, backward-compatible software should check the returned
> address against the requested address.
https://man7.org/linux/man-pages/man2/mmap.2.html

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-3-akihiko.odaki@daynix.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 3fea7a7dd24ea38ad589ae1dd8549e64e33e4e54
      
https://github.com/qemu/qemu/commit/3fea7a7dd24ea38ad589ae1dd8549e64e33e4e54
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: Do not call get_errno() in do_brk()

Later the returned value is compared with -1, and negated errno is not
expected.

Fixes: 00faf08c95 ("linux-user: Don't use MAP_FIXED in do_brk()")
Reviewed-by: Helge Deller <deller@gmx.de>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-4-akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: baf8903f323540c9f38ca2efdd969787cd2f0d60
      
https://github.com/qemu/qemu/commit/baf8903f323540c9f38ca2efdd969787cd2f0d60
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: Use MAP_FIXED_NOREPLACE for do_brk()

MAP_FIXED_NOREPLACE can ensure the mapped address is fixed without
concerning that the new mapping overwrites something else.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-5-akihiko.odaki@daynix.com>
[rth: Pass -1 as fd for MAP_ANON]
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 349e0e6e2b8f17e4132f3b9da5157a5ca0bcffc3
      
https://github.com/qemu/qemu/commit/349e0e6e2b8f17e4132f3b9da5157a5ca0bcffc3
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: Do nothing if too small brk is specified

Linux 6.4.7 does nothing when a value smaller than the initial brk is
specified.

Fixes: 86f04735ac ("linux-user: Fix brk() to release pages")
Reviewed-by: Helge Deller <deller@gmx.de>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-6-akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: fbf48f1210def8bf0f6b8d15c409065361d93650
      
https://github.com/qemu/qemu/commit/fbf48f1210def8bf0f6b8d15c409065361d93650
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c
    M linux-user/syscall.c

  Log Message:
  -----------
  linux-user: Do not align brk with host page size

do_brk() minimizes calls into target_mmap() by aligning the address
with host page size, which is potentially larger than the target page
size. However, the current implementation of this optimization has two
bugs:

- The start of brk is rounded up with the host page size while brk
  advertises an address aligned with the target page size as the
  beginning of brk. This makes the beginning of brk unmapped.
- Content clearing after mapping is flawed. The size to clear is
  specified as HOST_PAGE_ALIGN(brk_page) - brk_page, but brk_page is
  aligned with the host page size so it is always zero.

This optimization actually has no practical benefit. It makes difference
when brk() is called multiple times with values in a range of the host
page size. However, sophisticated memory allocators try to avoid to
make such frequent brk() calls. For example, glibc 2.37 calls brk() to
shrink the heap only when there is a room more than 128 KiB. It is
rare to have a page size larger than 128 KiB if it happens.

Let's remove the optimization to fix the bugs and make the code simpler.

Fixes: 86f04735ac ("linux-user: Fix brk() to release pages")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1616
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-7-akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: df96f1c6348fbbbed38f1d4110a467a0026e0c65
      
https://github.com/qemu/qemu/commit/df96f1c6348fbbbed38f1d4110a467a0026e0c65
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/mmap.c
    M linux-user/user-mmap.h

  Log Message:
  -----------
  linux-user: Remove last_brk

This variable is unused.

Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: e9412277cfb9968aa29eff9783c1ddb439db27a2
      
https://github.com/qemu/qemu/commit/e9412277cfb9968aa29eff9783c1ddb439db27a2
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M bsd-user/mmap.c
    M bsd-user/qemu.h

  Log Message:
  -----------
  bsd-user: Remove last_brk

This variable is unused.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 8b3f3d80fceebf92992eed1bf1d1e5ac27fd0ed8
      
https://github.com/qemu/qemu/commit/8b3f3d80fceebf92992eed1bf1d1e5ac27fd0ed8
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/main.c
    M linux-user/mmap.c
    M linux-user/user-mmap.h

  Log Message:
  -----------
  linux-user: Adjust task_unmapped_base for reserved_va

Ensure that the chosen values for mmap_next_start and
task_unmapped_base are within the guest address space.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 79765b0d02d009fb8c39aa4e2fd9132013ed710c
      
https://github.com/qemu/qemu/commit/79765b0d02d009fb8c39aa4e2fd9132013ed710c
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/aarch64/target_mman.h
    M linux-user/alpha/target_mman.h
    M linux-user/arm/target_mman.h
    M linux-user/cris/target_mman.h
    M linux-user/hexagon/target_mman.h
    M linux-user/hppa/target_mman.h
    M linux-user/i386/target_mman.h
    M linux-user/loongarch64/target_mman.h
    M linux-user/m68k/target_mman.h
    M linux-user/microblaze/target_mman.h
    M linux-user/mips/target_mman.h
    M linux-user/nios2/target_mman.h
    M linux-user/openrisc/target_mman.h
    M linux-user/ppc/target_mman.h
    M linux-user/riscv/target_mman.h
    M linux-user/s390x/target_mman.h
    M linux-user/sh4/target_mman.h
    M linux-user/sparc/target_mman.h
    M linux-user/user-mmap.h
    M linux-user/x86_64/target_mman.h
    M linux-user/xtensa/target_mman.h

  Log Message:
  -----------
  linux-user: Define TASK_UNMAPPED_BASE in $guest/target_mman.h

Provide default values that are as close as possible to the
values used by the guest's kernel.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 7fe6e2595ecdb7ad90572a05d3482a2ddda74611
      
https://github.com/qemu/qemu/commit/7fe6e2595ecdb7ad90572a05d3482a2ddda74611
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/aarch64/target_mman.h
    M linux-user/alpha/target_mman.h
    M linux-user/arm/target_mman.h
    M linux-user/cris/target_mman.h
    M linux-user/hexagon/target_mman.h
    M linux-user/hppa/target_mman.h
    M linux-user/i386/target_mman.h
    M linux-user/loongarch64/target_mman.h
    M linux-user/m68k/target_mman.h
    M linux-user/main.c
    M linux-user/microblaze/target_mman.h
    M linux-user/mips/target_mman.h
    M linux-user/mmap.c
    M linux-user/nios2/target_mman.h
    M linux-user/openrisc/target_mman.h
    M linux-user/ppc/target_mman.h
    M linux-user/riscv/target_mman.h
    M linux-user/s390x/target_mman.h
    M linux-user/sh4/target_mman.h
    M linux-user/sparc/target_mman.h
    M linux-user/user-mmap.h
    M linux-user/x86_64/target_mman.h
    M linux-user/xtensa/target_mman.h

  Log Message:
  -----------
  linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h

Copy each guest kernel's default value, then bound it
against reserved_va or the host address space.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c455e18673c8995248b5982ee4baa8bea66c66b3
      
https://github.com/qemu/qemu/commit/c455e18673c8995248b5982ee4baa8bea66c66b3
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user: Use MAP_FIXED_NOREPLACE for initial image mmap

Use this as extra protection for the guest mapping over
any qemu host mappings.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: d7fd16cd33c5368a0ddb41fece9568f8bdee6ee5
      
https://github.com/qemu/qemu/commit/d7fd16cd33c5368a0ddb41fece9568f8bdee6ee5
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user: Use elf_et_dyn_base for ET_DYN with interpreter

Follow the lead of the linux kernel in fs/binfmt_elf.c,
in which an ET_DYN executable which uses an interpreter
(usually a PIE executable) is loaded away from where the
interpreter itself will be loaded.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: cf180666a0d33a2adf1a3d620825a2cc79525a2e
      
https://github.com/qemu/qemu/commit/cf180666a0d33a2adf1a3d620825a2cc79525a2e
  Author: Helge Deller <deller@gmx.de>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c
    M linux-user/qemu.h

  Log Message:
  -----------
  linux-user: Adjust initial brk when interpreter is close to executable

While we attempt to load a ET_DYN executable far away from
TASK_UNMAPPED_BASE, we are not completely in control of the
address space layout.  If the interpreter lands close to
the executable, leaving insufficient heap space, move brk.

Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
[rth: Re-order after ELF_ET_DYN_BASE patch so that we do not
 "temporarily break" tsan, and also to minimize the changes required.
 Remove image_info.reserve_brk as unused.]
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 74b17cb276d653d1e3612946d8e7b94556c08a18
      
https://github.com/qemu/qemu/commit/74b17cb276d653d1e3612946d8e7b94556c08a18
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/flatload.c
    M linux-user/main.c
    M linux-user/qemu.h

  Log Message:
  -----------
  linux-user: Properly set image_info.brk in flatload

The heap starts at "brk" not "start_brk".  With this fixed,
image_info.start_brk is unused and may be removed.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: e8491f4bd985fb337a706a889aeda84f3b88caab
      
https://github.com/qemu/qemu/commit/e8491f4bd985fb337a706a889aeda84f3b88caab
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user: Do not adjust image mapping for host page size

Remove TARGET_ELF_EXEC_PAGESIZE, and 3 other TARGET_ELF_PAGE* macros
based off of that.  Rely on target_mmap to handle guest vs host page
size mismatch.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 3caad5f822edd63ff516a2421d5d87d54c4e3396
      
https://github.com/qemu/qemu/commit/3caad5f822edd63ff516a2421d5d87d54c4e3396
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user: Do not adjust zero_bss for host page size

Rely on target_mmap to handle guest vs host page size mismatch.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 779ea65826cb3a577356a7178ef8c6fcf516b52e
      
https://github.com/qemu/qemu/commit/779ea65826cb3a577356a7178ef8c6fcf516b52e
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user: Use zero_bss for PT_LOAD with no file contents too

If p_filesz == 0, then vaddr_ef == vaddr.  We can reuse the
code in zero_bss rather than incompletely duplicating it in
load_elf_image.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 0c99a284a58c93874d91417590627ca87a773721
      
https://github.com/qemu/qemu/commit/0c99a284a58c93874d91417590627ca87a773721
  Author: Mikhail Tyutin <m.tyutin@yadro.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M accel/tcg/cputlb.c

  Log Message:
  -----------
  accel/tcg: Call save_iotlb_data from io_readx as well.

Apply save_iotlb_data() to io_readx() as well as to io_writex().
This fixes SEGFAULT on qemu_plugin_hwaddr_phys_addr() call plugins
for addresses inside of MMIO region.

Signed-off-by: Dmitriy Solovev <d.solovev@yadro.com>
Signed-off-by: Mikhail Tyutin <m.tyutin@yadro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230804110903.19968-1-m.tyutin@yadro.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 843246699425adfb6b81f927c16c9c6249b51e1d
      
https://github.com/qemu/qemu/commit/843246699425adfb6b81f927c16c9c6249b51e1d
  Author: Nathan Egge <negge@xiph.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M linux-user/elfload.c

  Log Message:
  -----------
  linux-user/elfload: Set V in ELF_HWCAP for RISC-V

Set V bit for hwcap if misa is set.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1793
Signed-off-by: Nathan Egge <negge@xiph.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Tested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-Id: <20230803131424.40744-1-negge@xiph.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: d7fd7f9d7d9c12f6661adb807a85c244425cf347
      
https://github.com/qemu/qemu/commit/d7fd7f9d7d9c12f6661adb807a85c244425cf347
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M accel/tcg/cputlb.c
    M bsd-user/mmap.c
    M bsd-user/qemu.h
    M gdbstub/gdbstub.c
    M linux-user/aarch64/target_mman.h
    M linux-user/alpha/target_mman.h
    M linux-user/arm/target_mman.h
    M linux-user/cris/target_mman.h
    M linux-user/elfload.c
    M linux-user/flatload.c
    M linux-user/hexagon/target_mman.h
    M linux-user/hppa/target_mman.h
    M linux-user/i386/target_mman.h
    M linux-user/loongarch64/target_mman.h
    M linux-user/m68k/target_mman.h
    M linux-user/main.c
    M linux-user/microblaze/target_mman.h
    M linux-user/mips/target_mman.h
    M linux-user/mmap.c
    M linux-user/nios2/target_mman.h
    M linux-user/openrisc/target_mman.h
    M linux-user/ppc/target_mman.h
    M linux-user/qemu.h
    M linux-user/riscv/target_mman.h
    M linux-user/s390x/target_mman.h
    M linux-user/sh4/target_mman.h
    M linux-user/sparc/target_mman.h
    M linux-user/syscall.c
    M linux-user/user-mmap.h
    M linux-user/x86_64/target_mman.h
    M linux-user/xtensa/target_mman.h

  Log Message:
  -----------
  Merge tag 'pull-tcg-20230805' of https://gitlab.com/rth7680/qemu into staging

accel/tcg: Do not issue misaligned i/o
accel/tcg: Call save_iotlb_data from io_readx
gdbstub: use 0 ("any process") on packets with no PID
linux-user: Fixes for MAP_FIXED_NOREPLACE
linux-user: Fixes for brk
linux-user: Adjust task_unmapped_base for reserved_va
linux-user: Use ELF_ET_DYN_BASE for ET_DYN with interpreter
linux-user: Remove host != guest page size workarounds in brk and image load
linux-user: Set V in ELF_HWCAP for RISC-V
*-user: Remove last_brk as unused

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTPFQkdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9B/ggAlYHsJAJdQaGXYTZD
# 8ycXAUAKSovIxLbI0nGDgr9qjFeoMLYB0FYlN3Xur9yY3olOcQYIdL81Cog/RAti
# RooQt1U3VaXIXwSb+fniM9yqu0vP8KrBlH5HgU3dViNa9AYkRXHypmo1j1vRKWL9
# C1GGoY9pehlvLvWweA5BuW1f8cMPX4xG1WJBX1nl3/JMRHCOerUnw0Q6cGqlmFAI
# IV32lkXnbLh9zkSeuizi2F+zZP1MuYOjR7nzqlfU/R4E6bKCdPl/FfCQNkA4VjUM
# SRHWljjKwk3/MbYi4PSs9aS1fKKv+fLdzeAzrMJhGri72CsAHXennaJ3rqk2Bu3U
# you+9g==
# =rI/G
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 05 Aug 2023 08:35:37 PM PDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" 
[ultimate]

* tag 'pull-tcg-20230805' of https://gitlab.com/rth7680/qemu: (24 commits)
  linux-user/elfload: Set V in ELF_HWCAP for RISC-V
  accel/tcg: Call save_iotlb_data from io_readx as well.
  linux-user: Use zero_bss for PT_LOAD with no file contents too
  linux-user: Do not adjust zero_bss for host page size
  linux-user: Do not adjust image mapping for host page size
  linux-user: Properly set image_info.brk in flatload
  linux-user: Adjust initial brk when interpreter is close to executable
  linux-user: Use elf_et_dyn_base for ET_DYN with interpreter
  linux-user: Use MAP_FIXED_NOREPLACE for initial image mmap
  linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h
  linux-user: Define TASK_UNMAPPED_BASE in $guest/target_mman.h
  linux-user: Adjust task_unmapped_base for reserved_va
  bsd-user: Remove last_brk
  linux-user: Remove last_brk
  linux-user: Do not align brk with host page size
  linux-user: Do nothing if too small brk is specified
  linux-user: Use MAP_FIXED_NOREPLACE for do_brk()
  linux-user: Do not call get_errno() in do_brk()
  linux-user: Fix MAP_FIXED_NOREPLACE on old kernels
  linux-user: Unset MAP_FIXED_NOREPLACE for host
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/6db03ccc7f4c...d7fd7f9d7d9c



reply via email to

[Prev in Thread] Current Thread [Next in Thread]