[PATCH v5 00/17] tcg: CPUTLBEntryFull and TARGET_TB_PCREL

Richard Henderson posted 17 patches 1 year, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220925105124.82033-1-richard.henderson@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Yanan Wang <wangyanan55@huawei.com>, Peter Maydell <peter.maydell@linaro.org>, Michael Rolnik <mrolnik@gmail.com>, Taylor Simpson <tsimpson@quicinc.com>, Song Gao <gaosong@loongson.cn>, Xiaojuan Yang <yangxiaojuan@loongson.cn>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Stafford Horne <shorne@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, David Hildenbrand <david@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Thomas Huth <thuth@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
There is a newer version of this series
include/exec/cpu-all.h                  |   6 +-
include/exec/cpu-defs.h                 |  54 ++++--
include/exec/exec-all.h                 |  84 ++++++++-
include/exec/memattrs.h                 |   2 -
include/exec/plugin-gen.h               |   7 +-
include/hw/core/cpu.h                   |  10 +-
accel/tcg/cpu-exec.c                    | 108 +++++++----
accel/tcg/cputlb.c                      | 228 ++++++++++++++----------
accel/tcg/plugin-gen.c                  |  22 +--
accel/tcg/translate-all.c               | 168 ++++++-----------
accel/tcg/translator.c                  |   2 +-
target/arm/cpu.c                        |   4 +-
target/arm/mte_helper.c                 |  14 +-
target/arm/sve_helper.c                 |   4 +-
target/arm/translate-a64.c              |   2 +-
target/avr/cpu.c                        |   2 +-
target/hexagon/cpu.c                    |   2 +-
target/hppa/cpu.c                       |   4 +-
target/i386/tcg/tcg-cpu.c               |   2 +-
target/loongarch/cpu.c                  |   2 +-
target/microblaze/cpu.c                 |   2 +-
target/mips/tcg/exception.c             |   2 +-
target/mips/tcg/sysemu/special_helper.c |   2 +-
target/openrisc/cpu.c                   |   2 +-
target/riscv/cpu.c                      |   4 +-
target/rx/cpu.c                         |   2 +-
target/s390x/tcg/mem_helper.c           |   4 -
target/sh4/cpu.c                        |   4 +-
target/sparc/cpu.c                      |   2 +-
target/sparc/mmu_helper.c               | 123 ++++++-------
target/tricore/cpu.c                    |   2 +-
tcg/tcg.c                               |   6 +-
32 files changed, 501 insertions(+), 381 deletions(-)
[PATCH v5 00/17] tcg: CPUTLBEntryFull and TARGET_TB_PCREL
Posted by Richard Henderson 1 year, 7 months ago
Smooshing these two patch sets back together for review bandwidth.
I hope to make this the next tcg-next pull.

There are three from the first half, tlbentryfull, which are new.
These are following a hallway conversation with Peter about bits
in MemTxAttrs that are not actually related to memory transactions,
and infrastructure to address a to-do in an Arm patch set.

There are a few patches from the second half, pcrel, that have not
been reviewed. 

  07-target-sparc-Use-tlb_set_page_full.patch
  08-accel-tcg-Move-byte_swap-from-MemTxAttrs-to-CPUTL.patch
  09-accel-tcg-Add-force_aligned-to-CPUTLBEntryFull.patch
  10-accel-tcg-Remove-PageDesc-code_bitmap.patch
  13-accel-tcg-Do-not-align-tb-page_addr-0.patch
  15-accel-tcg-Introduce-tb_pc-and-tb_pc_log.patch
  16-accel-tcg-Introduce-TARGET_TB_PCREL.patch


r~


