From patchwork Tue Apr 9 05:02:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 787185 Delivered-To: patch@linaro.org Received: by 2002:adf:fdd2:0:b0:346:15ad:a2a with SMTP id i18csp57739wrs; Mon, 8 Apr 2024 22:06:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV+Vksd7NH7FLKTxKetb+CPuFa2n+1FV08TlADMI6It3BRReNJeyovAHMH4TgrVN9XPLgkrNfJ0b/+F5u+s1Od1 X-Google-Smtp-Source: AGHT+IH+B3gowr3jKZRxXpFcRbGQTY7wqxHBdAsows7xC/QOVk6HdIpOd9m/LZVsbC2jUivwq4G8 X-Received: by 2002:a05:6214:2387:b0:699:2443:bcea with SMTP id fw7-20020a056214238700b006992443bceamr9140171qvb.22.1712639195671; Mon, 08 Apr 2024 22:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712639195; cv=none; d=google.com; s=arc-20160816; b=iWv6bApCm69nf+YSrVjmunxM3Xg8D86HWqFUIz2lV8F7+hLG1LTiItIye6z5irwlYx 7Ma1BSVhjhrWEppXLvXdWlgy/nt2oqudWlgYqgR10o1AfsdDW3au//cf2+fYqSqW3aly gmv4xffFlUzsBvAc9VJwfy2hmhCgOLS2OaVidKR7AreVH4akqF0JnL54mHyXCZeSQP1k hvK+OQ6sQuOOVuVLxbMe7oPtBV3PoEBd8Q1G4Ss9+AIYNvY3j4RSN0VPbjb9Vkyv163u vz3cgGTxEbKQEs6f6x/RjtbGx5rmj+XmouoBtfKntfhGDutGmgcOyVQqt7vCkSLCWSNn 6Q+Q== 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=ty9Kcl8q8mjC0qYnkE9obh2ntk7k/Zh+tnhaLzpayq8=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=VR3fIM0yYX5X3SZNKKEYVokYYTO466Aab0rji5XO4/NhjsxSMxp/NJqu3h04WlwJwc ov3uXb0joY5WHnmwwG1gKP9EhPo+43OiXmRHw4BCjIGVr5WVFWdtx93KJCn/h4Ko5X+9 hBjvt3kYoxzGDvRTzabUK2eV64NF/xQTwxnt75miaEIuaeSl48NZEXPu/iSDz5dTLep1 /MvO3S+vVBgFtI7rRfdNMcnRhGHFUjJP89O6UQ10ix6IbNZ47AAHGZbHzEPP18QBqhEt Y575LYweJIU7scNZtc0gR+stfLSkjiPQ7LdGMrBSdUT6C0J48Xry3R6gJisWQI8CTUwd H88A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Fo5sIzc0; 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=fail (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 p5-20020a05621415c500b00696b0e4b287si9413954qvz.477.2024.04.08.22.06.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2024 22:06:35 -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=fail header.i=@linaro.org header.s=google header.b=Fo5sIzc0; 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=fail (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 1ru3dn-0003BF-Ge; Tue, 09 Apr 2024 01:03:27 -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 1ru3dl-0003AJ-EI for qemu-devel@nongnu.org; Tue, 09 Apr 2024 01:03:25 -0400 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ru3di-0005Hi-SK for qemu-devel@nongnu.org; Tue, 09 Apr 2024 01:03:24 -0400 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3c38eced701so3051323b6e.1 for ; Mon, 08 Apr 2024 22:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712639002; x=1713243802; 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=ty9Kcl8q8mjC0qYnkE9obh2ntk7k/Zh+tnhaLzpayq8=; b=Fo5sIzc0m1hhRYeo/htBiT9QnnlUxgrENlSwQjmQdNFBdt1pdVXyj8ZHKep8RZU4OB NyudmFqHM6cMZcJz4oBLnUC02/VYsdmdw0P5ioEqN8mnG2no1I9VoanYtEG0aRoBqoIQ JrgkGxuMgRa77b5PbF1TNccfT7sNSlAUKOhrh2t7a5V4xluHewuOeQ97L9DmN9U+YpyK VQJKOXBmvedtMVrVlqVx1VZ4QQuEE9YP9BbQVlQEsRV44rbwpJNAES/Ia0ghJfB0ynJ+ OI6afWgKjMv7uG/v5hcTiIhO+6FJy+WVBVvEIW8glJRuwGQf+vrXXk2EF4AvSYmiskGQ Sz6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712639002; x=1713243802; 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=ty9Kcl8q8mjC0qYnkE9obh2ntk7k/Zh+tnhaLzpayq8=; b=jQODh7N36XhAsUJqbZRRWk46tumd8ca2JaNDxerCjafhZzLfakC7G0HuoUqVKgXTy5 eVMFHT01iAvA329IX18WxG6vXHMzRetCeIJK33EmImEZhynER0w/+/F4o7ak8aL2zBPM 08WpL39bNRB0D/V+ho0mtlyEKwEgrkAjxHhyC3hXGt3aSokbYS5dsMd1RMUFPeeWzXQ2 b9cFQcD2dTAuuy2mzhUpxlgp1uCqhFSY6cw/A7D/40lkXWPWLurnqdOi+bJqzT8LXNE3 LP5WD8aDiiD5g9EsPm/AOv0d/5+kM4rujQveqAl3JbqXdG/WYhV2aX3ETtAV43zRxI4o cpGw== X-Gm-Message-State: AOJu0YxfNaqVrtjACd7OCwtqC4lwDLwYFRzMDbAepV7aj+dERMnNbpEd IVPwnjO6/J6V4N1w2Tx+WW2drfQngj/VfwAXyDKnnqS7OPeRWYmtYPpW0wwXZAvsZPA94GTAdo0 E X-Received: by 2002:a05:6808:13c6:b0:3c3:c17b:9e0 with SMTP id d6-20020a05680813c600b003c3c17b09e0mr14005822oiw.49.1712639001814; Mon, 08 Apr 2024 22:03:21 -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.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 22:03:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 13/28] target/i386: Add rbfm argument to cpu_x86_{xsave, xrstor} Date: Mon, 8 Apr 2024 19:02:47 -1000 Message-Id: <20240409050302.1523277-14-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::22b; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22b.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 For now, continue to pass all 1's from signal.c. 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 6b05738079..5860acb0c3 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2223,8 +2223,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); /* 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 cfe70fc5cf..68659fa1db 100644 --- a/linux-user/i386/signal.c +++ b/linux-user/i386/signal.c @@ -267,7 +267,7 @@ static void xsave_sigcontext(CPUX86State *env, struct target_fpstate_fxsave *fxs /* Zero the header, XSAVE *adds* features to an existing save state. */ 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); @@ -568,7 +568,7 @@ static int xrstor_sigcontext(CPUX86State *env, struct target_fpstate_fxsave *fxs return 1; } if (tswapl(*(uint32_t *) &fxsave->xfeatures[xfeatures_size]) == 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 11c60152de..dbc1e5d8dd 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -3046,14 +3046,14 @@ void cpu_x86_fxrstor(CPUX86State *env, target_ulong ptr) do_fxrstor(&ac, ptr); } -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); } -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