Progress:
* UM-2 [QEMU upstream maintainership]
- First week back after holiday: lots of catchup
- Good progress with the code review queue, including getting
rid of a few things that had been lurking in it for too
long, and another pass through the latest SME series
- KVM Forum programme committee work
-- PMM
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
* Debugged and fixed a few issues in my code where gdbserver was having
trouble with setting the target description for new threads. Also
fixed regressions in a couple more testcases.
# Linaro CI's GDB testsuite results
* Luis commented on IRC that the GDB testsuite results from the Linaro CI
seemed a bit high with about 540 failures, so I set out to investigate.
The two biggest sources of failures are:
1. Ada tests were failing because they can't build their test
executables. This is expected because we don't have the Ada compiler
in the CI, but normally these testcases would just bail out as
unsupported. Found out that there was a regex in the GDB testsuite
that was (IMHO) too strict for our particular setup and fixed it.
2. All CTF tests are failing. The compiler in the CI seems to be
building test executables with CTF debug info, so we do seem to have a
problem there.
The CI's GDB is also not loading libthread_db.so because of a GDB
security setting, so I fixed that as well and expect some more tests
to pass now.
I still haven't submitted my fixes for 1. to upstream and for the
libthread_db.so.1 issue to our CI scripts because I'm still working
with jenkins-scripts and Abe to reproduce the CI environment to verify
the fixes.
--
Thiago
Progress:
* UM-2 [QEMU upstream maintainership]
- This week was almost entirely code review and similar upstream tasks
- managed to review all the preliminary parts of the SME patchset
- reviewed several other refactoring series from rth
- reviewed a big PS/2 keyboard emulation refactoring patchset
- prep for KVM Forum program committee session
* QEMU-422 [QEMU Arm Neoverse V1 vCPU for TCG]
- FEAT_RASv1p1 and FEAT_DoubleFault now upstream
-- PMM
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
* Debugged and fixed issues in my code where gdbserver was in some cases
trying to read inferior registers before aarch64_target was fully
initialised, and also while the inferior thread was running. This
improved reliability but there are still some testsuite regressions to
look into.
# Sourceware bug 28561 - [gdb/testsuite] Error due to not reading \r\n
at end of mi prompt
* Posted comment to the bug report summarising my current results.
* Tried to reproduce the bug using the upstream v5.3 kernel (since I was
able to see it with openSUSE Leap's v5.3 kernel), but failed. Still
trying to understand what that implies.
--
Thiago
Progress (covers two half-weeks):
* UM-2 [QEMU upstream maintainership]
- investigating a reported bug with semihosting syscalls over gdbstub
- reviewed a massive series from RTH refactoring our SVE code
in preparation for handling SME
* QEMU-422 [QEMU Arm Neoverse V1 vCPU for TCG]
- looking at exactly what FEAT_RASv1p1 and FEAT_DoubleFault require
of a minimal RAS implementation like QEMU's
- sent a patch implementing FEAT_RASv1p1 (a no-op for QEMU)
- sent a patch implementing FEAT_DoubleFault (turns out to be
simpler than I initially feared it might be)
-- PMM
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
* Found out that one issue I was having with gdbserver was caused by an
incompatibility it has with zsh (sourceware bug 26116).
* Fixed a gdbserver crash in my code where a register set was NULL in
the target description.
* Now working on an issue where the target description says SVE isn't
supported, but the regsets information says they are. This is caused
by my code sometimes moving the first ptrace call to get the inferior
registers to a time before it is properly stopped.
# Sourceware bug 28561 - [gdb/testsuite] Error due to not reading \r\n
at end of mi prompt
* Set up a few containers and KVM guests to attempt to reproduce this
bug on different environments. Reproduced it successfully on an
openSUSE Leap 15.3 guest, as well as Ubuntu 20.04 and 22.04 containers
in said guest. I wasn't able to reproduce on Ubuntu 20.04 nor 22.04
guests. Suspecting it's a kernel issue where the fix was backported to
the Ubuntu kernels.
--
Thiago
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
- Rebased my code on current master branch.
- Ran into issues with running the GDB testsuite against gdbserver, both
on my branch and on master. Currently investigating.
- Regarding the ptrace issues I'm running into, at Richard's suggestion
I checked the errno and it's ESRCH. This means that the inferior isn't
in a state where gdbserver can fetch its registers. So maybe there's
a race condition in gdbserver itself and it's trying to do that before
the inferior is stopped. Currently investigating.
# Sourceware bug 28561 - [gdb/testsuite] Error due to not reading \r\n
at end of mi prompt
* Luis mentioned this bug so I started investigating it. Tried
reproducing it on Ubuntu 20.04 and 22.04 but without success.
Also tried setting up an openSUSE Leap 15.3 KVM guest to try to
reproduce it there, but the distro's installer hangs.
--
Thiago
Progress:
* UM-2 [QEMU upstream maintainership]
- Joint Linaro/Arm meeting on the Realm Management Extension (RME).
Mostly this was "how the software stack is going to work"; some
useful discussion on how this intersects with QEMU, both as a
potential emulation platform for software development and also
as the VMM for a realm-using KVM virtual machine.
- Kicked off a discussion thread on getting rid of the last parts
of our "ad-hoc CI" this release cycle. The main thing that's
not yet handled by Gitlab CI is FreeBSD and NetBSD hosts.
We might be able to do this if we can find an x86 Linux machine
to act as a gitlab runner (it needs to be able to run guest
BSD VMs).
* QEMU-422 [QEMU Arm Neoverse V1 vCPU for TCG]
- Several small features have now made it upstream so those
subtasks have been closed out
- Looking at FEAT_RASv1p1 and FEAT_DoubleFault. The first of these
is easy because we only model the minimal "no error records"
RAS: I think we can simply bump the ID register fields to
indicate support. The second is a little bit more interesting
because the new SCR_EL3.EASE bit means we suddenly have a
source of physical SErrors (from synchronous external aborts)
when we previously could not have any...
-- PMM
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
* Continued working on the testsuite regressions introduced by my code.
- Found out that the crash I was investigating (which happens when
gdbserver thinks that the kernel doesn't support SVE and crashes)
only occurs with kernel v5.4 from Ubuntu 20.04 and not with
Ubuntu 22.04's v5.15. In the former version,
ptrace(PTRACE_GETREGSET, …, NT_ARM_SVE, …) often returns -1 (but not
always) and gdbserver interprets this as meaning that SVE isn't
supported. The newer kernel always returns successfully from this
call. gdbserver still acts weird so there's more digging to do, but
at least it doesn't crash.
# Misc
- Took one day of vacation.
--
Thiago
Progress:
* UM-2 [QEMU upstream maintainership]
+ had a look at adding an option to allow semihosting from
userspace (handy for some test case purposes); have a working
prototype which I used to test the FEAT_IDST patch, but
probably won't pursue further until some refactoring of the
whole semihosting code has landed, to avoid conflicts
+ reading through the Realm Management Extension documentation:
there's a Linaro Kernel Working Group sprint in Cambridge
next week, and possible QEMU RME support is on the agenda
+ back before QEMU 6.0 we tried to fix a bug where QEMU always
provided 4 PMU counters, not the number the emulated CPU really
has. We had to revert that change before the 6.0 release, but
then forgot to go back and revisit it afterwards. Alex
reminded me of it this week, so I rebased it, fixed the problem
that meant it got reverted, and sent it out for review.
* QEMU-422 [QEMU Arm Neoverse V1 vCPU for TCG]
+ sent patch implementing FEAT_IDST
+ next up: FEAT_DoubleFault (likely a no-op for us, as we don't
ever have physical SErrors)
-- PMM
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
* Continued working on the testsuite regressions introduced by my code.
- Currently investigating a crash that happens when for some reason
gdbserver thinks that the kernel doesn't support SVE and crashes
while building the internal representation of the regular vector
registers.
# Misc
- Attended Google's Fuchsia boot camp.
--
Thiago
Progress:
* UM-2 [QEMU upstream maintainership]
+ tracked down the UEFI crash with KVM on AArch64 to a combination of
(a) host system was heterogenous and user hadn't restricted QEMU to
only running on one set of cores and (b) QEMU silently throws away
the error it gets from KVM in this situation, resulting in most
things seeming to work except that vcpu power on/off state isn't
written to KVM and so the guest starts with all vcpus running
instead of just the primary. We should really improve the error
handling, but I worry that that might break previously functional
setups...
+ tidied up some patches I wrote while doing the GICv4 work that
fix an odd inconsistency in our GIC emulation where we correctly
implement the right number of virtual priority bits for the CPU
but always provide 8 bits of physical priority regardless of what
the real CPU implementation should have, and sent them out for review
+ usual code review and pullreq management
* QEMU-422 [QEMU Arm Neoverse V1 vCPU for TCG]
+ Implemented support for FEAT_S2FWB and sent patches to the list
+ Next up is probably FEAT_IDST (ID space trap handling)
-- PMM
Hello,
# [GNU-767] Support changing SVE vector length in remote debugging
* Continued working on the testsuite regressions introduced by my code.
- Realised that gdbserver uses “thread->tdesc != NULL” as a proxy of
whether it has already attached to the inferior process. My change to
track the target description per-thread instead of per-process
invalidated this equivalence. Fixed a few places to use “proc->attached”
instead, which is the direct way of testing that condition.
- Now looking into an issue with gdbserver loading libthread_db.so.
# Misc
- Reviewed Tom Tromey's “[PATCH 00/36] C++-ify breakpoints” patch series¹.
Spotted one bug.
--
Thiago
¹ https://sourceware.org/pipermail/gdb-patches/2022-January/185256.html
msgid:20220118194007.2853108-1-tom@tromey.com