Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- Continued preparing patches for upstream submission. Did some final
code and testcase cleanups, updated/rewrote patch descriptions, wrote
the cover letter and the list of changes from v2.
- Posted the patches upstream¹.
--
Thiago
¹ https://inbox.sourceware.org/gdb-patches/20230130044518.3322695-1-thiago.ba…
Project Stratos
===============
- reading up on the linux-mm subsystem
- learning about struct vma_area
[proposal for Unprivilaged VirtIO API]
<https://docs.google.com/document/d/18ijlX2Lguejyo3BV8Tri5Y_d1SmozocBIk2ajgq…>
FEAT_RME, CCA Realms ([QEMU-466])
=================================
- more review of [PATCH v5 00/36] tcg: Support for Int128 with helpers
Message-Id: <20230126043824.54819-1-richard.henderson(a)linaro.org>
[QEMU-466] <https://linaro.atlassian.net/browse/QEMU-466>
QEMU Upstream Work ([UM-2])
===========================
- updated maintainer trees, running [CI over weekend]
- posted [PULL 00/35] Testing, docs, semihosting and plugin updates
Message-Id: <20230126112250.2584701-1-alex.bennee(a)linaro.org>
[UM-2] <https://linaro.atlassian.net/browse/UM-2>
[CI over weekend]
<https://gitlab.com/stsquad/qemu/-/pipelines/753447926>
Current Review Queue
====================
TODO [RFC PATCH 00/16] arm: Run Arm CCA VMs with KVM
Message-Id: <20230127150727.612594-1-jean-philippe(a)linaro.org>
==================================================================================================================
TODO [QEMU][PATCH v4 00/10] Introduce xenpvh machine for arm architecture
Message-Id: <20230125085407.7144-1-vikram.garhwal(a)amd.com>
===================================================================================================================================
TODO [PATCH v3 0/3] tcg: add perfmap and jitdump
Message-Id: <20230111014705.2275040-1-iii(a)linux.ibm.com>
========================================================================================================
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
Progress:
* UM-2 [QEMU upstream maintainership]
- usual upstream maintenance tasks
* QEMU-471 [QEMU ARM v9.0 Baseline CPU for TCG]
- FEAT_FGT: finished coding, did some testing, sent patches for review
-- PMM
After gdb-13-branchpoint-527-g46758593515 commit 4675859351582f017b495ff13fb2ea72a99834af
Author: Tom Tromey <tom(a)tromey.com>
Rename to allow_ifunc_tests
the following benchmarks slowed down by more than 3%:
- 465.tonto failed to build
Below reproducer instructions can be used to re-build both "first_bad" and "last_good" cross-toolchains used in this bisection. Naturally, the scripts will fail when triggerring benchmarking jobs if you don\'t have access to Linaro TCWG CI.
Configuration:
- Benchmark: SPEC CPU2006
- Toolchain: GCC + Glibc + GNU Linker
- Version: all components were built from their tip of trunk
- Target: aarch64-linux-gnu
- Compiler flags: -O3
- Hardware:
This benchmarking CI is work-in-progress, and we welcome feedback and suggestions at linaro-toolchain(a)lists.linaro.org . In our improvement plans is to add support for SPEC CPU2017 benchmarks and provide "perf report/annotate" data behind these reports.
THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
For latest status see comments in https://linaro.atlassian.net/browse/GNU-692 .
Status of gdb-13-branchpoint-527-g46758593515 commit for tcwg_bmk-code_speed-spec2k6:
commit 4675859351582f017b495ff13fb2ea72a99834af
Author: Tom Tromey <tom(a)tromey.com>
Date: Sun Jan 8 11:41:19 2023 -0700
Rename to allow_ifunc_tests
This changes skip_ifunc_tests to invert the sense, and renames it to
allow_ifunc_tests.
* gnu-aarch64-master-O3
** After gdb-13-branchpoint-527-g46758593515 commit 4675859351582f017b495ff13fb2ea72a99834af
** Author: Tom Tromey <tom(a)tromey.com>
**
** Rename to allow_ifunc_tests
**
** the following benchmarks slowed down by more than 3%:
** - 465.tonto failed to build
** https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3…
Bad build: https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3…
Good build: https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3…
Reproduce current build:
<cut>
mkdir -p investigate-binutils-4675859351582f017b495ff13fb2ea72a99834af
cd investigate-binutils-4675859351582f017b495ff13fb2ea72a99834af
# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests for bad and good builds
mkdir -p bad/artifacts good/artifacts
curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3… --fail
curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3… --fail
# Reproduce bad build
(cd bad; ../jenkins-scripts/tcwg_bmk-build.sh ^^ true %%rr[top_artifacts] artifacts)
# Reproduce good build
(cd good; ../jenkins-scripts/tcwg_bmk-build.sh ^^ true %%rr[top_artifacts] artifacts)
</cut>
Full commit (up to 1000 lines):
<cut>
commit 4675859351582f017b495ff13fb2ea72a99834af
Author: Tom Tromey <tom(a)tromey.com>
Date: Sun Jan 8 11:41:19 2023 -0700
Rename to allow_ifunc_tests
This changes skip_ifunc_tests to invert the sense, and renames it to
allow_ifunc_tests.
---
gdb/testsuite/gdb.base/gnu-ifunc.exp | 2 +-
gdb/testsuite/gdb.compile/compile-ifunc.exp | 2 +-
gdb/testsuite/lib/gdb.exp | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 967d1e053e7..81119f764b8 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require !skip_shlib_tests !skip_ifunc_tests
+require !skip_shlib_tests allow_ifunc_tests
standard_testfile .c
set staticexecutable ${testfile}-static
diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp
index bfbe65a503b..990d35a53f6 100644
--- a/gdb/testsuite/gdb.compile/compile-ifunc.exp
+++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp
@@ -15,7 +15,7 @@
load_lib compile-support.exp
-require !skip_ifunc_tests
+require allow_ifunc_tests
standard_testfile
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 7143908bbc2..3a1936ffc82 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3972,17 +3972,17 @@ gdb_caching_proc has_int128_cxx {
return [gdb_int128_helper c++]
}
-# Return true if the IFUNC feature is unsupported.
-gdb_caching_proc skip_ifunc_tests {
+# Return true if the IFUNC feature is supported.
+gdb_caching_proc allow_ifunc_tests {
if [gdb_can_simple_compile ifunc {
extern void f_ ();
typedef void F (void);
F* g (void) { return &f_; }
void f () __attribute__ ((ifunc ("g")));
} object] {
- return 0
- } else {
return 1
+ } else {
+ return 0
}
}
</cut>
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- Continued preparing patches for upstream submission. Realised I had to
document my changes to the remote protocol in the GDB manual, so did
that. Also making small code cleanups and updating/rewriting patch
descriptions.
- Noticed I could to a small optimisation in one patch, but it would
involve a lot of refactoring to move GDB-specific code so that it could
also be used by gdbserver, so saved the WIP branch for later.
# TCWG CI
- Investigated failure report from yesterday's email. Reproduced on
tcwg-jade-03 with a slightly different build failure, but wasn't able to
make much progress¹.
--
Thiago
¹ https://lists.linaro.org/archives/list/linaro-toolchain@lists.linaro.org/th…
Progress:
* UM-2 [QEMU upstream maintainership]
- usual upstream maintenance tasks
* QEMU-471 [QEMU ARM v9.0 Baseline CPU for TCG]
- FEAT_FGT getting closer towards being done: I just have
to mark up the ARMCPRegInfo structs for HDFGRTR traps, and
write the code to handle traps on ERET and SVC
-- PMM
After gdb-13-branchpoint-388-g71fa8692930 commit 71fa8692930cd5fc3f332415cf642d3aa5f55fc6
Author: Mike Frysinger <vapier(a)gentoo.org>
sim: cris: move arch-specific file compilation to top-level
the following benchmarks slowed down by more than 3%:
- 481.wrf failed to build
- 416.gamess failed to build
Below reproducer instructions can be used to re-build both "first_bad" and "last_good" cross-toolchains used in this bisection. Naturally, the scripts will fail when triggerring benchmarking jobs if you don\'t have access to Linaro TCWG CI.
Configuration:
- Benchmark: SPEC CPU2006
- Toolchain: GCC + Glibc + GNU Linker
- Version: all components were built from their tip of trunk
- Target: arm-linux-gnueabihf
- Compiler flags: -O3 -flto -marm
- Hardware:
This benchmarking CI is work-in-progress, and we welcome feedback and suggestions at linaro-toolchain(a)lists.linaro.org . In our improvement plans is to add support for SPEC CPU2017 benchmarks and provide "perf report/annotate" data behind these reports.
THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
For latest status see comments in https://linaro.atlassian.net/browse/GNU-692 .
Status of gdb-13-branchpoint-388-g71fa8692930 commit for tcwg_bmk-code_speed-spec2k6:
commit 71fa8692930cd5fc3f332415cf642d3aa5f55fc6
Author: Mike Frysinger <vapier(a)gentoo.org>
Date: Sun Jan 1 13:40:11 2023 -0500
sim: cris: move arch-specific file compilation to top-level
* gnu-arm-master-O3_LTO
** After gdb-13-branchpoint-388-g71fa8692930 commit 71fa8692930cd5fc3f332415cf642d3aa5f55fc6
** Author: Mike Frysinger <vapier(a)gentoo.org>
**
** sim: cris: move arch-specific file compilation to top-level
**
** the following benchmarks slowed down by more than 3%:
** - 481.wrf failed to build
** - 416.gamess failed to build
** https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-arm-master-O3_LTO…
Bad build: https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-arm-master-O3_LTO…
Good build: https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-arm-master-O3_LTO…
Reproduce current build:
<cut>
mkdir -p investigate-binutils-71fa8692930cd5fc3f332415cf642d3aa5f55fc6
cd investigate-binutils-71fa8692930cd5fc3f332415cf642d3aa5f55fc6
# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests for bad and good builds
mkdir -p bad/artifacts good/artifacts
curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-arm-master-O3_LTO… --fail
curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-arm-master-O3_LTO… --fail
# Reproduce bad build
(cd bad; ../jenkins-scripts/tcwg_bmk-build.sh ^^ true %%rr[top_artifacts] artifacts)
# Reproduce good build
(cd good; ../jenkins-scripts/tcwg_bmk-build.sh ^^ true %%rr[top_artifacts] artifacts)
</cut>
Full commit (up to 1000 lines):
<cut>
commit 71fa8692930cd5fc3f332415cf642d3aa5f55fc6
Author: Mike Frysinger <vapier(a)gentoo.org>
Date: Sun Jan 1 13:40:11 2023 -0500
sim: cris: move arch-specific file compilation to top-level
---
sim/Makefile.in | 3 ---
sim/cris/local.mk | 3 ---
2 files changed, 6 deletions(-)
diff --git a/sim/Makefile.in b/sim/Makefile.in
index 435c36b2b83..0ad692126e7 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -4801,9 +4801,6 @@ testsuite/common/bits64m63.c: testsuite/common/bits-gen$(EXEEXT) testsuite/commo
@SIM_ENABLE_ARCH_cr16_TRUE@ $(AM_V_GEN)$< >$@
@SIM_ENABLE_ARCH_cris_TRUE@$(cris_libsim_a_OBJECTS) $(cris_libsim_a_LIBADD): cris/hw-config.h
-@SIM_ENABLE_ARCH_cris_TRUE@cris/%.o: cris/%.c
-@SIM_ENABLE_ARCH_cris_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-
@SIM_ENABLE_ARCH_cris_TRUE@cris/%.o: common/%.c
@SIM_ENABLE_ARCH_cris_TRUE@ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
@SIM_ENABLE_ARCH_cris_TRUE@cris/modules.c: | $(cris_BUILD_OUTPUTS)
diff --git a/sim/cris/local.mk b/sim/cris/local.mk
index 912ca12a32f..3950baed7a1 100644
--- a/sim/cris/local.mk
+++ b/sim/cris/local.mk
@@ -47,9 +47,6 @@ $(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h
noinst_LIBRARIES += %D%/libsim.a
-%D%/%.o: %D%/%.c
- $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-
%D%/%.o: common/%.c
$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
</cut>
After glibc-2.36.9000-435-g569cfcc6bf commit 569cfcc6bf35c28112ca8d7112e9eb4a22bed5b8
Author: Samuel Thibault <samuel.thibault(a)ens-lyon.org>
hurd: Fix _NOFLSH value
the following benchmarks slowed down by more than 3%:
- 459.GemsFDTD failed to build
- 436.cactusADM failed to build
Below reproducer instructions can be used to re-build both "first_bad" and "last_good" cross-toolchains used in this bisection. Naturally, the scripts will fail when triggerring benchmarking jobs if you don\'t have access to Linaro TCWG CI.
For your convenience, we have uploaded tarballs with pre-processed source and assembly files at:
- First_bad save-temps: $FIRST_BAD_ARTIFACTS/save-temps/
- Last_good save-temps: $LAST_GOOD_ARTIFACTS/save-temps/
- Baseline save-temps: $BASELINE_ARTIFACTS/save-temps/
Configuration:
- Benchmark: SPEC CPU2006
- Toolchain: GCC + Glibc + GNU Linker
- Version: all components were built from their tip of trunk
- Target: aarch64-linux-gnu
- Compiler flags: -O3 -flto
- Hardware:
This benchmarking CI is work-in-progress, and we welcome feedback and suggestions at linaro-toolchain(a)lists.linaro.org . In our improvement plans is to add support for SPEC CPU2017 benchmarks and provide "perf report/annotate" data behind these reports.
THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
For latest status see comments in https://linaro.atlassian.net/browse/GNU-692 .
Status of glibc-2.36.9000-435-g569cfcc6bf commit for tcwg_bmk-code_speed-spec2k6:
commit 569cfcc6bf35c28112ca8d7112e9eb4a22bed5b8
Author: Samuel Thibault <samuel.thibault(a)ens-lyon.org>
Date: Sun Jan 15 20:54:42 2023 +0100
hurd: Fix _NOFLSH value
shifting 1 (thus an integer) left 31 bit is undefined behavior. We have to
make it an unsigned integer to properly get 0x80000000 (like done in other
places).
* gnu-aarch64-master-O3_LTO
** After glibc-2.36.9000-435-g569cfcc6bf commit 569cfcc6bf35c28112ca8d7112e9eb4a22bed5b8
** Author: Samuel Thibault <samuel.thibault(a)ens-lyon.org>
**
** hurd: Fix _NOFLSH value
**
** the following benchmarks slowed down by more than 3%:
** - 459.GemsFDTD failed to build
** - 436.cactusADM failed to build
** https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3…
Bad build: https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3…
Good build: https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3…
Reproduce current build:
<cut>
mkdir -p investigate-glibc-569cfcc6bf35c28112ca8d7112e9eb4a22bed5b8
cd investigate-glibc-569cfcc6bf35c28112ca8d7112e9eb4a22bed5b8
# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests for bad and good builds
mkdir -p bad/artifacts good/artifacts
curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3… --fail
curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_bmk-code_speed-spec2k6-gnu-aarch64-master-O3… --fail
# Reproduce bad build
(cd bad; ../jenkins-scripts/tcwg_bmk-build.sh ^^ true %%rr[top_artifacts] artifacts)
# Reproduce good build
(cd good; ../jenkins-scripts/tcwg_bmk-build.sh ^^ true %%rr[top_artifacts] artifacts)
</cut>
Full commit (up to 1000 lines):
<cut>
commit 569cfcc6bf35c28112ca8d7112e9eb4a22bed5b8
Author: Samuel Thibault <samuel.thibault(a)ens-lyon.org>
Date: Sun Jan 15 20:54:42 2023 +0100
hurd: Fix _NOFLSH value
shifting 1 (thus an integer) left 31 bit is undefined behavior. We have to
make it an unsigned integer to properly get 0x80000000 (like done in other
places).
---
bits/termios.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bits/termios.h b/bits/termios.h
index ae62d00853..4439c2f14e 100644
--- a/bits/termios.h
+++ b/bits/termios.h
@@ -246,7 +246,7 @@ struct termios
# define NOKERNINFO (1 << 25) /* Disable VSTATUS. */
# define PENDIN (1 << 29) /* Retype pending input (state). */
#endif
-#define _NOFLSH (1 << 31) /* Disable flush after interrupt. */
+#define _NOFLSH (1U << 31) /* Disable flush after interrupt. */
#define NOFLSH _NOFLSH
/* Control characters. */
</cut>
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- Fixed a regression found when preparing the new patches. Rebased on the
current mainline branch and continued preparing patches for upstream
submission.
# Misc
- Found a minor problem with a script in upstream GDB. Submitted and
committed a quick patch¹ to fix it.
--
Thiago
¹ https://inbox.sourceware.org/gdb-patches/20230111174501.3699871-1-thiago.ba…
Progress:
* UM-2 [QEMU upstream maintainership]
- another round of patch review and a pull request
* QEMU-471 [QEMU ARM v9.0 Baseline CPU for TCG]
- Made some useful progress with the FEAT_FGT implementation
-- PMM
* A couple of attempts at minimizing arm per-cpu init work.
I've posted a short/medium-term solution for the lookup issue,
so that we can re-apply Alex's CPUState unrealize patch.
* TCG patch queue flushed, including call abi reorg.
- Rebase TCGv_i128 patch set
- Rebase goto_tb race condition patch set
r~
Project Stratos
===============
vhost-device maintainer effort ([UM-196])
- a few version bump reviews
Plugin register access ([QEMU-495])
===================================
- posted [PATCH v2 00/21] gdbstub: re-organise to for better
compilation behaviour Message-Id:
<20230105164320.2164095-1-alex.bennee(a)linaro.org>
[QEMU-495] <https://linaro.atlassian.net/browse/QEMU-495>
QEMU Upstream Work ([UM-2])
===========================
- posted [RFC PATCH] docs: add some details about compilation units to
coding style Message-Id:
<20230103104758.767266-1-alex.bennee(a)linaro.org>
- posted [RFC PATCH] target/arm: fix handling of HLT semihosting in
system mode Message-Id:
<20230105114304.2017493-1-alex.bennee(a)linaro.org>
- posted [RFC PATCH] testing: probe gdb for supported architectures
ahead of time Message-Id:
<20230105181533.2235792-1-alex.bennee(a)linaro.org>
- posted [PATCH v2] scripts/ci: update gitlab-runner playbook to use
latest runner Message-Id:
<20230106152338.2599827-1-alex.bennee(a)linaro.org>
[UM-2] <https://linaro.atlassian.net/browse/UM-2>
Completed Reviews [5/5]
=======================
[PATCH] semihosting: Write back semihosting data before completion callback
Message-Id: <20221012014822.1242170-1-keithp(a)keithp.com>
[PATCH] semihosting: Write back semihosting data before completion callback
Message-Id: <20221012014822.1242170-1-keithp(a)keithp.com>
[PATCH v2] semihosting: add O_BINARY flag in host_open for NT compatibility
Message-Id: <20230106102018.20520-1-eiakovlev(a)linux.microsoft.com>
[PATCH] linux-user: fix bug about incorrect base addresss of idt and gdt on i386 and x86_64
Message-Id: <75da8346.1fd34.1856e0d08ef.Coremail.fanwj(a)mail.ustc.edu.cn>
[PATCH v2 0/1] tcg: add perfmap and jitdump
Message-Id: <20221114161321.3364875-1-iii(a)linux.ibm.com>
Other
=====
- bit of travel forecasting
Current Review Queue
====================
TODO [RFC PATCH 00/40] Toward class init of cpu features
Message-Id: <20230103181646.55711-1-richard.henderson(a)linaro.org>
=========================================================================================================================
TODO [RFC PATCH v6] virtio-video: Add virtio video device specification
Message-Id: <20221208072325.2259940-1-acourbot(a)chromium.org>
===================================================================================================================================
TODO [RFC PATCH kvmtool v1 00/32] Add support for restricted guest memory in kvmtool
Message-Id: <20221202174417.1310826-1-tabba(a)google.com>
===========================================================================================================================================
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
Progress (short week, 2 days):
* UM-2 [QEMU upstream maintainership]
- Pretty much entirely trying to catch up with the code review
backlog that had built up over the holidays. Got it down from
35 items to 7...
Absences:
* NB: I work a 4 day week, excluding Wednesdays
* Apr 26 -- 28 : Linaro Connect (London)
In office (provisional; let me know if you have preferences!):
* week of the 9 Jan
-- PMM
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- Identified a regression on systems that do not support SVE. Debugged it
and now working on a fix.
--
Thiago
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- Finished implementing the new approach of sending new XML target
descriptions through the wire.
- Fixed a couple of minor regressions I introduced and rebased the code
on the current main branch.
- Now preparing the patches for submitting upstream.
# Community participation
- Reviewed mailing list patch “[PATCH] [AArch64] Enable pointer
authentication support for aarch64 bare metal/kernel mode addresses”.
--
Thiago
Project Stratos
===============
- started reviewing [PATCH v9 0/8] KVM: mm: fd-based approach for
supporting KVM Message-Id:
<20221025151344.3784230-1-chao.p.peng(a)linux.intel.com>
- trying to assess if user-space facing solution for memory sharing
- writing up a [proposal for an API]
[proposal for an API]
<https://docs.google.com/document/d/18ijlX2Lguejyo3BV8Tri5Y_d1SmozocBIk2ajgq…>
vhost-device maintainer effort ([UM-196])
- debugged regression in virtio-vsock and QEMU
- should have some error message patches to post
- QEMU 7.2 shipped with stubs for virtio-gpio and virtio-i2c
[UM-196] <https://linaro.atlassian.net/browse/UM-196>
Single Binary ([QEMU-487])
==========================
- posted [PATCH for 8.0 v5 00/20] use MemTxAttrs to avoid current_cpu
in hw/ Message-Id: <20221111182535.64844-1-alex.bennee(a)linaro.org>
[QEMU-487] <https://linaro.atlassian.net/browse/QEMU-487>
Plugin register access ([QEMU-495])
===================================
- While experimenting with [the register API] ran into issues
integrating to gdbstub
- started a [re-factor] to make the process less painful
- posted [PATCH v1 00/10] split user and system code in gdbstub
Message-Id: <20221216112206.3171578-1-alex.bennee(a)linaro.org>
[QEMU-495] <https://linaro.atlassian.net/browse/QEMU-495>
[the register API]
<https://github.com/stsquad/qemu/tree/introspection/registers>
[re-factor] <https://github.com/stsquad/qemu/tree/gdbstub/next>
QEMU Upstream Work ([UM-2])
===========================
- posted [PULL 0/6] testing updates Message-Id:
<20221221144019.2149905-1-alex.bennee(a)linaro.org>
- posted [PATCH 00/11] gitdm metadata updates Message-Id:
<20221219121914.851488-1-alex.bennee(a)linaro.org>
[UM-2] <https://linaro.atlassian.net/browse/UM-2>
Completed Reviews [5/5]
=======================
[QEMU][PATCH v2 00/11] Introduce xenpv machine for arm architecture
Message-Id: <20221202030003.11441-1-vikram.garhwal(a)amd.com>
[PATCH] configure: Fix check-tcg not executing any tests
Message-Id: <20221207082309.9966-1-quic_mthiyaga(a)quicinc.com>
[PATCH v4 00/27] tcg misc patches
Message-Id: <20221213212541.1820840-1-richard.henderson(a)linaro.org>
[PATCH v3 0/8] accel/tcg: Rewrite user-only vma tracking
Message-Id: <20221209051914.398215-1-richard.henderson(a)linaro.org>
[PATCH-for-8.0 0/5] accel/tcg: Restrict page_collection structure to system TB maintainance
Message-Id: <20221209093649.43738-1-philmd(a)linaro.org>
Absences
========
Christmas holidays - merry Christmas!
Current Review Queue
====================
TODO [RFC PATCH v6] virtio-video: Add virtio video device specification
Message-Id: <20221208072325.2259940-1-acourbot(a)chromium.org>
===================================================================================================================================
TODO [RFC PATCH kvmtool v1 00/32] Add support for restricted guest memory in kvmtool
Message-Id: <20221202174417.1310826-1-tabba(a)google.com>
===========================================================================================================================================
TODO [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM
Message-Id: <20221202061347.1070246-1-chao.p.peng(a)linux.intel.com>
====================================================================================================================================
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
Progress:
* UM-2 [QEMU upstream maintainership]
- I'm now back on merging duty for the 8.0 release cycle, so some
time spent on pull request processing
- Sent pull requests with accumulated arm and reset-refactoring
patches from the freeze period
- Trying to cut down my code review backlog before the holidays
-- PMM
# [GNU-767] Support changing SVE vector length in remote debugging
- Patches to gdbserver to support changing the SVE vector length: About
halfway through implementing the new approach of sending new XML
target descriptions through the wire.
# Misc
- Experimented with using a GDB wrapper to run the testsuite. Came up
with a small patch that fixes the tests that fail when using the
wrapper.
--
Thiago
Failure after basepoints/gcc-13-4618-g17ae956c0fa: AArch64: Support new tbranch optab.:
Results changed to
-10
# build_abe binutils:
-9
# build_abe stage1:
-5
# build_abe qemu:
-2
# linux_n_obj:
7572
# First few build errors in logs:
# 00:10:43 drivers/gpu/drm/v3d/v3d_perfmon.c:57:1: internal compiler error: in decompose, at rtl.h:2288
# 00:10:44 make[5]: *** [scripts/Makefile.build:250: drivers/gpu/drm/v3d/v3d_perfmon.o] Error 1
# 00:10:53 make[4]: *** [scripts/Makefile.build:502: drivers/gpu/drm/v3d] Error 2
# 00:13:52 drivers/media/mc/mc-device.c:198:1: internal compiler error: in decompose, at rtl.h:2288
# 00:13:53 make[4]: *** [scripts/Makefile.build:250: drivers/media/mc/mc-device.o] Error 1
# 00:13:57 make[3]: *** [scripts/Makefile.build:502: drivers/media/mc] Error 2
# 00:15:27 make[2]: *** [scripts/Makefile.build:502: drivers/media] Error 2
# 00:17:50 make[3]: *** [scripts/Makefile.build:502: drivers/gpu/drm] Error 2
# 00:17:50 make[2]: *** [scripts/Makefile.build:502: drivers/gpu] Error 2
# 00:17:50 make[1]: *** [scripts/Makefile.build:502: drivers] Error 2
from
-10
# build_abe binutils:
-9
# build_abe stage1:
-5
# build_abe qemu:
-2
# linux_n_obj:
8625
# linux build successful:
all
# linux boot successful:
boot
THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.
For latest status see comments in https://linaro.atlassian.net/browse/GNU-680 .
Status of basepoints/gcc-13-4618-g17ae956c0fa commit for tcwg_kernel:
commit 17ae956c0fa6baac3d22764019d5dd5ebf5c2b11
Author: Tamar Christina <tamar.christina(a)arm.com>
Date: Mon Dec 12 15:18:56 2022 +0000
AArch64: Support new tbranch optab.
This implements the new tbranch optab for AArch64.
we cannot emit one big RTL for the final instruction immediately.
The reason that all comparisons in the AArch64 backend expand to separate CC
compares, and separate testing of the operands is for ifcvt.
The separate CC compare is needed so ifcvt can produce csel, cset etc from the
compares. Unlike say combine, ifcvt can not do recog on a parallel with a
clobber. Should we emit the instruction directly then ifcvt will not be able
to say, make a csel, because we have no patterns which handle zero_extract and
compare. (unlike combine ifcvt cannot transform the extract into an AND).
While you could provide various patterns for this (and I did try) you end up
with broken patterns because you can't add the clobber to the CC register. If
you do, ifcvt recog fails.
i.e.
int
f1 (int x)
{
if (x & 1)
return 1;
return x;
}
We lose csel here.
Secondly the reason the compare with an explicit CC mode is needed is so that
ifcvt can transform the operation into a version that doesn't require the flags
to be set. But it only does so if it know the explicit usage of the CC reg.
For instance
int
foo (int a, int b)
{
return ((a & (1 << 25)) ? 5 : 4);
}
Doesn't require a comparison, the optimal form is:
foo(int, int):
ubfx x0, x0, 25, 1
add w0, w0, 4
ret
and no compare is actually needed. If you represent the instruction using an
ANDS instead of a zero_extract then you get close, but you end up with an ands
followed by an add, which is a slower operation.
gcc/ChangeLog:
* config/aarch64/aarch64.md (*tb<optab><mode>1): Rename to...
(*tb<optab><ALLI:mode><GPI:mode>1): ... this.
(tbranch_<code><mode>4): New.
* config/aarch64/iterators.md(ZEROM, zerom): New.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/tbz_1.c: New test.
* gnu-master-aarch64-mainline-defconfig
** Failure after basepoints/gcc-13-4618-g17ae956c0fa: AArch64: Support new tbranch optab.:
** https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-master-aarch64-mainline…
Bad build: https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-master-aarch64-mainline…
Good build: https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-master-aarch64-mainline…
Reproduce current build:
<cut>
mkdir -p investigate-gcc-17ae956c0fa6baac3d22764019d5dd5ebf5c2b11
cd investigate-gcc-17ae956c0fa6baac3d22764019d5dd5ebf5c2b11
# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts
# Fetch manifests for bad and good builds
mkdir -p bad/artifacts good/artifacts
curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-master-aarch64-mainline… --fail
curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_kernel-gnu-build-gnu-master-aarch64-mainline… --fail
# Reproduce bad build
(cd bad; ../jenkins-scripts/tcwg_kernel-build.sh ^^ true %%rr[top_artifacts] artifacts)
# Reproduce good build
(cd good; ../jenkins-scripts/tcwg_kernel-build.sh ^^ true %%rr[top_artifacts] artifacts)
</cut>
Full commit (up to 1000 lines):
<cut>
commit 17ae956c0fa6baac3d22764019d5dd5ebf5c2b11
Author: Tamar Christina <tamar.christina(a)arm.com>
Date: Mon Dec 12 15:18:56 2022 +0000
AArch64: Support new tbranch optab.
This implements the new tbranch optab for AArch64.
we cannot emit one big RTL for the final instruction immediately.
The reason that all comparisons in the AArch64 backend expand to separate CC
compares, and separate testing of the operands is for ifcvt.
The separate CC compare is needed so ifcvt can produce csel, cset etc from the
compares. Unlike say combine, ifcvt can not do recog on a parallel with a
clobber. Should we emit the instruction directly then ifcvt will not be able
to say, make a csel, because we have no patterns which handle zero_extract and
compare. (unlike combine ifcvt cannot transform the extract into an AND).
While you could provide various patterns for this (and I did try) you end up
with broken patterns because you can't add the clobber to the CC register. If
you do, ifcvt recog fails.
i.e.
int
f1 (int x)
{
if (x & 1)
return 1;
return x;
}
We lose csel here.
Secondly the reason the compare with an explicit CC mode is needed is so that
ifcvt can transform the operation into a version that doesn't require the flags
to be set. But it only does so if it know the explicit usage of the CC reg.
For instance
int
foo (int a, int b)
{
return ((a & (1 << 25)) ? 5 : 4);
}
Doesn't require a comparison, the optimal form is:
foo(int, int):
ubfx x0, x0, 25, 1
add w0, w0, 4
ret
and no compare is actually needed. If you represent the instruction using an
ANDS instead of a zero_extract then you get close, but you end up with an ands
followed by an add, which is a slower operation.
gcc/ChangeLog:
* config/aarch64/aarch64.md (*tb<optab><mode>1): Rename to...
(*tb<optab><ALLI:mode><GPI:mode>1): ... this.
(tbranch_<code><mode>4): New.
* config/aarch64/iterators.md(ZEROM, zerom): New.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/tbz_1.c: New test.
---
gcc/config/aarch64/aarch64.md | 33 ++++++++---
gcc/config/aarch64/iterators.md | 2 +
gcc/testsuite/gcc.target/aarch64/tbz_1.c | 95 ++++++++++++++++++++++++++++++++
3 files changed, 122 insertions(+), 8 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 896b6a8ac79..d749c98eef6 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -947,12 +947,29 @@
(const_int 1)))]
)
-(define_insn "*tb<optab><mode>1"
+(define_expand "tbranch_<code><mode>3"
[(set (pc) (if_then_else
- (EQL (zero_extract:DI (match_operand:GPI 0 "register_operand" "r")
- (const_int 1)
- (match_operand 1
- "aarch64_simd_shift_imm_<mode>" "n"))
+ (EQL (match_operand:ALLI 0 "register_operand")
+ (match_operand 1 "aarch64_simd_shift_imm_<mode>"))
+ (label_ref (match_operand 2 ""))
+ (pc)))]
+ ""
+{
+ rtx bitvalue = gen_reg_rtx (<ZEROM>mode);
+ rtx reg = gen_lowpart (<ZEROM>mode, operands[0]);
+ rtx val = GEN_INT (1UL << UINTVAL (operands[1]));
+ emit_insn (gen_and<zerom>3 (bitvalue, reg, val));
+ operands[1] = const0_rtx;
+ operands[0] = aarch64_gen_compare_reg (<CODE>, bitvalue,
+ operands[1]);
+})
+
+(define_insn "*tb<optab><ALLI:mode><GPI:mode>1"
+ [(set (pc) (if_then_else
+ (EQL (zero_extract:GPI (match_operand:ALLI 0 "register_operand" "r")
+ (const_int 1)
+ (match_operand 1
+ "aarch64_simd_shift_imm_<ALLI:mode>" "n"))
(const_int 0))
(label_ref (match_operand 2 "" ""))
(pc)))
@@ -963,15 +980,15 @@
{
if (get_attr_far_branch (insn) == 1)
return aarch64_gen_far_branch (operands, 2, "Ltb",
- "<inv_tb>\\t%<w>0, %1, ");
+ "<inv_tb>\\t%<ALLI:w>0, %1, ");
else
{
operands[1] = GEN_INT (HOST_WIDE_INT_1U << UINTVAL (operands[1]));
- return "tst\t%<w>0, %1\;<bcond>\t%l2";
+ return "tst\t%<ALLI:w>0, %1\;<bcond>\t%l2";
}
}
else
- return "<tbz>\t%<w>0, %1, %l2";
+ return "<tbz>\t%<ALLI:w>0, %1, %l2";
}
[(set_attr "type" "branch")
(set (attr "length")
diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md
index d10cf93572e..a521dbde1ec 100644
--- a/gcc/config/aarch64/iterators.md
+++ b/gcc/config/aarch64/iterators.md
@@ -1107,6 +1107,8 @@
;; Give the number of bits in the mode
(define_mode_attr sizen [(QI "8") (HI "16") (SI "32") (DI "64")])
+(define_mode_attr ZEROM [(QI "SI") (HI "SI") (SI "SI") (DI "DI")])
+(define_mode_attr zerom [(QI "si") (HI "si") (SI "si") (DI "di")])
;; Give the ordinal of the MSB in the mode
(define_mode_attr sizem1 [(QI "#7") (HI "#15") (SI "#31") (DI "#63")
diff --git a/gcc/testsuite/gcc.target/aarch64/tbz_1.c b/gcc/testsuite/gcc.target/aarch64/tbz_1.c
new file mode 100644
index 00000000000..39deb58e278
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tbz_1.c
@@ -0,0 +1,95 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O2 -std=c99 -fno-unwind-tables -fno-asynchronous-unwind-tables" } */
+/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */
+
+#include <stdbool.h>
+
+void h(void);
+
+/*
+** g1:
+** tbnz w[0-9]+, #?0, .L([0-9]+)
+** ret
+** ...
+*/
+void g1(bool x)
+{
+ if (__builtin_expect (x, 0))
+ h ();
+}
+
+/*
+** g2:
+** tbz w[0-9]+, #?0, .L([0-9]+)
+** b h
+** ...
+*/
+void g2(bool x)
+{
+ if (__builtin_expect (x, 1))
+ h ();
+}
+
+/*
+** g3_ge:
+** tbnz w[0-9]+, #?31, .L[0-9]+
+** b h
+** ...
+*/
+void g3_ge(int x)
+{
+ if (__builtin_expect (x >= 0, 1))
+ h ();
+}
+
+/*
+** g3_gt:
+** cmp w[0-9]+, 0
+** ble .L[0-9]+
+** b h
+** ...
+*/
+void g3_gt(int x)
+{
+ if (__builtin_expect (x > 0, 1))
+ h ();
+}
+
+/*
+** g3_lt:
+** tbz w[0-9]+, #?31, .L[0-9]+
+** b h
+** ...
+*/
+void g3_lt(int x)
+{
+ if (__builtin_expect (x < 0, 1))
+ h ();
+}
+
+/*
+** g3_le:
+** cmp w[0-9]+, 0
+** bgt .L[0-9]+
+** b h
+** ...
+*/
+void g3_le(int x)
+{
+ if (__builtin_expect (x <= 0, 1))
+ h ();
+}
+
+/*
+** g5:
+** mov w[0-9]+, 65279
+** tst w[0-9]+, w[0-9]+
+** beq .L[0-9]+
+** b h
+** ...
+*/
+void g5(int x)
+{
+ if (__builtin_expect (x & 0xfeff, 1))
+ h ();
+}
</cut>
# [GNU-767] Support changing SVE vector length in remote debugging
- Patches to gdbserver to support changing the SVE vector length: There
was an upstream discussion about whether changing the implementation
from relying on expedited registers to relying on sending target
descriptions over the wire was a better approach. Simon Marchi
detailed his idea on how to do that and it does seem better.
- Started implementing Simon's approach of sending target descriptions
over the wire for each thread.
# Misc
- Sent and later committed a couple of patches¹ fixing whitespace issues
in a Python script that generates a GDB source file.
--
Thiago
¹ https://inbox.sourceware.org/gdb-patches/20221202192200.405379-1-thiago.bau…
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- v2 of the gdbserver patches to support changing the SVE vector length
was quickly reviewed by both Luis and Simon Marchi. I applied their
review suggestions and I'm now working on fixing a bug with
multi-threaded programs that they spotted.
- Submitted a couple of small patches¹ fixing tab vs spaces issues in
the gdbarch.py script that generates some source code in GDB.
# Misc
- Fixed problem in the tcwg-dev/start.sh script where asking docker to
expose /dev/kvm to a dev container on a host which doesn't have KVM
support causes docker to error out (reported by David Spickett). Sent
Gerrit change request “42669: tcwg-dev: Add heuristic to check for KVM
support on the host” to fix it. David reviewed and merged it. Thanks!
--
Thiago
¹ https://inbox.sourceware.org/gdb-patches/20221202192200.405379-1-thiago.bau…
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- Worked on v2 of the gdbserver patches improving SVE support. Found a
couple of simplifications that could be made to the code. Rebased on
current master branch and finished regression testing and patch
preparation. Wrote the cover letter.
- Finally posted the patch series upstream¹.
--
Thiago
¹ https://inbox.sourceware.org/gdb-patches/20221126020452.1686509-1-thiago.ba…