From nobody Mon Nov 25 09:50:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716771073596607.7107924258977; Sun, 26 May 2024 17:51:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBOZM-0007HR-Nq; Sun, 26 May 2024 20:50:32 -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 1sBOZI-0007Cn-Ny for qemu-devel@nongnu.org; Sun, 26 May 2024 20:50:29 -0400 Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBOZ4-0003bj-7L for qemu-devel@nongnu.org; Sun, 26 May 2024 20:50:21 -0400 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-24ca0876a83so1543460fac.2 for ; Sun, 26 May 2024 17:50:13 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fd6d7598sm3942958b3a.220.2024.05.26.17.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 17:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716771013; x=1717375813; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KDDtUfw/mczHul15uHGYjteOGPBpu+USO8s2KogQRUY=; b=HoyXytj9WCZgFOFG/M+aGfS+1VXHTPPm0rZRZpOgL6Fs67FCC81CzWG7tYoZ2mlhsJ NNMlbhuuajZ4CzICywFFf5KFTLNhVFh6PFOZqV9eTqqnSV5wnhS8goy1b+08hRrq6vMA YuXNbb1REoq0JO0//gXsj1oEE/cP3vM2y36VtRO/AJL7TuNft0airRWIX67yR8zdKv6c /rc/eS/OBTcEdEgQb/ncniFMnImdr8zi5w09PV08kP04VaF82SVoNuFKUW7LzXVy6d3v 5xjtjIyrqM4uZJdOo2MF0fsuR/tdR6Tb5UqbNjtUPe59+wstvBjiE3F+IvA2tY70djFu FE6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716771013; x=1717375813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KDDtUfw/mczHul15uHGYjteOGPBpu+USO8s2KogQRUY=; b=VdbZxnEeAq9GPEGmUc7cAwejW5RQM0zj38DiOsudSjaCHVFSZx+qQlNxJv6F9uviBY IuCwA85kvcqI8Lm8q1MY73fMhNSTXzvcjDXYR/xmkfPUfrJJwjjNAi1eZJAPgJ7AP+5g jB8GLNz8VFNe2hJ3hhcn6Qcmm+rucoa789JcwHrp4C+VSqph2kevCBlYx/zKHylGpKp2 Q0wSLop/CINLzNUda2jQdObCCZdC+qjtBANfiSOHWqoUNVq1esZGRn8SSF6cSz66o3ct KCWgQEmzVOwX+3ekZO37aafDTaVTHWt38WlblBABfKXs8M+MRjmkTfMsnJN2VHX8x0BZ uH5w== X-Gm-Message-State: AOJu0Yz4eYe/dL6zKPmC6B1ip7LWUcUjb+V7dd41Cw//ixXU1FbVNRX1 6KppuUKYSUdOzMh1WcBMgw/07D9u7v1R266/eEA7qgXm0VgsRw3+i4BfrXCHAXgnD85M/2jxfeJ x X-Google-Smtp-Source: AGHT+IHcvxjoPG6RlxuIGkSqQOefTKWyBOWG9M7lPAXlszNIqFXmhhSRoWgU2+umFDxfuJIGCMMLSA== X-Received: by 2002:a05:6870:472c:b0:24c:b2d9:77af with SMTP id 586e51a60fabf-24cb2d9a877mr7671954fac.19.1716771012979; Sun, 26 May 2024 17:50:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Paolo Bonzini Subject: [PULL 13/28] target/i386: Add rbfm argument to cpu_x86_{xsave, xrstor} Date: Sun, 26 May 2024 17:49:46 -0700 Message-Id: <20240527005001.642825-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527005001.642825-1-richard.henderson@linaro.org> References: <20240527005001.642825-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:4860:4864:20::2c; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x2c.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, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1716771075353100003 Content-Type: text/plain; charset="utf-8" For now, continue to pass all 1's from signal.c. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/cpu.h | 4 ++-- linux-user/i386/signal.c | 4 ++-- target/i386/tcg/fpu_helper.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index c500a69a69..91170a088a 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2262,8 +2262,8 @@ void cpu_x86_fsave(CPUX86State *s, target_ulong ptr, = int data32); void cpu_x86_frstor(CPUX86State *s, target_ulong ptr, int data32); void cpu_x86_fxsave(CPUX86State *s, target_ulong ptr); void cpu_x86_fxrstor(CPUX86State *s, target_ulong ptr); -void cpu_x86_xsave(CPUX86State *s, target_ulong ptr); -void cpu_x86_xrstor(CPUX86State *s, target_ulong ptr); +void cpu_x86_xsave(CPUX86State *s, target_ulong ptr, uint64_t rbfm); +void cpu_x86_xrstor(CPUX86State *s, target_ulong ptr, uint64_t rbfm); =20 /* cpu.c */ void x86_cpu_vendor_words2str(char *dst, uint32_t vendor1, diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index 990048f42a..824375d42a 100644 --- a/linux-user/i386/signal.c +++ b/linux-user/i386/signal.c @@ -268,7 +268,7 @@ static void xsave_sigcontext(CPUX86State *env, struct t= arget_fpstate_fxsave *fxs =20 /* Zero the header, XSAVE *adds* features to an existing save stat= e. */ memset(fxsave->xfeatures, 0, 64); - cpu_x86_xsave(env, fxsave_addr); + 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); __put_user(env->xcr0, &fxsave->sw_reserved.xfeatures); @@ -569,7 +569,7 @@ static int xrstor_sigcontext(CPUX86State *env, struct t= arget_fpstate_fxsave *fxs return 1; } if (tswapl(*(uint32_t *) &fxsave->xfeatures[xfeatures_size]) = =3D=3D TARGET_FP_XSTATE_MAGIC2) { - cpu_x86_xrstor(env, fxsave_addr); + cpu_x86_xrstor(env, fxsave_addr, -1); return 0; } } diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index 6a319dadf2..a09d6aaf07 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -3047,14 +3047,14 @@ void cpu_x86_fxrstor(CPUX86State *env, target_ulong= ptr) do_fxrstor(&ac, ptr); } =20 -void cpu_x86_xsave(CPUX86State *env, target_ulong ptr) +void cpu_x86_xsave(CPUX86State *env, target_ulong ptr, uint64_t rfbm) { - do_xsave(env, ptr, -1, get_xinuse(env), -1, 0); + do_xsave(env, ptr, rfbm, get_xinuse(env), -1, 0); } =20 -void cpu_x86_xrstor(CPUX86State *env, target_ulong ptr) +void cpu_x86_xrstor(CPUX86State *env, target_ulong ptr, uint64_t rfbm) { - do_xrstor(env, ptr, -1, 0); + do_xrstor(env, ptr, rfbm, 0); } #endif =20 --=20 2.34.1