From patchwork Tue Apr 9 05:02:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 787179 Delivered-To: patch@linaro.org Received: by 2002:adf:fdd2:0:b0:346:15ad:a2a with SMTP id i18csp57483wrs; Mon, 8 Apr 2024 22:05:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVWhvjBez5qGC+EzjCkElQgwrmvdc9ZrF0DQcucGxRgPjT7UW1lFqy25x6tzMbL7925dmE1mKpe8hNmNGu3Aaei X-Google-Smtp-Source: AGHT+IGIT5DjvtjWU5qHJi32sArRixdsoHGjv1ONYLZHlm+WwjGbi10sSeDViuoGbz02tU3DqmUJ X-Received: by 2002:a05:620a:3708:b0:78a:f3:34eb with SMTP id de8-20020a05620a370800b0078a00f334ebmr12566050qkb.23.1712639145739; Mon, 08 Apr 2024 22:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712639145; cv=none; d=google.com; s=arc-20160816; b=bLsNIdGmFyOAyTEitEHLmBvLeQTmOyLcC0RTFERuLH4WFil4G/74DRoXNdY8qS9f+R IlnuTinJeNBhdYi2ynEdzNj49f7CGNRbXWKkig14WBPqc0N31BLKiv+tfx+siHBbeh6K HvRkNhajAL82SCQoitDLXAHGR5Bso4MQWKA7dpUWE/UkP3fqoZn09I9fJQGmdGfIVRgR NClM2ma0clpNZj752lw+2Z9tf/rxEHhkM/xig4moHnjhCjWvIPwpwneyqxmhHZkDgEZo uc3PSQ0oh9R33nJHcLYrB7g7sHhbKZ6MwNgFArkxzuGibEv1eZefb811B0V9HR75UXQf vOHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=N8gp+LNEKmu7cGCLf0zC8bqAS5Tm3qcAiz5MWMTkDck=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=NIsScmgacWyNUfHSHiRfjgvUQKaskZ2L7pImfdHPIR+JFHSf88zvzuk0lpEgGb+oGt OzcDc80H78PhXxH65UAEPWp53HwsagxAglRv4TRITWAu+AcUUvJpqHGlX3WthnsGdEhe HJO33o32lPShTzp0GWC1GzdaixHuSHunXBaF8Tg4mZgMYsHgtelW4UTY9xgvI6VlkD3m 3edBeh1+47+ksmNPznNfzhBWSy723/LnMSBsyzBGbUT7rhorHvLXrfqLEmSl0QYVtZ74 StYXVJH60eHHrpkaGbqCAd2bSpC3d3uEnhrPEUV0mpRw1TQidIPx7VXldjiXcWNdKLod 6htQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZojU6IOE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id wk15-20020a05620a578f00b0078d6349faf2si4417186qkn.338.2024.04.08.22.05.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2024 22:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZojU6IOE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ru3dq-0003CM-AE; Tue, 09 Apr 2024 01:03:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ru3do-0003BL-F4 for qemu-devel@nongnu.org; Tue, 09 Apr 2024 01:03:28 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ru3dm-0005JL-SH for qemu-devel@nongnu.org; Tue, 09 Apr 2024 01:03:28 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6ecc9f0bdaaso3638709b3a.1 for ; Mon, 08 Apr 2024 22:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712639005; x=1713243805; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=N8gp+LNEKmu7cGCLf0zC8bqAS5Tm3qcAiz5MWMTkDck=; b=ZojU6IOETqP78QiVsHkLT+VKs4ymZ1qa+QnpG7DHKTJABpC0r/McU+d0uG3Y0jEmJ3 Pq9PbO/iNpKnb4DQIeHA+zFUKYRhr470BCWZ/lfl+xY2YY02s0dRVxgk0ALJ7wHUizyC ZmR5NAPyzmLNK2v1xlBG1tp/6QgfeB4zHlaLeUEJsUtg9/3e7NwWr3CE3VqAW4dYEJmg 7O36i4Rau6Hc2NvTBTsTt/xQV6IsXV2no1AW89i6LCMmk9HqUJTvYAOKBGc5WAKY+ol7 mpVKdY9XyYGqZAMTC79AdK16xyNk1ByHXUC8NEUyTLQ9CLNHO4f4QY5DNzTn+HgBYeKH FXsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712639005; x=1713243805; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N8gp+LNEKmu7cGCLf0zC8bqAS5Tm3qcAiz5MWMTkDck=; b=kbTAgvMgdzfXrZEuCWfLaqWCd9Knq+zJpV4SuD5UqHf2NlejU9WkxqB+JSDw9MG1mM 7MV08dkSv/j6dQqHHUXasbWMj8JE+IJ3rkJVjAlmt1l1Ks75j5cr5zVtkdnSpb1mHODl YWLcpsWbpRFg3FPMuXnDAuSUcGQELeaMPqHZwlSS/JfDqW7/iJTa1LidhJUcV71rSlzx 3az34ErFbvPdfhoLr/YqLJMUcCVi5luXS6R5Z34x0qU8e43k8UVSibDSHaxU8/gQyFV+ hBl2N8LXI077oc3377mwLdhck0ZAmBcGhtOCC3vdh1ztXuyp7qMXivi5uQIw+BWd76yB 5C/Q== X-Gm-Message-State: AOJu0YyvNOh7DCFpnMj46FAYnmaV6CuYqc1jlqxx/3nuoIU8mqVyOYsh CRNDzXeyM0HtGKrinV7PNSXecOeuNOLrvFbalin+et3bTUW8F5MABZToKfS4MAK46oAdp7gwLSR K X-Received: by 2002:a05:6a00:c8b:b0:6ea:e2ed:497d with SMTP id a11-20020a056a000c8b00b006eae2ed497dmr10312574pfv.19.1712639005339; Mon, 08 Apr 2024 22:03:25 -0700 (PDT) Received: from stoup.. (098-147-007-212.res.spectrum.com. [98.147.7.212]) by smtp.gmail.com with ESMTPSA id z26-20020aa785da000000b006e64ddfa71asm7654894pfn.170.2024.04.08.22.03.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 22:03:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 16/28] linux-user/i386: Remove xfeatures from target_fpstate_fxsave Date: Mon, 8 Apr 2024 19:02:50 -1000 Message-Id: <20240409050302.1523277-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240409050302.1523277-1-richard.henderson@linaro.org> References: <20240409050302.1523277-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This is easily computed by advancing past the structure. At the same time, replace the magic number "64". Signed-off-by: Richard Henderson --- linux-user/i386/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index 547c7cc685..a4748b743d 100644 --- a/linux-user/i386/signal.c +++ b/linux-user/i386/signal.c @@ -66,7 +66,6 @@ struct target_fpstate_fxsave { uint32_t xmm_space[64]; uint32_t hw_reserved[12]; struct target_fpx_sw_bytes sw_reserved; - uint8_t xfeatures[]; }; #define TARGET_FXSAVE_SIZE sizeof(struct target_fpstate_fxsave) QEMU_BUILD_BUG_ON(TARGET_FXSAVE_SIZE != 512); @@ -265,7 +264,7 @@ static void xsave_sigcontext(CPUX86State *env, struct target_fpstate_fxsave *fxs assert(!(fxsave_addr & 0x3f)); /* Zero the header, XSAVE *adds* features to an existing save state. */ - memset(fxsave->xfeatures, 0, 64); + memset(fxsave + 1, 0, sizeof(X86XSaveHeader)); cpu_x86_xsave(env, fxsave_addr, -1); __put_user(TARGET_FP_XSTATE_MAGIC1, &fxsave->sw_reserved.magic1); __put_user(extended_size, &fxsave->sw_reserved.extended_size);