From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id /K4jBIl4u2qhihYAWB0awg (envelope-from ) for ; Tue, 29 Sep 2026 04:36:25 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ecj9bNnV; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E61B41E06B; Tue, 29 Sep 2026 04:36:24 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 EC8CA1E033 for ; Tue, 29 Sep 2026 04:36:23 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62EF14BB24CD for ; Tue, 29 Sep 2026 08:36:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62EF14BB24CD Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ecj9bNnV Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 5DEA54BB1C22 for ; Tue, 29 Sep 2026 08:35:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5DEA54BB1C22 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5DEA54BB1C22 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790670954; cv=none; b=ZI+f+VJ5dpPs7ihQ5ZWCxq7zkryVzfYxl24BydsjrLwcv+smwV8PSImGVQomo/S+qwsuAwn+ia6imhoe41z+mJ0TCEY2aYmzgFGGQdRuJC5vhoE/uYkFXedycpF9kv4ANdqNYPPJVLDvYWathZ5vrQPCQHmbfPfy9HMMrx5BrNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790670954; c=relaxed/simple; bh=4vh7gi92/gj90DguvUh+2psM+UDFkDYxPbj5YcBxLyc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=aL/2SwUx87PwqqEqXJXWBL/fA6c5D+1wxFIo1QiZF88MBVAL28V7M8hd0257AaREuTivZCJax7LWwrGh9JrhjBcestiPVuiPBS253ErRtPq193XVZWCN+NUQQzRqRE1WJRChV8M0Tx/jqPR40DL6+IYBkUza8bIMcO8fQYLj7aQ= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=ecj9bNnV DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DEA54BB1C22 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68T7ZU5K3344736 for ; Tue, 29 Sep 2026 08:35:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pp1; bh=TWeAR6nBVvEnslh9xpvwBGqeHznAly xfpitGPfqFbsE=; b=ecj9bNnVUq7vFgMp2gXxZm8Jg3c510ka4xExiZzHQTHRJE A5H0juoBn8PD71kVUNLzjl3EeaLpxR4fj6d7hkZotqUNy+UlsWhntwLUEgvNhMcv xZGgXHhF5nQ9Af9VCF91hxdW9B2EQaeDr3v6AaLDkClKWJBLdUwVE/CHgzY8pLP3 dgWSBqrlQlEOLRU1ZT6jabpBv8N9mdsBIOVB7AXLvLQ8w/VLZQObkV5WmG1EowX+ YBwAuPt8JyAcQX7QFe8POXX9YkSYU8XeerazLlFPFmD2Ffjc7vQIJlv0dRNg7trc 4gAPbrvO+RnWJIihh0/FZTCWiOgAqZ1FqiR2SrKw== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4gx3fk5p8t-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Tue, 29 Sep 2026 08:35:53 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 68T7WSLp1399765 for ; Tue, 29 Sep 2026 08:35:52 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4gxrcps3h2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 29 Sep 2026 08:35:52 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 68T8Zoml63308252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Sep 2026 08:35:50 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 08D2858059; Tue, 29 Sep 2026 08:35:50 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7667B58053; Tue, 29 Sep 2026 08:35:48 +0000 (GMT) Received: from [9.127.20.106] (unknown [9.127.20.106]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 29 Sep 2026 08:35:48 +0000 (GMT) Content-Type: multipart/alternative; boundary="------------cIyfprd40LdKfwn4OWXOA0zf" Message-ID: Date: Tue, 29 Sep 2026 14:05:46 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] PowerPC: Add support for Dense Math registers (RFC02653) To: Ulrich Weigand , "gdb-patches@sourceware.org" Cc: "cel@linux.ibm.com" , Abhay Kandpal References: <20260924063013.288753-1-abhay@linux.ibm.com> <4b8f1c34708d1b5373966c7995f53a5e7f1d548f.camel@de.ibm.com> <687032cb-729a-437e-b1cc-0fa01772e0ac@linux.ibm.com> From: Abhay Kandpal Content-Language: en-GB In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 61Y8zMlN-ieZF_xZC7xonIt53rl4zMTe X-Proofpoint-GUID: 61Y8zMlN-ieZF_xZC7xonIt53rl4zMTe X-Proofpoint-Spam-Info: AW1haW4tMjYwOTI5MDAzNCBTYWx0ZWRfX5u/CX7lBIJRQ iOTt8XHkDeWJQgDv5DWgvw7DBH4cY677VmvTGOtugFUaTXxdolOZBTo2L+qQTMC0tpIfvsF37AD qceqyYmZB82dYo81Ym5aMVwYzTA+lcc= X-Authority-Analysis: v=2.4 cv=Vv62kO2n c=1 sm=1 tr=0 ts=6abb7869 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=VdqzKS8jKosA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=r77TgQKjGQsHNAKrUKIA:9 a=VnNF1IyMAAAA:8 a=O_-OZW6xSfCN2ZJeBG0A:9 a=QEXdDO2ut3YA:10 a=vdU1x8LOaOAPeDUM:21 a=_W_S_7VecoQA:10 a=lqcHg5cX4UMA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTI5MDAzNCBTYWx0ZWRfX2Gno6SEaI6ln 0bQykfce73NJDud/UhsDctTtAxcJtWrmOR/00FMmYsFgNHxmCTnmlP36Yqm4u+OPedzFYYULshy nivLswtW63Ob7fBksEmWrJd8h5ywpfBEfKZLHu3lhWQKA1Gou73RoCmIdCPYoMVNZJeAlKsfQRt V1Eu2oUxpKX2iiX1qx9zp4bVu7/g2zi1WweUE+TKqLzPlEZG+0XMTbZgMG9ndmpyhO2MtZ4x//R TOwKq+yAkXGz3PokZYFHuK6HzddCJAPfpVDgCkM34minDl3phxLiDk9OVRfJewvb7elIbH3z/5R 3jJLPHlPAPzDERTlJt5AgH+gO0XFyNhThcV9ocPCBYsKvHbH+tweo9d/5/f33204pbjn0Hpwe4K blOlWrzALxSXwzxHctkE1FRuUSUT0cgPYCAMJQ60swY3WuSgumwfYnvPz4j1qM74fgSGX3JbJt+ ONhtRwHd95A16XSspaw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-29_03,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609290034 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org This is a multi-part message in MIME format. --------------cIyfprd40LdKfwn4OWXOA0zf Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Ulrich, On 28/09/26 14:52, Ulrich Weigand wrote: > Abhay Kandpal wrote: > >> The existing names encode the base ISA level, but DMR is a later ISA >> feature layered on an isa207-derived description, so isa207-dmr would >> misstate the ISA level. A few options: >> >> 1. powerpc-isa207-dmr-vsx64l - names the base feature set the description extends >> 2. powerpc-isa32-dmr-vsx64l - names DMR's own ISA level (ISA 3.2) >> 3. powerpc-dmr-vsx64l - as posted, no ISA level > I'm not familiar with ISA 3.2 - is DMR mandatory or optional in 3.2? I checked with our architecture team. DMR can't be disabled independently, it depends on VSX being enabled, and an ISA 3.2 implementation running with VSX disabled isn't a configuration that's supported in practice. So there is no realistic ISA 3.2 target without DMR. > And are there any *other* 3.2 features that GDB needs to implement? No - DMR is the only new architected register state in ISA 3.2, so the GDB work is limited to these registers. > > I'd prefer "powerpc-isa32-vsx64l" to refer to an implementation of > all mandatory features (including DMR if mandatory), and if DMR is > optional, then in addition "powerpc-isa32-dmr-vsx64l" for the > combination of mandatory ISA 3.2 features plus DMR. Given the above, v2 uses a single description,|powerpc-isa32-vsx32l/64l|, which includes DMR. Your other comments are addressed in v2 as well. Regards, Abhay > > >> So in v2 I'll convert the native side to the regset mechanism >> throughout: fetch_regset/store_regset with NT_PPC_DMR in >> fetch_register, fetch_ppc_registers, store_register and >> store_ppc_registers, and a regset-based availability check in >> read_description. That removes the need for the >> PTRACE_GETDMREGS/PTRACE_SETDMREGS defines, so I'll drop the >> block rather than move it - unless something still needs them, >> in which case I'll relocate it as you suggest. > No, if they're not needed, it's better to drop these defines. > >> Yes - PPC_FEATURE2_DMF (0x00008000, Dense Math Facility). I'll add > that >> check. The kernel does save and restore these registers across context >> switches. The hwcap bit and the DMR ptrace support are currently in >> separate kernel branches here, so I'm assembling a tree with both before >> validating v2. > Thanks! > > Bye, > Ulrich --------------cIyfprd40LdKfwn4OWXOA0zf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Hi Ulrich,
On 28/09/26 14:52, Ulrich Weigand wrote:
Abhay Kandpal <abhay@linux.ibm.com> wrote:
 
