From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WauqM4EzfGku4hwAWB0awg (envelope-from ) for ; Thu, 29 Jan 2026 23:28:49 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=frn88jNG; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CFD3D1E089; Thu, 29 Jan 2026 23:28:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 250731E089 for ; Thu, 29 Jan 2026 23:28:49 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9A4AE4BA2E32 for ; Fri, 30 Jan 2026 04:28:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A4AE4BA2E32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1769747328; bh=KZPMznLde2fMOlDTloxpy/QPEbnIYVfSgKzo18tXeJY=; h=To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=frn88jNGRR0UUTypEeRAn9cJtgJV9NjZobjMV0tlMBacfrb+O7rGEbc0NXKnvmZS+ R91CHxQqEwonlHdQN6l6UXn8X2sLiVt0B/9HKKRnIsLOeCOsk/1iyO7xoS7+Z3wBJU PgRFmDgusMgUvSlrwCRp5Vr8Zqn3E4/fEvnS8vGA= Received: from mail-dl1-x1234.google.com (mail-dl1-x1234.google.com [IPv6:2607:f8b0:4864:20::1234]) by sourceware.org (Postfix) with ESMTPS id DA58D4BA2E37 for ; Fri, 30 Jan 2026 04:28:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA58D4BA2E37 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DA58D4BA2E37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769747293; cv=none; b=gnXbPnmv5hURmWeyRvnpOgytTkYIVk34xdiJc0l+rtZ2GIJoqnRUaalZwuy0Y9atJpPM9XLrGp7l7C2XH4R6dGVovjnfwhgWRGYoKx3VwtpV1tx/2tt4CtPFpjDLutd2Km3ThlR8hQL/FsxboNMNtmNfnijtYxqdK3sX+PKk8cA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769747293; c=relaxed/simple; bh=fVWzDVOGstfjrmj3MsYDzhPvl7pzKhZyYDe7JMf2H+Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gtAcUPoC/fFXgSaDIRFHBPpN/dm6KJQGoiRtkbOJEUo8bvVOjLiGpf0QeCmFGuIRGNkn7gN35FB0/4hz6bD8rmeMUqLMbCoEvFmjxCA+fplPEZIrZgjk+jw5nl8ReCUkuFpO0vpIgz1OsiacydXlWZsmLFpckGrn2t+OajUw/JI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA58D4BA2E37 Received: by mail-dl1-x1234.google.com with SMTP id a92af1059eb24-1233c155a42so2902752c88.1 for ; Thu, 29 Jan 2026 20:28:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769747291; x=1770352091; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=KZPMznLde2fMOlDTloxpy/QPEbnIYVfSgKzo18tXeJY=; b=pPOPBmn43/kAhW0v5Pt+6BnWuRTZfc99Vtf+PyCwp60XX/sDN4j9NBt0w8WuzfAtGk qShAiDIZ4izTxMU6ndzr28qg6pJPa54JQHqcvEcUmsNuNQWBdJsIrQnmrA3fbGI78AHJ atLG9H8yOD31xGaZjicT5XbZkUBM6e+mYz8Ot+7qWnWI1KvQHkomcanVQQ6JArHZG42A caLp4NnYsRvngzZxVBAg79yBylzRorGWK+6yE3RVo2bhsIWgkhkuf7kCRUZW6S4Q3aCA Pxh/70s+wTqbp52RFORuv+DLFuC2CIS/rAEwH5eX+JwLEr6vYyWp1JsU6v9+yg3hkJ38 e9dA== X-Forwarded-Encrypted: i=1; AJvYcCV8o87ElG3fGGiYXCxgUsGK2Lo8iL1oy+HFWrEo2ltxLChUuZhKe8bvdxdOCRAZwu8ibAc=@sourceware.org X-Gm-Message-State: AOJu0YyfUpqscqIOrgH/82Niqm11rWq0bqKCKdTVo2fHhb1qVfLzMh4a 6/YT6JgLuJ8uSVJUf6dMDUJYBDwa3HFmLP0GMcbwkgFiYI47CkxQ4FXcuV/9AkB7bQU= X-Gm-Gg: AZuq6aLcQVM8KYEfMOKpRjaD/WPIjJIjWZeFOxBNspq2ORJv9+ydwQfnnwkvJDpPbcs ZpoCDRoDWbUu8Ir0nwTT3PIpfrXC1Q11IZzznt1tvedz+6ss3vzbi+Slnk3xbfwT593b6PhyfGt kNUUXjc50qSSEdNVzkGPCLwJb1jhEbJ9AJpBJU4FdF045vyR7VyPvh3gBs96zKR4DCVsPUYc/lL dUZeGAr89ylb0ZrDtxUjkvVtFnJ4hIk17KLFLyMBubLYVszSYMX7yTbcam8JW0wf5319hXDOj8i eVr+FUC303AaEKPJQB7RfkyIXu0mJZJVeNEaSvzy8sNLYNXRMxfvsvAmqXYaMFkRQhNXk8D91DL 6/pQ9D9zySKn7bvbFyb7CuP+KMEAbBXWfO3mFruSLlrPzclbY7yD9/h2vTmcffoTJaXV0lEUJYr hchFdv0FohDteI/bwiikow7g== X-Received: by 2002:a05:7022:2398:b0:123:2d9d:a90d with SMTP id a92af1059eb24-125c0f98ce2mr767306c88.17.1769747290803; Thu, 29 Jan 2026 20:28:10 -0800 (PST) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b7a1abe57csm11497405eec.22.2026.01.29.20.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 20:28:10 -0800 (PST) To: Peter Maydell Cc: Luis , gdb@sourceware.org, Manos Pitsidianakis Subject: Re: gdb support for SME-without-SVE ? In-Reply-To: (Peter Maydell's message of "Thu, 29 Jan 2026 11:34:19 +0000") References: <87ldhigyao.fsf@linaro.org> <87tsw59hwu.fsf@linaro.org> User-Agent: mu4e 1.12.15; emacs 30.2 Date: Fri, 30 Jan 2026 04:28:08 +0000 Message-ID: <87a4xvafmv.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Thiago Jung Bauermann via Gdb Reply-To: Thiago Jung Bauermann Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" Peter Maydell writes: > On Thu, 29 Jan 2026 at 09:10, Peter Maydell wrote: >> >> On Thu, 29 Jan 2026 at 04:12, Thiago Jung Bauermann >> wrote: >> > >> > Peter Maydell writes: >> > >> > > On Wed, 28 Jan 2026 at 04:24, Thiago Jung Bauermann >> > > wrote: >> > >> I'm currently implementing SME-only (i.e. without SVE) support in GDB >> > >> for Linux userspace debugging. It's mostly done, I just need to test a >> > >> few things, polish the code and prepare the patches. I'm hoping to send >> > >> the patches next week. >> > > >> > > Let me know if a QEMU setup emulating "SME only" would be helpful >> > > for you with that. >> > >> > It would indeed! If there's a branch I can build, it would make my >> > testing quicker, and the regression testing more complete. >> >> I'll get one sorted out later today (the patches I have right now >> have a few issues I need to fix). > > This branch: > > https://gitlab.com/pm215/qemu/-/commits/sme-no-sve Thank you very much! > should let you create an SME-only CPU with "-cpu max,sve=off". > I have not given it much more than a very cursory testing, so > let me know if you run into any problems with it. Unfortunately I hit a kernel oops reliably when trying to run a GDB testcase: [ 156.387143] Internal error: Oops - Undefined instruction: 0000000002000000 [#1] SMP [ 156.389966] Modules linked in: sm3_ce tpm_tis tpm_tis_core sha256 cfg80211 rfkill fuse drm backlight dm_mod ipv6 btrfs blake2b libblake2b xor xor_neon raid6_pq zstd_compress [ 156.391005] CPU: 0 UID: 1000 PID: 677 Comm: aarch64-sme-san Not tainted 6.19.0-rc5 #4 PREEMPT [ 156.391244] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202408-prebuilt.qemu.org 08/13/2024 [ 156.391475] pstate: 214020c5 (nzCv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--) [ 156.391657] pc : sve_get_vl+0x4/0xc [ 156.392149] lr : fpsimd_save_user_state+0x100/0x1b8 [ 156.392270] sp : ffff800080cbbb80 [ 156.392329] x29: ffff800080cbbb80 x28: 0000000000000001 x27: fff00000c44b05e0 [ 156.392501] x26: ffff800080cbbdf0 x25: 0000000000000000 x24: 0000000000000000 [ 156.392627] x23: 0000000000000000 x22: fff05a09d4047000 x21: 0000000000000020 [ 156.392745] x20: fff00000ff5380f0 x19: ffffa5f72b4f10f0 x18: 0000000000000000 [ 156.392870] x17: 0000000000000000 x16: 0000000000000000 x15: 02ed5d640eed9128 [ 156.392994] x14: 0000b00e8e55cf08 x13: 000000000000033b x12: 000000000000033b [ 156.393109] x11: 0000000000000000 x10: 0000000000000002 x9 : 0000000000000800 [ 156.393246] x8 : fff00000c36aac80 x7 : fff00000c36aac00 x6 : 00000007fb30b524 [ 156.393372] x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800080cbbc60 [ 156.393491] x2 : 0000000000000000 x1 : fff00000c44b0000 x0 : 0000000000000001 [ 156.393681] Call trace: [ 156.393853] sve_get_vl+0x4/0xc (P) [ 156.394027] fpsimd_thread_switch+0x44/0x188 [ 156.394125] __switch_to+0x20/0x1a8 [ 156.394203] __schedule+0x368/0xcdc [ 156.394270] schedule+0x34/0x110 [ 156.394328] ptrace_stop.part.0+0x12c/0x24c [ 156.394409] get_signal+0x384/0x82c [ 156.394471] arch_do_signal_or_restart+0x118/0x3c4 [ 156.394555] exit_to_user_mode_loop+0x104/0x16c [ 156.394640] el0_undef+0x88/0x8c [ 156.394704] el0t_64_sync_handler+0x70/0xe4 [ 156.394779] el0t_64_sync+0x198/0x19c [ 156.394973] Code: b9400424 d51b4404 d65f03c0 d503245f (04bf5020) [ 156.395301] ---[ end trace 0000000000000000 ]--- The same kernel and userspace binaries work fine in Arm FVP. In case you want to try it, this is my GDB branch: https://gitlab.com/bauermann/binutils-gdb/-/commits/sme-only And you can run the testcase with: $ cd /path/to/gdb/build/dir; make check-gdb TESTS=gdb.arch/aarch64-sme-sanity.exp I can try to create a minimal reproducer if it will help. My QEMU command line is: $QEMU_PREFIX/bin/qemu-system-aarch64 \ -M virt \ -cpu max,sve=off \ -m 4g \ -drive if=none,file=$HOME/VMs/ubuntu-aarch64.img,id=hd1,format=raw,cache=writeback,discard=on \ -device virtio-blk-device,drive=hd1 \ -netdev user,id=mynet0,hostfwd=tcp::8022-:22 -device virtio-net-pci,netdev=mynet0 \ -bios $QEMU_PREFIX/share/qemu/edk2-aarch64-code.fd \ -nographic -- Thiago