KVM Archive mirror
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Andrew Jones <andrew.jones@linux.dev>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
	linux-coco@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	maz@kernel.org, alexandru.elisei@arm.com, joey.gouly@arm.com,
	steven.price@arm.com, james.morse@arm.com,
	oliver.upton@linux.dev, yuzenghui@huawei.com,
	eric.auger@redhat.com, Subhasish Ghosh <subhasish.ghosh@arm.com>
Subject: Re: [kvm-unit-tests PATCH 18/33] arm: realm: Add test for FPU/SIMD context save/restore
Date: Tue, 14 May 2024 11:27:01 +0100	[thread overview]
Message-ID: <fc8b0464-7f10-4ef1-b1f5-48a708ef6efd@arm.com> (raw)
In-Reply-To: <20240510-7e7f794ddf51316b15b57113@orel>

Hi,

On 10/05/2024 16:28, Andrew Jones wrote:
> On Fri, Apr 12, 2024 at 11:33:53AM GMT, Suzuki K Poulose wrote:
>> From: Subhasish Ghosh <subhasish.ghosh@arm.com>
>>
>> Test that the FPU/SIMD registers are saved and restored correctly when
>> context switching CPUs.
>>
>> In order to test fpu/simd functionality, we need to make sure that
>> kvm-unit-tests doesn't generate code that uses the fpu registers, as that
>> might interfere with the test results. Thus make sure we compile the tests
>> with -mgeneral-regs-only.
>>
>> Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
>> [ Added SVE register tests ]
>> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> ---
>>   arm/Makefile.arm64        |   9 +
>>   arm/cstart64.S            |   1 +
>>   arm/fpu.c                 | 424 ++++++++++++++++++++++++++++++++++++++
>>   arm/unittests.cfg         |   8 +
>>   lib/arm64/asm/processor.h |  26 +++
>>   lib/arm64/asm/sysreg.h    |   7 +
>>   6 files changed, 475 insertions(+)
>>   create mode 100644 arm/fpu.c
> 
> When I build and run this test with EFI I get an SVE exception.
> 
> ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu- --enable-efi --enable-efi-direct
> qemu-system-aarch64 -nodefaults \
> 	-machine virt -accel tcg -cpu max \
> 	-display none -serial stdio \
> 	-kernel arm/fpu.efi -append fpu.efi \
> 	-bios /usr/share/edk2/aarch64/QEMU_EFI.silent.fd \
> 	-smp 2 -machine acpi=off
> 
> UEFI firmware (version edk2-20230524-3.fc38 built at 00:00:00 on Jun 26 2023)
> ...
> 
> Address of image is: 0x43cfd000
> PASS: fpu: FPU/SIMD register save/restore mask: 0xffffffff
> PASS: fpu: FPU/SIMD register save/restore mask: 0xffffffff
> Load address: 43cfd000
> PC: 43d0b4e4 PC offset: e4e4
> Unhandled exception ec=0x19 (SVE)
> Vector: 4 (el1h_sync)
> ESR_EL1:         66000000, ec=0x19 (SVE)
> FAR_EL1: 0000000000000000 (not valid)
> Exception frame registers:
> pc : [<0000000043d0b4e4>] lr : [<0000000043d0b4d8>] pstate: 000002c5
> sp : 0000000043d2bec0
> x29: 0000000043d2bec0 x28: 0000000043d2bf58
> x27: 0000000043d2bf60 x26: 0000000043d2bf68
> x25: 0000000043d2bf70 x24: 8000000000000002
> x23: 0000000043d2bf88 x22: 0000000000000000
> x21: 000000004661b898 x20: 0000000043d2bfa8
> x19: 0000000043d38e60 x18: 0000000000000000
> x17: 00000000ffffa6ab x16: 0000000043d07780
> x15: 0000000000000000 x14: 0000000000000010
> x13: 0000000043d0d4b0 x12: 000000000000000f
> x11: 0000000000000004 x10: 0000000000000066
> x9 : 0000000000000066 x8 : 0000000043d3abf0
> x7 : 0000000000000080 x6 : 0000000000000040
> x5 : 0000000000003bce x4 : 0000000000043cfd
> x3 : 0000000040101000 x2 : 0000000000040105
> x1 : 0000000000000040 x0 : 1301001120110022
> 
> 	STACK: @e4e4 752c 1050
> 
> EXIT: STATUS=127

Thanks for the report. We will take look.

Suzuki


> 
> 
> Thanks,
> drew


  reply	other threads:[~2024-05-14 10:27 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 10:33 [kvm-unit-tests PATCH 00/33] Support for Arm Confidential Compute Architecture Suzuki K Poulose
2024-04-10 16:17 ` Itaru Kitayama
2024-04-15  8:59   ` Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 01/33] arm: Add necessary header files in asm/pgtable.h Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 02/33] arm: Detect FDT overlap with uninitialised data Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 03/33] arm64: Expand SMCCC arguments and return values Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 04/33] arm: Make physical address mask dynamic Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 05/33] arm64: Introduce NS_SHARED PTE attribute Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 06/33] arm: Move io_init after vm initialization Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 07/33] arm: realm: Add RSI interface header Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 08/33] arm: realm: Make uart available before MMU is enabled Suzuki K Poulose
2024-04-22 11:58   ` Alexandru Elisei
2024-04-22 12:09     ` Suzuki K Poulose
2024-04-22 12:23       ` Alexandru Elisei
2024-04-22 12:36         ` Alexandru Elisei
2024-04-22 13:09           ` Suzuki K Poulose
2024-04-22 15:38   ` Alexandru Elisei
2024-04-22 16:05     ` Suzuki K Poulose
2024-04-22 16:15       ` Alexandru Elisei
2024-04-26 11:15         ` Suzuki K Poulose
2024-04-26 13:51           ` Alexandru Elisei
2024-04-12 10:33 ` [kvm-unit-tests PATCH 09/33] arm: realm: Realm initialisation Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 10/33] arm: realm: Add support for changing the state of memory Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 11/33] arm: realm: Set RIPAS state for RAM Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 12/33] arm: realm: Early memory setup Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 13/33] arm: realm: Add RSI version test Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 14/33] arm: selftest: realm: skip pabt test when running in a realm Suzuki K Poulose
2024-04-22 15:48   ` Alexandru Elisei
2024-04-12 10:33 ` [kvm-unit-tests PATCH 15/33] arm: realm: add hvc and RSI_HOST_CALL tests Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 16/33] arm64: add ESR_ELx EC.SVE Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 17/33] arm64: enable SVE at startup Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 18/33] arm: realm: Add test for FPU/SIMD context save/restore Suzuki K Poulose
2024-05-10 15:28   ` Andrew Jones
2024-05-14 10:27     ` Suzuki K Poulose [this message]
2024-04-12 10:33 ` [kvm-unit-tests PATCH 19/33] arm64: selftest: add realm SVE VL test Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 20/33] arm: realm: Add tests for in realm SEA Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 21/33] lib/alloc_page: Add shared page allocation support Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 22/33] arm: gic-v3-its: Use shared pages wherever needed Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 23/33] arm: realm: Enable memory encryption Suzuki K Poulose
2024-04-12 10:33 ` [kvm-unit-tests PATCH 24/33] qcbor: Add QCBOR as a submodule Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 25/33] arm: Add build steps for QCBOR library Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 26/33] arm: Add a library to verify tokens using the " Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 27/33] arm: realm: add RSI interface for attestation measurements Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 28/33] arm: realm: Add helpers to decode RSI return codes Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 29/33] arm: realm: Add Realm attestation tests Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 30/33] " Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 31/33] arm: realm: Add a test for shared memory Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 32/33] arm: Add memtest support Suzuki K Poulose
2024-04-12 10:34 ` [kvm-unit-tests PATCH 33/33] NOT-FOR-MERGING: add run-realm-tests Suzuki K Poulose
2024-04-16 14:28 ` [kvm-unit-tests PATCH 00/33] Support for Arm Confidential Compute Architecture Jean-Philippe Brucker
2024-05-10 15:23 ` Andrew Jones
2024-06-03 12:50 ` Matias Ezequiel Vara Larsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc8b0464-7f10-4ef1-b1f5-48a708ef6efd@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexandru.elisei@arm.com \
    --cc=andrew.jones@linux.dev \
    --cc=eric.auger@redhat.com \
    --cc=james.morse@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=steven.price@arm.com \
    --cc=subhasish.ghosh@arm.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).