The existing names encode the base ISA level, but DMR is a later ISA
feature layered on an isa207-derived description, so isa207-dmr would 
misstate the ISA level. A few options:

1. powerpc-isa207-dmr-vsx64l - names the base feature set the description extends
2. powerpc-isa32-dmr-vsx64l - names DMR's own ISA level (ISA 3.2)
3. powerpc-dmr-vsx64l - as posted, no ISA level
I'm not familiar with ISA 3.2 - is DMR mandatory or optional in 3.2?
I checked with our architecture team. DMR can't be disabled independently,
it depends on VSX being enabled, and an ISA 3.2 implementation running with
VSX disabled isn't a configuration that's supported in practice. So there is
no realistic ISA 3.2 target without DMR.
And are there any *other* 3.2 features that GDB needs to implement?
No - DMR is the only new architected register state in ISA 3.2,
so the GDB work is limited to these registers.

I'd prefer "powerpc-isa32-vsx64l" to refer to an implementation of
all mandatory features (including DMR if mandatory), and if DMR is
optional, then in addition "powerpc-isa32-dmr-vsx64l" for the
combination of mandatory ISA 3.2 features plus DMR.
Given the above, v2 uses a single description, powerpc-isa32-vsx32l/64l, 
which includes DMR. Your other comments are addressed in v2 as well.

Regards,
Abhay

 
So in v2 I'll convert the native side to the regset mechanism
throughout: fetch_regset/store_regset with NT_PPC_DMR in
fetch_register, fetch_ppc_registers, store_register and
store_ppc_registers, and a regset-based availability check in
read_description. That removes the need for the 
PTRACE_GETDMREGS/PTRACE_SETDMREGS defines, so I'll drop the 
block rather than move it - unless something still needs them,
in which case I'll relocate it as you suggest.
No, if they're not needed, it's better to drop these defines.

Yes - PPC_FEATURE2_DMF (0x00008000, Dense Math Facility). I'll add
that
check. The kernel does save and restore these registers across context 
switches. The hwcap bit and the DMR ptrace support are currently in 
separate kernel branches here, so I'm assembling a tree with both before
validating v2.
Thanks!

Bye,
Ulrich
--------------cIyfprd40LdKfwn4OWXOA0zf--