Richard Henderson (17):
  accel/tcg: Rename CPUIOTLBEntry to CPUTLBEntryFull
  accel/tcg: Drop addr member from SavedIOTLB
  accel/tcg: Suppress auto-invalidate in probe_access_internal
  accel/tcg: Introduce probe_access_full
  accel/tcg: Introduce tlb_set_page_full
  include/exec: Introduce TARGET_PAGE_ENTRY_EXTRA
  target/sparc: Use tlb_set_page_full
  accel/tcg: Move byte_swap from MemTxAttrs to CPUTLBEntryFull
  accel/tcg: Add force_aligned to CPUTLBEntryFull
  accel/tcg: Remove PageDesc code_bitmap
  accel/tcg: Use bool for page_find_alloc
  accel/tcg: Use DisasContextBase in plugin_gen_tb_start
  accel/tcg: Do not align tb->page_addr[0]
  include/hw/core: Create struct CPUJumpCache
  accel/tcg: Introduce tb_pc and tb_pc_log
  accel/tcg: Introduce TARGET_TB_PCREL
  accel/tcg: Split log_cpu_exec into inline and slow path

 include/exec/cpu-all.h                  |   6 +-
 include/exec/cpu-defs.h                 |  54 ++++--
 include/exec/exec-all.h                 |  84 ++++++++-
 include/exec/memattrs.h                 |   2 -
 include/exec/plugin-gen.h               |   7 +-
 include/hw/core/cpu.h                   |  10 +-
 accel/tcg/cpu-exec.c                    | 108 +++++++----
 accel/tcg/cputlb.c                      | 228 ++++++++++++++----------
 accel/tcg/plugin-gen.c                  |  22 +--
 accel/tcg/translate-all.c               | 168 ++++++-----------
 accel/tcg/translator.c                  |   2 +-
 target/arm/cpu.c                        |   4 +-
 target/arm/mte_helper.c                 |  14 +-
 target/arm/sve_helper.c                 |   4 +-
 target/arm/translate-a64.c              |   2 +-
 target/avr/cpu.c                        |   2 +-
 target/hexagon/cpu.c                    |   2 +-
 target/hppa/cpu.c                       |   4 +-
 target/i386/tcg/tcg-cpu.c               |   2 +-
 target/loongarch/cpu.c                  |   2 +-
 target/microblaze/cpu.c                 |   2 +-
 target/mips/tcg/exception.c             |   2 +-
 target/mips/tcg/sysemu/special_helper.c |   2 +-
 target/openrisc/cpu.c                   |   2 +-
 target/riscv/cpu.c                      |   4 +-
 target/rx/cpu.c                         |   2 +-
 target/s390x/tcg/mem_helper.c           |   4 -
 target/sh4/cpu.c                        |   4 +-
 target/sparc/cpu.c                      |   2 +-
 target/sparc/mmu_helper.c               | 123 ++++++-------
 target/tricore/cpu.c                    |   2 +-
 tcg/tcg.c                               |   6 +-
 32 files changed, 501 insertions(+), 381 deletions(-)

-- 
2.34.1
Re: [PATCH v5 00/17] tcg: CPUTLBEntryFull and TARGET_TB_PCREL
Posted by Richard Henderson 1 year, 7 months ago
On 9/25/22 03:51, Richard Henderson wrote:
> Smooshing these two patch sets back together for review bandwidth.
> I hope to make this the next tcg-next pull.
> 
> There are three from the first half, tlbentryfull, which are new.
> These are following a hallway conversation with Peter about bits
> in MemTxAttrs that are not actually related to memory transactions,
> and infrastructure to address a to-do in an Arm patch set.
> 
> There are a few patches from the second half, pcrel, that have not
> been reviewed.
> 
>    07-target-sparc-Use-tlb_set_page_full.patch
>    08-accel-tcg-Move-byte_swap-from-MemTxAttrs-to-CPUTL.patch
>    09-accel-tcg-Add-force_aligned-to-CPUTLBEntryFull.patch
>    10-accel-tcg-Remove-PageDesc-code_bitmap.patch
>    13-accel-tcg-Do-not-align-tb-page_addr-0.patch
>    15-accel-tcg-Introduce-tb_pc-and-tb_pc_log.patch
>    16-accel-tcg-Introduce-TARGET_TB_PCREL.patch

FWIW, the target/sparc patch fails (the peril of insufficiently tested airport updates), 
so I'm going to drop 7+8 until I have time to investigate.  I'm also going to drop patch 9 
for now, and present it alongside the Arm patch that will use it.

But otherwise, gentle ping.


r~
Re: [PATCH v5 00/17] tcg: CPUTLBEntryFull and TARGET_TB_PCREL
Posted by Mark Cave-Ayland 1 year, 7 months ago
On 29/09/2022 03:16, Richard Henderson wrote:

> On 9/25/22 03:51, Richard Henderson wrote:
>> Smooshing these two patch sets back together for review bandwidth.
>> I hope to make this the next tcg-next pull.
>>
>> There are three from the first half, tlbentryfull, which are new.
>> These are following a hallway conversation with Peter about bits
>> in MemTxAttrs that are not actually related to memory transactions,
>> and infrastructure to address a to-do in an Arm patch set.
>>
>> There are a few patches from the second half, pcrel, that have not
>> been reviewed.
>>
>>    07-target-sparc-Use-tlb_set_page_full.patch
>>    08-accel-tcg-Move-byte_swap-from-MemTxAttrs-to-CPUTL.patch
>>    09-accel-tcg-Add-force_aligned-to-CPUTLBEntryFull.patch
>>    10-accel-tcg-Remove-PageDesc-code_bitmap.patch
>>    13-accel-tcg-Do-not-align-tb-page_addr-0.patch
>>    15-accel-tcg-Introduce-tb_pc-and-tb_pc_log.patch
>>    16-accel-tcg-Introduce-TARGET_TB_PCREL.patch
> 
> FWIW, the target/sparc patch fails (the peril of insufficiently tested airport 
> updates), so I'm going to drop 7+8 until I have time to investigate.  I'm also going 
> to drop patch 9 for now, and present it alongside the Arm patch that will use it.

If it helps, the test case that exercises the IE (Invert Endian) page bit in 
target/sparc is Milax (OpenSolaris) which uses it to map PCI devices. Grab a suitable 
copy of milax032sparc.iso and test with:

     qemu-system-sparc64 -m 256 -cdrom milax032sparc.iso -nographic -boot d

You should see the IE pages accessed at the point where it starts poking the CDROM 
device, and timeouts if it isn't working.


ATB,

Mark.