QEMU Tooling ([VIRT-252])
=========================
QEMU plugin support ([VIRT-280])
- feature now merged in 4.2
- closed out a bunch of related JIRA cards
- posted {PATCH} tcg plugins: expose an API version concept
Message-Id: <20191104131836.12566-1-alex.bennee(a)linaro.org>
- requested by Peter before hardfreeze
Extend gdbstub for SVE ([VIRT-281])
- got a [working prototype]
- probably need a little core gdbstub re-factor before posting RFC
[VIRT-281] https://projects.linaro.org/browse/VIRT-281
[working prototype]
https://github.com/stsquad/qemu/tree/gdbstub/sve-registers
Upstream Work ([VIRT-109])
==========================
- posted {PULL v3 00/15} testing updates Message-Id:
<20191025193709.28783-1-alex.bennee(a)linaro.org>
- had to drop NetBSD autobuild (again)
[VIRT-109] https://projects.linaro.org/browse/VIRT-109
[branch]
https://github.com/stsquad/qemu/tree/testing/docker-multiarch-refactor
[testing/next] https://github.com/stsquad/qemu/tree/testing/next
Other Activities
================
- Presented at KVM Forum
- went down well, made a number of contacts who are interested
- A bunch of discussion on Hexagon
- More detailed write-up to follow
Completed Reviews [4/4]
=======================
{PATCH 0/5} travis.yml improvements: Update libraries, build with arm64
Message-Id: <20191009170701.14756-1-thuth(a)redhat.com>
- CLOSING NOTE [2019-10-18 Fri 19:04]
Pulled some bits into testing/next
Added: <2019-10-09 Wed>
{PATCH} Semihost SYS_READC implementation (v4)
Message-Id: <20191024224622.12371-1-keithp(a)keithp.com>
{PATCH v2 0/4} target/arm: Support for Data Cache Clean up to PoP
Message-Id: <CADSWDztHetgmbUOp4WyRAkR0daAG6kkwhUTcyKWiCTWHQ1XB=w(a)mail.gmail.com>
{PATCH 0/4} Make the qemu_logfile handle thread safe.
Message-Id: <20191107142613.2379-1-robert.foley(a)linaro.org>
Absences
========
- KVM Forum Oct 29th-Nov 1st
Current Review Queue
====================
* {PATCH v7 0/8} Acceptance test: Add "boot_linux" acceptance test
Message-Id: <20191104151323.9883-1-crosa(a)redhat.com>
Added: <2019-11-04 Mon>
* {RFC 0/3} tests/vhost-user-fs-test: add vhost-user-fs test case
Message-Id: <20191025100152.6638-1-stefanha(a)redhat.com>
Added: <2019-10-25 Fri>
* {PATCH v5 00/22} target/arm: Implement ARMv8.5-MemTag, system mode
Message-Id: <20191011134744.2477-1-richard.henderson(a)linaro.org>
Added: <2019-10-11 Fri>
* {PATCH v4 0/9} target/arm/kvm: enable SVE in guests
Message-Id: <20190924113105.19076-1-drjones(a)redhat.com>
Added: <2019-09-24 Tue>
--
Alex Bennée
Morello
- Started to document the LLD implementation.
- Implemented CHERI concentrate alignment for the important sections.
- Dynamic linking is feature complete, but not finished yet, still Todo:
-- More test cases for the various different combinations.
-- Refactor to clean up the implementation.
-- Rebase all the patches to remove the false starts.
-- Update the documentation I've just started as it is already out of date.
-- Not looked at ifunc or TLS yet.
llvm-mc
Some review on MC patch to allow limited symbolic computation when
evaluating .if
Progress / KVM Forum trip report:
* As usual, we held the QEMU Summit at the same time as the forum;
this is an hour-or-two invitation only meeting of the top 20 or
so maintainers/submaintainers, discussing process and other project
issues. A proper summary/writeup of the minutes will be posted to
qemu-devel later, but IMHO this year the most interesting topics were:
- Spreading the load of managing pull request merges; currently
I do this with the aid of some hand-hacked scripts. To be able
to spread this work among more people we need to replace that
with a more maintained and standardized CI/testing setup. RedHat
have agreed to provide some people to work on at least the initial
setup part of this, and we got some consensus that the approach to
take was to use Gitlab with some custom 'runners' to handle the
'build/test on aarch64/ppc/s390x/etc' parts.
- We talked about the project's general stance on 'plugin' interfaces;
which can be controversial both because they commit us to maintaining
a stable API/ABI and because they have the potential to be used to
work around the GPL (eg proprietary device models). We plan to
write up some guidelines here (mostly just writing down the
existing consensus).
- We also talked (again) about our handling of security issues and
CVEs. My impression is that there are some parts of this that
people aren't hugely happy with but that nobody has the time/effort to
try to improve things (eg better documentation/tracking of issues,
more prompt upstream point releases with security fixes), so things
are likely to stay about as they are now.
* Interesting talks (videos are being uploaded to:
https://www.youtube.com/channel/UCRCSQmAOh7yzgheq-emy1xA ):
- 'The Hype Around the RISC-V Hypervisor' : the RISC-V architecture's
hypervisor extension isn't completely finalized yet, but it's far
enough advanced that KVM support and also QEMU emulation of it have
been written. An amusing sign of the architecture's academic
underpinnings is that this first version doesn't have any hardware
acceleration of the interrupt controller, but does have full
nested-virtualization support.
- 'ZERO: Next Generation Virtualization Platform for Huawei Cloud':
Huawei describe hardware for a cloud environment which offloads
as much as possible of the hypervisor work to custom I/O cards
and a custom silicon cloud-control device, in a general approach
that's probably familiar to anybody who watched the Amazon Nitro
presentation from the other year.
- 'What's Going On? Taking Advantage of TCG's Total System Awareness':
Alex Bennée's talk on the introspection plugin work we've been doing
in Linaro (and which will be in QEMU 4.2).
- 'Playing Lego with Virtualization Components':
description of the Rust 'rust-vmm' set of libraries intended to
provide useful building blocks for putting together virtual machine
managers (like Firecracker, crosvm). Basically similar content to
a presentation they did for Cambridge University earlier this year,
but this talk's been recorded so is good if you weren't in the audience
the first time around.
* And as always the in-person networking is valuable:
- Oracle have a "split device emulation into separate processes" idea
that's alarmingly invasive of the source code, but Stefan came up
with an approach that might let them do what they need without making
the source code harder to work with for the rest of us.
- Met the RedHat person who's going to do the CI-for-pullreqs work
(see QEMU Summit item earlier) : getting this unstalled was probably
the most useful concrete outcome of the conference
- Finally met Aurelien Jarno (a longstanding hobbyist contributor
to QEMU who usually can't attend these conferences)
* While at the conference Drew and I managed to finally get the
SVE support for KVM guests into master (the last hurdle was an awkward
test failure on the aarch32-compat-on-aarch64-kernel setup I happen
to use as one of my build test environments; we don't care about whether
KVM really works in this setup but we need 'make check' to not fail)
* Also managed to fit in some wrangling of pull requests; the timing
of the 4.2 release unfortunately put softfreeze on the Tuesday
before the conference and rc0 on the Tuesday afterwards; rc0
ended up being postponed a couple of days as a consequence.
thanks
-- PMM
Linaro
- On buildbot monitoring duty, relatively quiet week with just a
couple of fairly simple to diagnose problems to report.
Morello
- Dynamic linking progressing albeit slowly.
-- Trying to work out the requirements from existing documents and
implementation.
-- Have some simple cases doing mostly the right thing and have
written some tests.
-- Will need to rewrite to move calculations earlier in the link-step.
-- Morello is quite different from Cheri in this regard so I have had
to diverge much more from the implementation.
Tree:
https://github.com/rth7680/qemu.git tgt-arm-vhe-5
Testcase:
qemu-test:~rth/linux/initramfs-min.cpio.gz
The host kernel could be anything, but I've been using
the same Image.gz that is inside the cpio archive.
./aarch64-softmmu/qemu-system-aarch64 -m 4G \
-M virt,virtualization=on,gic-version=max -cpu max \
-kernel Image.gz -initrd initramfs-min.cpio.gz
At the shell prompt, ./test will run a guest kernel with kvm.
As momentarily discussed with PMM in the hallway:
As soon as the guest kernel enables interrupts,
arch_timer_starting_cpu
enable_percpu_irq
irq_percpu_enable
gic_unmask_irq
-- Incorrect exception delivery.
the GTIMER_PHYS interrupt is delivered to EL2 (seems to be ok), the host kernel
does something (haven't dug into what exactly, bug presumably setting bits that
are supposed to pass the virq to the guest), and immediately another interrupt
is delivered to EL2. Repeat.
Whether this is incorrect routing of the virq interrupt, or incorrect
masking/acking of the hard irq interrupt at EL2, I do not yet know.
PMM: I don't know the answer to either (a) or (b) as asked on hangouts. I
think (b) is correct, but I can't be sure. I'm trying to understand how (a) is
supposed to work now. In particular, I can't find any code that sets
HCR_EL2.{VI,VF}, only tests them.
r~
# Progress #
o Ramp up
* Concluded.
o Annual Review
* Attended discussions.
o Upstream GDB
* Patch reviews on gerrit.
* Answered questions.
* The state of ARM/AArch64 GDB upstream seems to be reasonable, with
a few failures here and there. Numerous failures on problematic racy
tests (gdb.threads).
o GDB:
* GNU-170 - GDB BZ #21221 - gdb hangs while stepping an empty loop
- Spent some more time on this and improve the patch further,
covering most problematic cases for "for", "while" and "do/while" loops.
* Read some documentation on setting up Fast Models for testing MVE
(Helium).
* Inspected various aspects of ARM support in GDB, like SVE, PAC and
ACLE.
# Plan #
o Annual Review
* Conclude.
o GDB:
* GNU-170 - GDB BZ #21221 - gdb hangs while stepping an empty loop
- Discuss with gcc@ a bit more about my proposed solution.
* Attempt to setup system QEMU and/or Fast Model for testing ACLE SVE
and, maybe, MVE.
== Progress ==
* Out of office 1 day
* Buildbot monitoring
- Moved the buildbots to pull from github
* Trying to setup a build environment on ex40-01
- Gave up on the tcwg-sq-01/2 boards because they seemed too unstable
* Still no access to Morello docs
* Playing with lldb python scripting
- Got a script that intercepts all calls to
VectorType::getNumElements that don't come from a getElementCount
(since that likely means that they won't be preserving the 'scalable'
property)
- This should help figure out problems spotted by the fuzzer
- Likely needs a bit more refining
== Plan ==
* More of the same
* Out of office on Friday (1 November)
== Progress ==
* GCC:
- -mpure-code on v6m: no feedback yet
* FDPIC/GDB
- problems with the board I used, it hangs shortly after or during
boot. None of the workaround/fixes suggested to me worked. Having an
stm32 qemu config would help.
* GCC upstream validation:
- reported several issues
* misc:
- infra fixes / troubleshooting / reviews
- sent 2 small qemu patches (fix vmrs support for m-profile, and add cortex-m7)
- confirmed that gcc LTO profiled bootstrap works on arm with recent
trunk, although it takes ages. Will need to try on a more powerful
board
== Next ==
* Holidays next week, back Nov 4th
* FDPIC: resume work on GDB: check the various qemu forks with stm32
board support.
Add FDPIC configuration in the GCC trunk validation.
* GCC: pure-code/v6m, handle feedback
* Binutils: support non-contiguous memory regions in linker
Progress:
* VIRT-65 [QEMU upstream maintainership]
+ lots of wrangling of patches and pulls since I'm away
next week and it's also going to be softfreeze
+ preparation for KVM Forum next week
thanks
-- PMM
Progress:
[VIRT-344 # ARMv8.5-MemTag, Memory Tagging Extension ]
Updates for user-only.
Merge bug fixes from eugeni.stepanov(a)gmail.com.
[VIRT-349 # QEMU SVE2 Supprt ]
Convert neon pmul helpers to a form that will be usable for sve2.
[VIRT-327 # Richard's upstream QEMU work ]
Pull for tcg-next.
Review plugins v5.
Update for capstone submodule.
Started reviewing multi-phase reset v5.
[Kernel]
Hacked up a patch for ARMv8.5-RNG.
r~
# Progress #
o Ramp up
* Credentials, machine access and LDAP updates done.
o Qualcomm Landing Team sunsetting
* Returned Qualcomm's Laptop.
o Upstream GDB
* Ramping up on reviews.
* Gathering data on the current state of GDB on ARM.
o GDB:
* GNU-170 - GDB BZ #21221 - gdb hangs while stepping an empty loop
- Came up with a little hack/proof-of-concept to get this fixed.
Though ugly, it seems fixing this in the front-end may make more sense,
as the information i need (source line) is easily accessible in there.
- Discussion ongoing with gcc@. GDB clearly needs the compiler to
provide more information.
* Created JIRA cards for all known pending ARM tasks for GDB, based
on Alan's and Joey's input. TODO-ed all of them for the time being.
# Plan #
o GDB:
* GNU-170 - GDB BZ #21221 - gdb hangs while stepping an empty loop
- Continue pursuing a fix.
* Prioritize GDB JIRA cards and start work on them.
[Morello]
- Got static linking support to the point that I can successfully link
with LLD the coremark, dhrystone and EEMBC from the arran-toolchain.
Not got any outstanding failures to investigate.
- Altered LLD so a linker script is no longer necessary for newlib.
- Started the process of rebasing and adding tests for all the
fixes/hacks I needed to make to the linker work.
- Aligned the base and limit of capabilities according to the incoming
CHERI concentrate scheme. Interesting question of what should a linker
do when alignment requirements on the base and limit cross section
boundaries, and what are the responsibilities for an object producer
when creating a section when the length of the capability is known at
compile time.
Planned absences:
Holiday Thursday, Friday (24th, 25th October)
Progress:
* VIRT-65 [QEMU upstream maintainership]
+ finishing off the ptimer API transition work
+ review of rth's "speed up calculation of tbflags" patchset
+ put together and sent an arm pullreq
* VIRT-350 [Update Arm KVM support in QEMU]
+ the patchset for hotpluggable RAM support is now upstream
thanks
-- PMM
== Progress ==
* GCC:
- Work on -mpure-code on v6m. Patches sent for upstream review.
* GCC upstream validation:
- reported several issues
* misc:
- infra fixes / troubleshooting / reviews
== Next ==
* FDPIC: resume work on GDB
* GCC: pure-code/v6m
* Binutils: support non-contiguous memory regions in linker
== Progress ==
* clang-tidy workshop (and associated prep)
- I think this went really well, we got good feedback from some of
the participants
* Trying to setup a build environment on tcwg-sq-02.tcwglab
- Mostly so I can deploy the SVE fuzzer there, but maybe for other things too
- All the compilers that I've tried so far are ICE-ing at some point
or another while building llvm
- Still looking into it but I'm starting to suspect there's
something fishy about this board
* Still no access to Morello docs
* Read a bit more about LLDB
* Finished annual review
== Plan ==
* Maybe THIS time I'll get access to the Morello docs next week
* If not, more SVE fuzzer
* One day off
o LLVM:
* Buildbots babysitting:
- Various breakage on the bots and in the kernel build
* Machine Outliner:
- preparing upstream submission
o Misc
* Various meetings and discussions.
== Progress ==
* GCC:
- Work on -mpure-code on v6m
* GCC upstream validation:
- reported several issues
* misc:
- infra fixes / troubleshooting / reviews
- watched a couple of GNU Cauldron presentations
== Next ==
* FDPIC: resume work on GDB
* GCC: pure-code/v6m
* Binutils: support non-contiguous memory regions in linker
[VIRT-263 # ARMv8.1-VHE Virtual Host Extensions ]
Still need to think of more test cases...
[VIRT-344 # ARMv8.5-MemTag, Memory Tagging Extension ]
Posted v5 of the system-only patch set,
with testing help from Alex.
[VIRT-327 # Richard's upstream QEMU work ]
Catching up on patch review
- arm semihosting
- tcg profiler
- ptimer transactions
- s390 mvcl interrupt
- started on v2 of dave martin's bti kernel patch set.
Posted v6 of my arm hflags patch set.
r~
== Progress ==
* Support Morello fat pointers in LLDB [LLVM-597]
- Read an intro to Cheri (research project that Morello is based on)
- Read more LLDB docs
* Started writing annual review
* Setup VM for a clang-tidy workshop that I'm co-organizing as part of
the Stockholm LLVM socials
== Plan ==
* Hopefully will get access to Morello docs next week so I can start actual work
* Rebase and play more with the SVE IR fuzzer [LLVM-586]
[VIRT-263 # ARMv8.1-VHE Virtual Host Extensions ]
Lots of work with Alex trying to produce a reduced test case.
We are now unit testing entry and exit from EL0 (EL2&0),
EL1 and EL0-in-EL1 (EL1&0).
Next would be to test the various memory access faults.
[VIRT-327 # Richard's upstream QEMU work ]
Patch review for SVE in KVM, S390 interrupt handling during MVCL.
r~