Bug 1725084 - aarch64: support dumping SVE registers
Summary: aarch64: support dumping SVE registers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.1
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.1
Assignee: Andrew Jones
QA Contact: Qunfang Zhang
URL:
Whiteboard:
Depends On: 1707892
Blocks: 1677408 1707874
TreeView+ depends on / blocked
 
Reported: 2019-06-28 11:33 UTC by Andrew Jones
Modified: 2020-05-05 09:46 UTC (History)
5 users (show)

Fixed In Version: qemu-kvm-4.2.0-8.module+el8.2.0+5607+dc756904
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:46:33 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
program to load sve vectors (2.31 KB, text/x-csrc)
2020-03-06 17:37 UTC, Andrew Jones
no flags Details

Description Andrew Jones 2019-06-28 11:33:28 UTC
QEMU's dump-guest-memory should handle SVE registers when SVE is enabled in the guest. target/arm/arch_dump.c needs to be extended for this. This enables 'virsh dump' to work properly for an SVE-enabled guest.

Comment 1 Andrew Jones 2019-11-05 11:01:58 UTC
I posted[*] this a while back, and it's been reviewed. Just waiting on more review and merge now.

[*] https://patchwork.kernel.org/patch/11193797/

Comment 2 Andrew Jones 2020-01-24 08:17:35 UTC
This is now upstream: 538baab245ca ("target/arm/arch_dump: Add SVE notes")

Comment 6 Ademar Reis 2020-02-05 22:59:53 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 7 Andrew Jones 2020-03-06 17:37:08 UTC
Created attachment 1668177 [details]
program to load sve vectors

This bug may be moved to VERIFIED.

Version tested: qemu-kvm-4.2.0-12.module+el8.2.0+5858+afd073bc.aarch64

Verification steps
------------------

1) Get host notes

(On a host that supports at least 64 byte SVE vectors)

# ulimit -c unlimited
# echo kcore > /proc/sys/kernel/core_pattern
# ./v 64 &
# kill -s SIGSEGV <pid-of-v>
# readelf -n kcore.<pid-of-v>

(repeat above for './v 32' and './v 0')

2) Get guest notes
   a) boot guest with sve enabled and with the same vector lengths as the host
   b) on guest run ./v 64
   c) on host run 'virsh dump --memory-only $GUEST guest-dump-64'
   d) on guest stop ./v with ^C
   e) on host 'readelf -n guest-dump-64'

(repeat above for './v 32' and './v 0')

3) Collect the note description data of the 0x405 (Unknown note type: (0x00000405)) ELF notes for all the runs

4) Compare the data for the same run types, e.g. 'diff kcore-64.405-data guest-dump-64.405-data'

All comparisons should match, i.e. the ELF note generated by QEMU for SVE vectors should match the ELF note generated by the kernel for the same vector use.

With qemu-kvm-4.2.0-12.module+el8.2.0+5858+afd073bc.aarch64 this test PASSed.

Comment 8 Qunfang Zhang 2020-03-08 12:17:13 UTC
Thanks Drew!

Comment 10 errata-xmlrpc 2020-05-05 09:46:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2017


Note You need to log in before you can comment on or make changes to this bug.