From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F167CC04FFE for ; Tue, 14 May 2024 10:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dHUIaLRZKwunrFZHhLglqTo5Kowu41us9a/5EA7+geU=; b=p6auG0K1p0AK9z lXPvMfzb3bux99miXAzFDbMEBKEDxLFe0q/Tf54iB5CgS4Ub4bv/OjWOrPy1U8spqGQinuuv7Va8V 16JVkrOAsmq4bvQ/Cdwr26lp3pXzXd3/NnkESukDhiapbQKA+N/J/hTRhfk2bmmaAZzLUXOjb6O5d OoIMsi0ycFdZTbpYrb1Nb4RK4HNfylhxHrvHkMAJqrnLWh5ZhZmYhBGLLHiY69tAPE04yHuD0/Obs wsp5ShJXVNh5VpOUJgc0BgSSTCvNfMl3f4Kfh8KOJGjnWsqJSrP+k3aNl9bZvYloldzHuNen/g8aN oxxIH1MvjdTTfA/EPeQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6pNH-0000000FZW3-0xxH; Tue, 14 May 2024 10:27:11 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6pND-0000000FZVG-2DKS for linux-arm-kernel@lists.infradead.org; Tue, 14 May 2024 10:27:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D61141007; Tue, 14 May 2024 03:27:29 -0700 (PDT) Received: from [10.57.81.220] (unknown [10.57.81.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0CF5C3F762; Tue, 14 May 2024 03:27:02 -0700 (PDT) Message-ID: Date: Tue, 14 May 2024 11:27:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [kvm-unit-tests PATCH 18/33] arm: realm: Add test for FPU/SIMD context save/restore Content-Language: en-GB To: Andrew Jones 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 References: <20240412103408.2706058-1-suzuki.poulose@arm.com> <20240412103408.2706058-19-suzuki.poulose@arm.com> <20240510-7e7f794ddf51316b15b57113@orel> From: Suzuki K Poulose In-Reply-To: <20240510-7e7f794ddf51316b15b57113@orel> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240514_032707_741629_E6D603A5 X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 >> >> 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 >> [ Added SVE register tests ] >> Signed-off-by: Joey Gouly >> Signed-off-by: Suzuki K Poulose >> --- >> 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel