From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id E6D023858D38 for ; Thu, 27 Apr 2023 19:51:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E6D023858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4Q6mbG0xwxz3mg0; Thu, 27 Apr 2023 19:51:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q6mbG07q7z4G79; Thu, 27 Apr 2023 19:51:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682625114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WdxWv35XgeqGYlgSC677pgwdoBlDik/RcJkX4aVtX00=; b=ZXGei9Hx3TTGQ2wdV9b5vwNsSZEH5f7o76Yx5bXPa3hjP6bsHgmIGpxJUlndGWxeIvC0kv Vp3Le2jlDPMKS/HULQSUSfgbFW0wDtxCG0Tg+lXMO0Y7sFwoM8fPhav8MzVx8j65zccbZl VABZMK7O/3x8ae0byDwNRNFV0sHo/ljvP38tVmOkFZbhAJq5ZN1dk4JBP6s9Fj/7W68WAA QwMnNp6rlJ3s36rVpwyV1r3oqglf/3Eek9Uu5EDFEfPYrrZn7U3KnTVqmCP/2ZP6WiFmPg C91cnxDCp2cyRjs/O4et9SRKHBM63p0d0J5ZHL2pYOSGbl0ylgh1fxTumuj2xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682625114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WdxWv35XgeqGYlgSC677pgwdoBlDik/RcJkX4aVtX00=; b=I6FbLI3B+GQccUtIZNdaP2+qufkHYzhCyWkuXYUSFDn10TglEcovE0FjMqFzzpvFy2daGw aZT3SmMSoTCpjRBRKXz6Ml9j/FH3Fny3Wvvtac9AjbjqwazcWHHyH2cyPLwxcMHo3rMmg2 chyq/BajNpGz/giTEaHXhNJJCARk0R5dMwAnyOdy8M5UynYvA72RwfeYWU5YHIU9fY2x92 xLRLCX2EBcDJFvMVm8TJHd+MrVch84tcLXhzwf/2bJvKAtNcmXx379g1dWi6fp8nvsnqNa D3M/tqlb9EZ1KdJ0bPzeHqPlxB1biRSxMQi5+gAKpDR3RmMRUF/f1032sHuuFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682625114; a=rsa-sha256; cv=none; b=a+D6gyrXn9jZR7kODgeoKR2kvIrLObG3tlPYgjOevAInzAMs5KhELaORY2iSFmb2mWiexl YAxH4+HHpBC0kZoVgtmVRGZFvGDpxI488h1zCEG+basKjjvDSUpWXwdmcKZm32qW3qHq+b q+NagUqP3pPOhsDFqEBmqN0W77XrGDgtyHjlzVueLvSpOBetvyM9FCc6OMYkkXMoqc1+U6 fZ29IzRQ/On0EJOFsgQ0d3CZKwNDYOHqxBtoAgQN16BwZgRt9gcApORKXX12/4l9etPu2m MTAaQHrxsvimL/N+yTxgUwTW90RgCWBMkqX/pXFUspqnq/e3jmWzDmVqxIjVYw== Received: from [IPV6:2601:648:8680:16b0:24f5:8737:ed3b:1175] (unknown [IPv6:2601:648:8680:16b0:24f5:8737:ed3b:1175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q6mbF43DFz1CQ2; Thu, 27 Apr 2023 19:51:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <2cc8c88b-959a-a3cd-ff53-5fb9a67a0c30@FreeBSD.org> Date: Thu, 27 Apr 2023 12:51:39 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v4 11/13] gdbserver: Refactor the legacy region within the xsave struct Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20230318010905.14294-1-jhb@FreeBSD.org> <20230318010905.14294-12-jhb@FreeBSD.org> <66d1e6d4-118b-393a-b609-296dd95244a8@simark.ca> From: John Baldwin In-Reply-To: <66d1e6d4-118b-393a-b609-296dd95244a8@simark.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 4/12/23 11:34 AM, Simon Marchi wrote: > On 3/17/23 21:09, John Baldwin wrote: >> From: Aleksandar Paunovic >> >> Legacy fields of the XSAVE area are already defined within fx_save >> struct. Reuse this struct to remove code duplication. >> >> The two changed functions are called within all tests which run >> gdbserver. > > Not a big deal, but if i387_xsave inherited from i387_fxsave instead, we > could achieve the same thing, but wouldn't have to change how the fields > are accessed. i387_xsave wouldn't be a POD anymore though, I don't know > if that would be problematic for how it's used. I tried this and it reduced the diff substantially. I also updated the next patch in this series to follow this same approach meaning that it now also only changes how the extended state area registers (ones need cpuid offsets) are handled, leaving the rest of the code as-is. In the process I've also found a few bugs in the AVX512 handling. Once I've finished fixing the ones I've found I'll be posting an updated series. -- John Baldwin