From patchwork Tue Mar 19 16:19:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 13596884 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF0C9CD11BF for ; Tue, 19 Mar 2024 16:20:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmcBb-0005VL-AZ; Tue, 19 Mar 2024 12:19:35 -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 1rmcBa-0005UJ-04 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:34 -0400 Received: from ivory.cherry.relay.mailchannels.net ([23.83.223.94]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmcBX-00049c-W9 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:33 -0400 X-Sender-Id: _forwarded-from|134.3.94.10 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A0EF5543570 for ; Tue, 19 Mar 2024 16:19:30 +0000 (UTC) Received: from outbound5g.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id F0A0154359B for ; Tue, 19 Mar 2024 16:19:29 +0000 (UTC) ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1710865170; a=rsa-sha256; cv=pass; b=ST6VlGT6nm6hnTC8uXbvHarwI79QIKEW+h6qScekvgLZWpeyTn0Cdn8Dn+/0tVrzUQdjzv XyK+bIePB4K2RHYoNnRUkNPD71ibUk1BJMQV//I7AnwKK4jGckxgM/AiFY1tYPTy/pg2hP tZdFINrYhIjLdZ8aB5nTp7SKBxeWAmTnJb+R8tGiY1DR9mPdMDGyX8AIJl5bnhr2rFmXSR Dp44dCcl4xAmh5yD8oUWsj4Pc+d3/zUFWHEmJMP0m+d7gGWAsrMiLQURKCIdY1DLaFawlc 8ksQ6U8jENqErVMtNZQY6F9jHmz2uUTxysGiyoUmMdVN5ZceBmuL1085aRUx7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710865170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=W2vqwFH7m336Hnj/3dBURO4h8IegB6+STihKWyQqSts=; b=Ix2/ItY0gx0UnPAW3bRJM3LfYm84NeflYcKA6JmUIE3kjqHBU2uAbOosq1n/MXQZbJgUSh nXU+Qhvd8/8gZDv0Tc9zL67K3z6SF1o5if+LY7FnKTz5sK46YPNS8gryUsE0hcW0U7tsEb 5JiGPmoP5jnxxG2pHv3DFr21pgX8zHjTr8RCwjNlAr0SrrMkPNOU42zxPMpqZJQf4QLS+J CssJctFrG7W5TBk8j3/1rvPVNc/j4Jc4hHtJNsHPJcPLq67ozeE6uIUtbnBmDkl5iLgC7D 24diy7pN4Oj2gr1Yb2qbXoD5LWtigzmksCx4+/tXybu2elkiEabeXJAME1JpZg== ARC-Authentication-Results: i=2; rspamd-76c7995f89-r2xsf; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Wipe-Scare: 31ba2b0b53322233_1710865170523_4189028083 X-MC-Loop-Signature: 1710865170523:3569400075 X-MC-Ingress-Time: 1710865170522 Received: from outbound5g.eu.mailhop.org (outbound5g.eu.mailhop.org [18.156.67.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.109.159.228 (trex/6.9.2); Tue, 19 Mar 2024 16:19:30 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1710865056; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Y4d4ys51KcaBKbOWghKyrAZLpAl6P79TG5JrOq3OGMT/ROukhc7kNpZpPA5cXBc3nSdhmo6q7OP8C 1ztoQ71Oo/hioTh0j6pLU1OKAJjClE+TqB4dRFqqkUEqICnzdZhxwFR03XN0y6jsB6TgQwMuWvUeR2 fqMh2ze1/mIgH/bv3qAQtBGeKzAklDXwxLoBj38kCON0vUqrWSPXWvAltjTjJRx+L0N3TMLk1v8LQL E2kMkkdSVRNs6KrdtcnLwgoK/SISrCUx8AMxIryRzZHbuwL1q+WPVqDdf7Qs2Mn0ua1okf3ZiIHIye EI+NMvakrL28TE5ih102ILC+dJoTxCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=W2vqwFH7m336Hnj/3dBURO4h8IegB6+STihKWyQqSts=; b=TsbzLkkdmwlGtnylHuCoTO1PXxl5ePiQT4TZPxzi4Zm5czUdxI8ay7ayiv6xAzzrPQt4waBSdMbE1 7W+KBauOknVjxl3l9KFiuImkLov8xWkoiCza7mfKuuDzyfyT8hlxjsIuonRCLxIueVEH9cuDuHAYmY FHpX6tTfmkHVGx286Azd8tksHDHqctFvPvwubljTRfYsoNTAzP0YGjx3mKqrY1MgyKld6UpmQ70OEJ 7g6EVP16ACkYhiGqW5Oeel+M5+6AEv/xli6vpNlj5IKNlZmHq/PUNi2ANXBf+o2WwyNTgg2zuMyPqU 4VHcIXKpQUApo7hkgxmXB7kHWiDCIyg== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=CYFbepqS; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=W2vqwFH7m336Hnj/3dBURO4h8IegB6+STihKWyQqSts=; b=rS2vYnQlEKa7yXNaQ7lQ9FCqbvgAQycD1XuGKSlNmqEP8S17KQk2dVDTl9GUUokfOafyvqLKr0yRL 8J4g7d0dNZiTeizX4Pce2vycKFmkSYqAOuxRFZrhAWpyJylFrqUPZMHUZ9uT4ugmTsDn8N+F6n7uGt aGwXaiLTA97WgRL0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=W2vqwFH7m336Hnj/3dBURO4h8IegB6+STihKWyQqSts=; b=AmrWBmKNPKOWFnDCIo48tPo4k9J8N/fQTxaiBZMn3eYczZYiPZ6lI0C8pJ3qmpZjEbQVtV34UvEx5 ZcZrQcGncvlQceLx9HrsYJwUXiIqR1B5BUBBasRY5esjCFadF15lm4tGND11/hWW4e/FSubLxSTSw0 ULPRvUi4sKeA1NL0JnVqR9Vb+qJqHo54AHPi9ZozPWHzUsGr//EYcTHF2+xl3gwEZKFAQdlBtk1zyP ruyo2TMPkIWsqhTTYDo9NnUFoshJFYXlS1e35F5CTKXRpQFRrpCNf3mfXXxB9bwX0jkHGfdbs+0Thh wjmEf603S6hm9KG1ejobk21QkzicxYw== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: 30c8150d-e60c-11ee-b7d4-9b9d9be6ef2c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id 30c8150d-e60c-11ee-b7d4-9b9d9be6ef2c; Tue, 19 Mar 2024 16:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=W2vqwFH7m336Hnj/3dBURO4h8IegB6+STihKWyQqSts=; b=CYFbepqScxDBuHxlpQJEX59nY3 rp0jFSfK7+4upQl9YAeLzp7H2n8zUmKTkqSlSPIY/ijKSyK9T/8meLl8Kf5URj7vYfocm+nEBio1J 8iX8we7Hsb5oA4lLmPLpkuxO3e07A9BAQvdnmC+vDjJ1vbEnht2gCBwc6EhP73DKsxvhEnm7Dg8ct vvSMfvgvpBDxBuIvhPG8xZaIM2GOWpTrtdwkRWeot/AtmHSG13m7xN2HrcAMihGzjho6Z7cWSZODW Qm2cj6wIAbGiq/ZGjGYjAYZqN2n08+dRjLSWz+qoI37iqCiBJFM7fe+SjONspY/hfBvGswL6fhn2v v/ioKkww==; Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rmcBP-004VVI-2o; Tue, 19 Mar 2024 17:19:23 +0100 From: Sven Schnelle To: Richard Henderson Cc: qemu-devel@nongnu.org, Helge Deller , Sven Schnelle Subject: [PATCH v2 1/6] target/hppa: ldcw,s uses static shift of 3 Date: Tue, 19 Mar 2024 17:19:16 +0100 Message-ID: <20240319161921.487080-2-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240319161921.487080-1-svens@stackframe.org> References: <20240319161921.487080-1-svens@stackframe.org> MIME-Version: 1.0 Received-SPF: pass client-ip=23.83.223.94; envelope-from=svens@stackframe.org; helo=ivory.cherry.relay.mailchannels.net 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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Fixes: 96d6407f363 ("target-hppa: Implement loads and stores") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index eb2046c5ad..6a513d7d5c 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3085,7 +3085,7 @@ static bool trans_ldc(DisasContext *ctx, arg_ldst *a) dest = dest_gpr(ctx, a->t); } - form_gva(ctx, &addr, &ofs, a->b, a->x, a->scale ? a->size : 0, + form_gva(ctx, &addr, &ofs, a->b, a->x, a->scale ? 3 : 0, a->disp, a->sp, a->m, MMU_DISABLED(ctx)); /* From patchwork Tue Mar 19 16:19:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 13596883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4368C6FD1F for ; Tue, 19 Mar 2024 16:20:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmcBc-0005W9-8X; Tue, 19 Mar 2024 12:19:36 -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 1rmcBa-0005Ur-FX for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:34 -0400 Received: from cockroach.apple.relay.mailchannels.net ([23.83.208.37]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmcBY-00049S-8I for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:34 -0400 X-Sender-Id: _forwarded-from|134.3.94.10 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 80EBB143682 for ; Tue, 19 Mar 2024 16:19:29 +0000 (UTC) Received: from outbound5b.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id A9F8014377E for ; Tue, 19 Mar 2024 16:19:28 +0000 (UTC) ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1710865169; a=rsa-sha256; cv=pass; b=WbBku9TB+3Eaq8VxsJqj8wR6zjUZRBvXQtMfSVk1OoM8dq+QJ/kfgIDLLCcaX6qbG1rm15 yi3ILUT8wD8arqgZV1jx0H/8V10nVWL+QfJcOwnVvoX8P6Jn+dFQM+gXCbvNAtK0U4UGs5 mZK9MU9IJMt9TEwwkEH5P/I27L73L4ejTnzgAhLwoswE6S86jvTLhG2OqCAW+yNq+y6fPD e8bSCqz7efji2HjX7f8HnpLgYiDZ6kKPQauRE5//+tU9jsRKr+8ebQy7u8RtNAKdTL1LtW 1+OdNp1I9izKmJFWP/NFMys+ZQAHWHaeVPji1SLDah7Lxh6fvYej1BulJTGvbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710865169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=B06SV1wbypmp+DquTUTmW8+G5JiS8jXqtvpB1DDgEh4=; b=CdGYIKaBERvjL9wTZtdNGFw9akhH70fECiDs8SXaJ9GCAHbubQu4Zx5vSCjz1GahRgTubv Jngqvb36PPYkpRp4R0JWqOfhcoOyaVPZa4vQDtX9Y6RY4B/OXcL9MBSdB8y8FNRmMdH5sS gAt50TgSnQgBaTa4Wem7DHv/FeTB5v2v0r/AZirKssIlEiB6yTbQ8kxm0EQsGGJuH3c2in lKHddhot1gKrl+AydXRaDPrsj5qBoD4pgh3cWawE6AYxxPb8uUH3dhQTfI77QjbvRoncYk t1O11S4OHyjjNZ1sE4oGX6yIn88Ke2jXjFeE4hOkO2SodLBQ4dgvQYmp+h2l+Q== ARC-Authentication-Results: i=2; rspamd-76c7995f89-lgx7d; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Befitting-Tangy: 44b52cf309e5c235_1710865169241_4005851963 X-MC-Loop-Signature: 1710865169241:4104094198 X-MC-Ingress-Time: 1710865169241 Received: from outbound5b.eu.mailhop.org (outbound5b.eu.mailhop.org [3.125.66.160]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.111.46.219 (trex/6.9.2); Tue, 19 Mar 2024 16:19:29 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1710865134; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=SvGA66XA8QYTn29+xEDe5B+cIp+VZCfg6NUU4NLzcqG3hyP7r/GrZuArqyPTTq6syJXF/JzSavu5v qoXf/XrKdgpmi10IXQ4chPnTNYIb8wRi9wVIyKxw66HG4IZIIqn/j4yKpsj6yYRsJY3HBqPiio+1rI hLUW3A2QOe5PiFB0ZNqIAUZgQq3B+xn5iRARslKEwDdWVXSZxkmn3WxjGWEgV4bExh1xvBUcjTDpIC 5P3nB9couJLd0nHYqDgsIbKwOGRBTiB4N4fwM4/v4SZl/3pE7l60/67xxBfGiyZX1s+WsEBvemkgKT bSl3t/sGkma8JQAPWoLwJiRIfPnTGSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=B06SV1wbypmp+DquTUTmW8+G5JiS8jXqtvpB1DDgEh4=; b=YvRPhBjT7J0yTZ+TmfyfxfEGDq5aY3Ckqy4pK56eCTfYc0WCutGa2VPLOQ85T6kFoT+gekRHZsCK8 bQHHt5fTRNFao9GEcGmRvrPsYFAzm88PH9W2RuiOv5TQ/PkC0W9Ud4v1jnOUoA0soO9vEpxhr4Tr1I zLY7KmgXSkvr55Xq2xvgihp+POgniIok8IPsW7NfzcEz0GaIGHvChdYfsXtZX4tyie6rU2EZrtFpKi UWKNT9SW2hifMWk8Pu2EjmCQ+4fVOY6vb8EZJ3vyA/Dqnz+vn1b9/J2JLsXWVqCaNkkR4P2FpW9bpr g9pivnVVqEmVdtJ4VSpJO/CaeiK9jWA== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=dBbG1Z8I; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=B06SV1wbypmp+DquTUTmW8+G5JiS8jXqtvpB1DDgEh4=; b=UVY56rvN6S2ElsIPlWM+AE7IMuQ22EZGsHZDgrGdsukPE/0p9CgDJL64iDnrFhnuXZv++LQU1j7pM 7vI9Sfh7lawN95SS/uOCDRmxOKx5klz+h8ALA9MQ0dxWMg+CmJ0k8zeWQHFHz5tjNiH8yobKZahHiI JdGz9Bem9onu40bE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=B06SV1wbypmp+DquTUTmW8+G5JiS8jXqtvpB1DDgEh4=; b=rEsTYIFWVtRGkLCdDqJCoxbaNW0YdihOXIXxHZy1SlWsDbJGIlSyGZlGStMe7p+23pk1QHfC+cBA/ Db97BSiGsgK2X832Qvm5EHocez5GqI/ksuiw0hkmNEFvSXkmuUo0RloOA4J5LhiJPPvqbidOH+1xUq zrU1J4hi8mxih/sJrnNkq3AgX36T7e431Q5Etzy0UsVb3oRJeB9fiKpGny4QajNPujahy5F1WZDB7v XKzGCLgXbLOLDBtN4WcsNwU1/GJhjCot/F1hJTCFN9rothMxic5jwlpbk3g3dMp9CbyWQrO/dKsd2H WfUOAw9BU6LAGeJF2hEGyZSA8+ndF3Q== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: 5f78f6e7-e60c-11ee-b1e6-eda7e384987e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id 5f78f6e7-e60c-11ee-b1e6-eda7e384987e; Tue, 19 Mar 2024 16:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=B06SV1wbypmp+DquTUTmW8+G5JiS8jXqtvpB1DDgEh4=; b=dBbG1Z8IgviwAGk1x9kpuHdSPy X5L9am1lZCcSTXtj5BFkOB23bIEnaJQFL6dVRpi9ykK6PtmWcmcFB9996jHf8O/Ox9vSA7p5wNTFv c5YYzELPewbNC6X1hnzZgCs95XPmZ5yghVUk/XbpNP1cCRdBOddLmYeR5vasTi6XYzbIHmen+NdUM HCG/FGfeiEgG6712zRumA1BVzZmxWnirG+5DrSYq83B/jp3Oe/iDOztxTbxEUWlcGEbDaQZouikye dwz1fIF8UIvTV2kriYVeo5yWsjLT9dUzkmXupnwBs3GuRnDO2R5qBKhV5puZTOkx7n8ZjeoRBujVo g5PppLhQ==; Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rmcBQ-004VVI-0X; Tue, 19 Mar 2024 17:19:24 +0100 From: Sven Schnelle To: Richard Henderson Cc: qemu-devel@nongnu.org, Helge Deller , Sven Schnelle Subject: [PATCH v2 2/6] target/hppa: fix shrp for wide mode Date: Tue, 19 Mar 2024 17:19:17 +0100 Message-ID: <20240319161921.487080-3-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240319161921.487080-1-svens@stackframe.org> References: <20240319161921.487080-1-svens@stackframe.org> MIME-Version: 1.0 Received-SPF: pass client-ip=23.83.208.37; envelope-from=svens@stackframe.org; helo=cockroach.apple.relay.mailchannels.net 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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Fixes: f7b775a9c075 ("target/hppa: Implement SHRPD") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 6a513d7d5c..8ba31567e8 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3462,7 +3462,7 @@ static bool trans_shrp_sar(DisasContext *ctx, arg_shrp_sar *a) /* Install the new nullification. */ cond_free(&ctx->null_cond); if (a->c) { - ctx->null_cond = do_sed_cond(ctx, a->c, false, dest); + ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest); } return nullify_end(ctx); } @@ -3505,7 +3505,7 @@ static bool trans_shrp_imm(DisasContext *ctx, arg_shrp_imm *a) /* Install the new nullification. */ cond_free(&ctx->null_cond); if (a->c) { - ctx->null_cond = do_sed_cond(ctx, a->c, false, dest); + ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest); } return nullify_end(ctx); } From patchwork Tue Mar 19 16:19:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 13596887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39D95CD11BF for ; Tue, 19 Mar 2024 16:21:07 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmcBi-0005ZC-40; Tue, 19 Mar 2024 12:19:42 -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 1rmcBe-0005XX-HM for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:38 -0400 Received: from ivory.cherry.relay.mailchannels.net ([23.83.223.94]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmcBb-00049v-WC for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:38 -0400 X-Sender-Id: _forwarded-from|134.3.94.10 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7289FC3492 for ; Tue, 19 Mar 2024 16:19:32 +0000 (UTC) Received: from outbound5c.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id 99300C33C5 for ; Tue, 19 Mar 2024 16:19:31 +0000 (UTC) ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1710865172; a=rsa-sha256; cv=pass; b=lZ/0Zg5ldKy8rq4iHDDu4wdPECrR429NyCMnZi3CyBxUeirNULF9lxc1sjvBWb2Weqej3n TGyy+WVG3g5FGcQ2Mo/aT+WzSZ4ubP9PRCFgy43no3Luzcgk03ctEVNVYlNySLlUziGm/7 Hj1896jdotC/cDLtiFfo3mqOA8MKUWXlANKDB402INPluUCU4pBeYIXIjsVTSRz81yTpPV puPRrzHt2Np68Y6ZtR3KXq2pspLjxIdVYAQRVdPKTmzb39kByzZpGpGznWJmeVjMQ52vly mVptuN7FdlvMVwUnikwIdHQOh70yJBg6DxNhPsKgmNoBehM9zQf4UcqWVGpy7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710865172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9lrfYQOjBLc4A4bdNI3q067UC3zgV7RvLSKSwlIZbvs=; b=917I6BQewXTYuvHUiFV78h3zo+5gExjYKDpwRdFFNRLr+5CByEAjFaCbeb7yNkpwliOwXp j1tEpmOjASAtV0mkeEQdtzYHZgQYx8lX6yI9gUkiErpdKxkcSA6eqF+vP/ZZWxGVEErnx0 R2pBhrZJjrXr2HZqpkz6SCikeIb6fG2SloNboIZPGf8fewVVNRdStcU6Vv42qGIfUOlXYS 0b9Yd3BLK3UTI1h2Ze4zrtP6BDdu+PdZ6YOd0XgNgFjbkdD6szP/lhW5xcplOZhIPLP+IA XCL0Iwr3ZRe8hZR5KsKgbAxa0tp23HVSNjkAykM6yakp6CHSATmUKHFuirJ1vw== ARC-Authentication-Results: i=2; rspamd-76c7995f89-psfpx; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Daffy-Glossy: 48303ec6796758cb_1710865172293_833756396 X-MC-Loop-Signature: 1710865172293:1831431793 X-MC-Ingress-Time: 1710865172292 Received: from outbound5c.eu.mailhop.org (outbound5c.eu.mailhop.org [3.125.148.246]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.119.164.55 (trex/6.9.2); Tue, 19 Mar 2024 16:19:32 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1710865134; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=RPI4K40CiDfZF4JqWIe0KIGDBPNVmywBXzP9Bb6FlQn2gHkXrMVPea9WBBy+q/7g0VHstOzsM8B2e eaqE6pvcE1jTO1RAoitg4frta2/hpZqhJ5kerizPGdT3r3k7lBa5GI0jduw/XSeIBUYt9jxjCs3s4G 2yxEcV3weAEArb5tdgoDbCkBcyb1VO2Lton36+gIqMJETPLgn40DmFWu/pVm6KvGhP6DWmDX9ANSzI jW1OpP4JLWFuNnQxMdu3HclDUuH2B9+wrRXlwZikxUrn+6DbiQt1KtTVCYHxXcs3qKgB+v0R+Uvnou gKWxzPIpt5lcLbmjzrkRLFxjV/oI7NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=9lrfYQOjBLc4A4bdNI3q067UC3zgV7RvLSKSwlIZbvs=; b=nacUtgdoifCk+mkLbVM6o2WQ2A4r722YyP0FgzyYNNWbkUbER7cqQPPav0EkeIBnUU+q7Va486wH5 9ECpdNrJJXblrloqS5inBdr2CUkWYThWrc/4aWOVE2A4t48q0GLRUJ+dLk8odw0VQ5NKqxSmesyKec +NVNf+OcYK1lMgR+8PayIYUv1+LPhieLw7ZsCbFbBCAaVfqb6sEb5FsWOiGcMs1Par11UUP2Ixdt2c iXvtrW8jIXcmSbx71De/a5M5TtRxXK5fulgTrRWqUmFqzgCodONqHpZF2+6kE36QBDhz3pnXOwghlt 6FPIatcDtO490pUI5HUOdqOB6VXEwAg== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=fRTK5nxy; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=9lrfYQOjBLc4A4bdNI3q067UC3zgV7RvLSKSwlIZbvs=; b=lkOLHdJN5ObwMRLT/o42j28cYt1WeqExTYA8Yn/DwYVNjskA77VUBLstVPvjjBcjQlX0zU9KkCXwN XfbGdiCMIN+u42fWWAgOYjxmE0vvAOa6QpWW6pglNH2qiDdzR2Z5ZOb1MUHp3D+y7GHPa6qtluN8JY EanFORB/URO/NBb0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=9lrfYQOjBLc4A4bdNI3q067UC3zgV7RvLSKSwlIZbvs=; b=qfZzjyRduVMBTaWv6Urfs8pNSUWOLUqC09arUahMJbTNHeSG3nwhSaM5CvrAqxXV7dgUx8y4xasdQ ifEli6/FDS4hmqSizdyK/YcDm6qbGZWJJdY6TIf6H2NFTKgURE1HB8cU2N/RtOuLg+hO+bT0u5v9GM 5YMCgCa5rk00gBepSrZ822hmwB50TrcBcLHC2AehoYFp9VhkQQK8pt0qnxcpIsUn4acCjEl+8AJMKw I1Yh3Gs9d2rLQTvK3J7SVQXljn085w2q6c5HIh0x45sIVR+8fbTo6/0MiqDlsLmWBIrJLOyol6s9D0 vuZ+ZT7sIi/qMESPpQquWXgbLR8VG8A== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: 5fa5241e-e60c-11ee-b1e6-eda7e384987e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id 5fa5241e-e60c-11ee-b1e6-eda7e384987e; Tue, 19 Mar 2024 16:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9lrfYQOjBLc4A4bdNI3q067UC3zgV7RvLSKSwlIZbvs=; b=fRTK5nxyph0f1JpLAdWSSa1cQR hGyQzHLPzggWXGquTpQBWe+5ORwF3gGl0sgWHyKNlHb5hNjRH6HGYbg220vxy7U2agyS9zpDCPBoZ L2nT3rNdOKUnsFv5PBJl2kpohFi5ZB3lkULE8mPjCixWdhRg7YRRDnmfTeaG+qBpj0dSMrXcH4M2k 8Et0tGUnMbGiN1WnkkDFpxwCTkPU6IYHcEIY2GjRCRY0/TAZpIm+g7Hf8Fqax56/DywduSN7oRjhA kW7GUKnNjMzyUdFjdX5hrr1SmgkC94eEan5uY17SHq7V7OGNM+QIAYlaCL76MbCv+F4JsUro7ivFc Qd07zzCA==; Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rmcBQ-004VVI-1I; Tue, 19 Mar 2024 17:19:24 +0100 From: Sven Schnelle To: Richard Henderson Cc: qemu-devel@nongnu.org, Helge Deller , Sven Schnelle Subject: [PATCH v2 3/6] target/hppa: fix access_id check Date: Tue, 19 Mar 2024 17:19:18 +0100 Message-ID: <20240319161921.487080-4-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240319161921.487080-1-svens@stackframe.org> References: <20240319161921.487080-1-svens@stackframe.org> MIME-Version: 1.0 Received-SPF: pass client-ip=23.83.223.94; envelope-from=svens@stackframe.org; helo=ivory.cherry.relay.mailchannels.net 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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org PA2.0 provides 8 instead of 4 PID registers. Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson --- target/hppa/mem_helper.c | 59 +++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 80f51e753f..f89ba91b20 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -152,6 +152,49 @@ static HPPATLBEntry *hppa_alloc_tlb_ent(CPUHPPAState *env) return ent; } +#define ACCESS_ID_MASK 0xffff + +/* Return the set of protections allowed by a PID match. */ +static int match_prot_id_1(uint32_t access_id, uint32_t prot_id) +{ + if (((access_id ^ (prot_id >> 1)) & ACCESS_ID_MASK) == 0) { + return (prot_id & 1 + ? PROT_EXEC | PROT_READ + : PROT_EXEC | PROT_READ | PROT_WRITE); + } + return 0; +} + +static int match_prot_id32(CPUHPPAState *env, uint32_t access_id) +{ + int r, i; + + for (i = CR_PID1; i <= CR_PID4; ++i) { + r = match_prot_id_1(access_id, env->cr[i]); + if (r) { + return r; + } + } + return 0; +} + +static int match_prot_id64(CPUHPPAState *env, uint32_t access_id) +{ + int r, i; + + for (i = CR_PID1; i <= CR_PID4; ++i) { + r = match_prot_id_1(access_id, env->cr[i]); + if (r) { + return r; + } + r = match_prot_id_1(access_id, env->cr[i] >> 32); + if (r) { + return r; + } + } + return 0; +} + int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, int type, hwaddr *pphys, int *pprot, HPPATLBEntry **tlb_entry) @@ -226,16 +269,12 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, /* access_id == 0 means public page and no check is performed */ if (ent->access_id && MMU_IDX_TO_P(mmu_idx)) { - /* If bits [31:1] match, and bit 0 is set, suppress write. */ - int match = ent->access_id * 2 + 1; - - if (match == env->cr[CR_PID1] || match == env->cr[CR_PID2] || - match == env->cr[CR_PID3] || match == env->cr[CR_PID4]) { - prot &= PAGE_READ | PAGE_EXEC; - if (type == PAGE_WRITE) { - ret = EXCP_DMPI; - goto egress; - } + int access_prot = (hppa_is_pa20(env) + ? match_prot_id64(env, ent->access_id) + : match_prot_id32(env, ent->access_id)); + if (prot & ~access_prot) { + ret = type & PAGE_EXEC ? EXCP_IMP : EXCP_DMPI; + goto egress; } } From patchwork Tue Mar 19 16:19:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 13596882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4D81CD11DC for ; Tue, 19 Mar 2024 16:20:00 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmcBg-0005YW-1l; Tue, 19 Mar 2024 12:19:40 -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 1rmcBe-0005XY-II for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:38 -0400 Received: from kudu.cherry.relay.mailchannels.net ([23.83.223.97]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmcBc-0004Ac-5D for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:38 -0400 X-Sender-Id: _forwarded-from|134.3.94.10 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D1EB31438E6; Tue, 19 Mar 2024 16:19:34 +0000 (UTC) Received: from outbound5h.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id 1E7A9143928 for ; Tue, 19 Mar 2024 16:19:33 +0000 (UTC) ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1710865174; a=rsa-sha256; cv=pass; b=4MStel1Yfjimf1BLP4rQA1PtZj01EEOvmzDObLcNMfg21qXC+5mB2gdnts026FscUnvF1D HpG0xaKyCimH1JlK225NGjnGA1UXe/cXv3tweEiFfddfCcS3rZ4IoAOR7Qd0Gm2Bf8wiGd d4KVmSRB7JEPTCdv9Al7sxFc33Eapt3WmTHytdfmLJwm2pJdyoSHKFc/WQM3tN/1bhGqkM 5PS7F8OO7RV027dMR0Nyku1cwyh149CPlOfD/Iw3C7BLyClZ+yfo+9lOeyMNmCATEKCxn0 8hBguXyAkWJYAIUbML63ZZdC2086O27PWMGRopyexfWRpSjC6CY/drUusRnbeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710865174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ttyEA0+itqx5bj0YYDKwAEzgmyfASs7xeVqfmIShSNs=; b=smmDifAsN41IuPS4H7ubVovw5aaeA/Q2Z2YVxtGK0nwf2f9K7bSd1f0IHxF+Dr4E3kdoC+ CBjyzrhOFeaSd0kCVvLJKBKkH7chcxgiQmnlRcIx6OFSiZCKgkD9KNxGvvK9O9g4yVRGff eZpfdaitGgAEU0qrMzWXLc0RhdRmLpFLmcFK2KOnnmKmcizNWkiqfB0WcTvNn7h8ICH2/y QibR9ppt6YZ/dBfIT/9vm9V+GPh1u5OyI+5Ol0kgpaXS5mJZOkYZYBdpPgb6AIxkP01yTo sWcL8Jk5O/2QD47MCFZI+uj5NDb7MrIwytHuZ0LC7HzV+vWk05GiZ+ip3/OqcQ== ARC-Authentication-Results: i=2; rspamd-76c7995f89-gbclf; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MC-Copy: exfiltrated-credentials X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Macabre-Inform: 0b7041685b281673_1710865174668_104288648 X-MC-Loop-Signature: 1710865174668:1499908159 X-MC-Ingress-Time: 1710865174667 Received: from outbound5h.eu.mailhop.org (outbound5h.eu.mailhop.org [18.156.94.234]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.122.162.95 (trex/6.9.2); Tue, 19 Mar 2024 16:19:34 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1710865056; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Hb0ShrSpVnwr8B7S2b444FLXsfM6eLOOsMQ3pQx25l+Lgcy216FN6FZOxaMDnQyRYoE12Cc5m55tI cBMU1KXi8RcsidKstbFb893XBvzl/V8lBRutLYk3AsxRyPixXWXAGOeWo22W1H3V7IDTeFKlevIi1J 8VvwbWi4rLH4pjXeKIj+4u0FsAo1Pfrw+R1DyPNOpPQY/C/R8D+MjrAQEHr2A/QNp4Jd3EjR7hNbb+ lgibPg8YQGWA34pCW9d/3axAayoA32Jvpv1oqTThGJrfavB+2xPczzHsepFmDrxQ/8GAz71T0R4h1c tOVLt2/poznLNfJDuXpybdqA/4zb8Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=ttyEA0+itqx5bj0YYDKwAEzgmyfASs7xeVqfmIShSNs=; b=oVgo/2IlrZMU2KHTxWdePCiyeYT0gi6Hc0vnq7InBqJ9L2C7c4+vxrvqPJ4G1MvTBmuEX7t1IY9YW W2YTPNDXR38vnt2C/0o4OIyvgP0B0zkZ0+h0ArlyZKJC0dbfdXu4nmOc2KsasCYm5KtWq10SwK4q9B tCbOI1X4GawFQbCMJHHZrCH+TcP+XROqUvZD7a7H78oLzLNQBfdxpVMH7q4iuKv/yhlPb2BliudhXx 04POne5ud5YyKwQue6TouA8WguYDG3967a4aTJgDSMTT5JEQoM1hSSrvX44fkFG7ofTWYmIgSHRmeH aSRCkA5yq90cMNdzCP79yYlsgfxjTVQ== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=B/GKnclm; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=ttyEA0+itqx5bj0YYDKwAEzgmyfASs7xeVqfmIShSNs=; b=BwYTuYnvWkioC4BWzUKBiZHjhYHHUWy/hgh3tJBwYcX8RNQrD0wX8kQ9UkSt5AWWbIEAr5egZ4oeo V0/cdsP/w+ezKzCb2NhGiAr+uO5xWIgpvKabYpjMnVWzuh6eazyXNhfYFhxZrLnHw+YLGu91SaEzl9 PYDuPJZzfNiRj+Mw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=ttyEA0+itqx5bj0YYDKwAEzgmyfASs7xeVqfmIShSNs=; b=p83fsFAqdVn0owjFBQcbzHqODeBuVBXQT6kkrhxoaCw/KdK5VoVSHVvuUmjLjujoCP17HzL7x8T4F EPuz+UUD0uvEvxKHHoU6sn6qEWnvV8P3itVppXK2qNK+BnUfx+FU/paqtOzncCKQcxc6ChyLC1U4+A gWqT0A7HLUZGHhKKhz6oRoTDEADd9Ji7uZHfrTNy/LSD0R/ceG5FLNgEqcRXDoKOHU4SivCsYfbKn6 yaP4Z+56c5AqgIZRmO9RFr5GkiRL7ctgUuVovkOgOrR81R8xKTkWN+YnCS2pjSe91lYo95ZqtZLiyG vqMFeDdEIfGejnZjhuUJDtGn3E1/yUg== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: 3120a9a4-e60c-11ee-b7d4-9b9d9be6ef2c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id 3120a9a4-e60c-11ee-b7d4-9b9d9be6ef2c; Tue, 19 Mar 2024 16:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ttyEA0+itqx5bj0YYDKwAEzgmyfASs7xeVqfmIShSNs=; b=B/GKnclmLdPXyw95UJJIQvKjYF 5tHByChEdbQO0AfWABgZk7zlyE90RNtqkJBnskkLZiuVu+O540rpm9zzYufpH3hkZ6lv9OK4DaUyf Oc1Wba+YZpjasinXW8ZJTWKUm+Czpj5djpaLATPy1XRmuyRv3R8x0IsP1Gf7qmbzb0aCk0+Dswjw/ ohyuC8hlzP5QXZ83dcTwP2D3wZJZ02WjJacirUK2Qxf2zuDUsesBvG4GhSx7xGUEYf1l0t5b/noI6 3DDasiLHp7OESfyANuwHNZBLSbRcTjWsy0ayOTYbg+TMch2ofLTa5VVVXLO5M8BcSTiLRvNWablCT +GFmREbg==; Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rmcBQ-004VVI-23; Tue, 19 Mar 2024 17:19:24 +0100 From: Sven Schnelle To: Richard Henderson Cc: qemu-devel@nongnu.org, Helge Deller , Sven Schnelle Subject: [PATCH v2 4/6] target/hppa: exit tb on flush cache instructions Date: Tue, 19 Mar 2024 17:19:19 +0100 Message-ID: <20240319161921.487080-5-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240319161921.487080-1-svens@stackframe.org> References: <20240319161921.487080-1-svens@stackframe.org> MIME-Version: 1.0 Received-SPF: pass client-ip=23.83.223.97; envelope-from=svens@stackframe.org; helo=kudu.cherry.relay.mailchannels.net 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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org When the guest modifies the tb it is currently executing from, it executes a fic instruction. Exit the tb on such instruction, otherwise we might execute stale code. Signed-off-by: Sven Schnelle --- target/hppa/insns.decode | 6 +++--- target/hppa/translate.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index f5a3f02fd1..409e3ea9c9 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -143,9 +143,9 @@ getshadowregs 1111 1111 1111 1101 1110 1010 1101 0010 nop 000001 ----- ----- -- 11001010 0 ----- # fdc, disp nop_addrx 000001 ..... ..... -- 01001010 . ----- @addrx # fdc, index nop_addrx 000001 ..... ..... -- 01001011 . ----- @addrx # fdce -nop_addrx 000001 ..... ..... --- 0001010 . ----- @addrx # fic 0x0a -nop_addrx 000001 ..... ..... -- 01001111 . 00000 @addrx # fic 0x4f -nop_addrx 000001 ..... ..... --- 0001011 . ----- @addrx # fice +fic 000001 ..... ..... --- 0001010 . ----- @addrx # fic 0x0a +fic 000001 ..... ..... -- 01001111 . 00000 @addrx # fic 0x4f +fic 000001 ..... ..... --- 0001011 . ----- @addrx # fice nop_addrx 000001 ..... ..... -- 01001110 . 00000 @addrx # pdc probe 000001 b:5 ri:5 sp:2 imm:1 100011 write:1 0 t:5 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 8ba31567e8..46da546eb9 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2293,6 +2293,17 @@ static bool trans_nop_addrx(DisasContext *ctx, arg_ldst *a) return true; } +static bool trans_fic(DisasContext *ctx, arg_fic *a) +{ + arg_ldst b; + + b.b = a->b; + b.x = a->x; + b.m = a->m; + ctx->base.is_jmp = DISAS_IAQ_N_STALE; + return trans_nop_addrx(ctx, &b); +} + static bool trans_probe(DisasContext *ctx, arg_probe *a) { TCGv_i64 dest, ofs; From patchwork Tue Mar 19 16:19:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 13596885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C992C6FD1F for ; Tue, 19 Mar 2024 16:20:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmcBf-0005YF-6l; Tue, 19 Mar 2024 12:19:39 -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 1rmcBd-0005Wp-8w for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:37 -0400 Received: from ivory.cherry.relay.mailchannels.net ([23.83.223.94]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmcBb-0004AC-Lb for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:36 -0400 X-Sender-Id: _forwarded-from|134.3.94.10 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 661392C3041 for ; Tue, 19 Mar 2024 16:19:33 +0000 (UTC) Received: from outbound2.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id B7FA82C2D8D for ; Tue, 19 Mar 2024 16:19:32 +0000 (UTC) ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1710865173; a=rsa-sha256; cv=pass; b=B3aNSDCU8LME82PqEDxlmT6RomoV+OcY/41+jScKZLKirhe+Qu7jJ+PWFAlHPqA5tCqcji VLnPuS5kjXTB8a72hOQiZfcMqPdvBi9t3RfPoHpjLqqv/R+iEMBPFy+bb6rLciZ5whfkau 0ZcisgQAWjEusb1nrZwizkfk3vuR4lfKCK9q66CPw3aonjMKbHPUPSuyIsvtl9rh0wZuw9 AMhv7PbHQrFGvli1eRJbZ5u3kxQZ3Rs2f2hoFVyGXSGyFV0eGUX0vGg4W4+61liepW+Knp 8717KVWbGYK2k95fmyiQtlRyla+wfg9zqmtMbyMO0Y6GKsLSqdFwPQyCy65PZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710865173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=DipQ3AMaAdAtn5EwnSvutFf3vANlprVUYGAtGwQ8xJA=; b=RMPMtlNINOFqwWPXhjrPQHRSnEsszlLHKhXmURFYkhuG6dQhV2WZaht+At22hfkLVKftbL 9YZvreW8SUe8+4Igrq1dBqM04JiJtoke6UhxrrZmZVLVtIW+zK3vxGsZnKjZskQYoKVYIG Ov51NQyVV9s3J8U+ntCkmW18b7qkfCI8xSG2Ldeye0ZwdUhcDzE+VG1f00joQ/siJJjvQ5 vg11Mn5EdUXq9unQ1lFK9XrEkCsdgyqKzToawR1TRpikOVcbsnACVKNRlhEuF9RADc0uZ9 sXENnuOF7JOLujiJSzgCrj4DZlIGMNvJ0GVRQMbt+OUj6ek2o0e8C25zad4hSA== ARC-Authentication-Results: i=2; rspamd-76c7995f89-jnsbj; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Little-Whistle: 16923f862ce836b0_1710865173276_1987288883 X-MC-Loop-Signature: 1710865173276:484894446 X-MC-Ingress-Time: 1710865173275 Received: from outbound2.eu.mailhop.org (outbound2.eu.mailhop.org [35.157.29.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.105.100.41 (trex/6.9.2); Tue, 19 Mar 2024 16:19:33 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1710865057; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=wAIHBA+mMpqm3dAgW0MfJmWzS2bn93US6uYnZ4xL81PvuEGc6wFI8HlRi/l1x27kYm0SRHIqs5DIb m04edhKpVXrzzNUxH9yU6w5qrcgTOobO3z5QXAb60+OAj08A5fE6wQMOBOpUDY7y3Rx68FVCiVj4yf otvEofa0iHnljw2yZrjbBfm8Bq6P+6/h08mJMsNcF2mY+MxpOOFvhRRDHP2r1Cox09mPeQLexAwk86 xarmLaVSr8RzEd2a9vwH/3PRHSqmDqYJ3h+RNhhlydeTICy/sVMECtSKndydNp8vnshuw2fN2e55p5 5hWoz5taWDn/ItIa36hwaT/rY42WDXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=DipQ3AMaAdAtn5EwnSvutFf3vANlprVUYGAtGwQ8xJA=; b=iHhB0xkAR/3COAq37SRKs2cQNxCecqscIgfKyeLGGPVuWOeYauSE2W0xaU7tY4AJkDa7IuKrxaava WLzVTgPUeriimrot0AjIP280nbpq81znmdFvxc44jU5qa3rr8yq1eTi95Am7x4EMj6Uv+bwBtt9tZY C2rfNPaMdJoH1UPa5M+SrVKLGaGM9kgnNofZc4ibei/uN5hfZQHrvlZMXz7OVa9eUAPbJbBOTBbx5O aNbaZodFl4OAuLeG9OqNs8R63vcFLVH4f/AVcHAAyCDqDT2rugqFRxOXQ2FhVjbCTOGpJ6cZqFMiDi fxCsOS17taN4+ZXh58yVXqwe/UAzQ1Q== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=c1a37i5O; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=DipQ3AMaAdAtn5EwnSvutFf3vANlprVUYGAtGwQ8xJA=; b=D52o95d7vzIUq1x0HXSdNPMfcIMZ6N8k4PBLkIFzFF7vM5c3qBCRH/LSqnlLH3JSBToF75VVGM5Vh 2Ir6Fm62YKkezUrFJSu2Iep+Mwre9KBx3qiFDCzwZKWewU4czepLmzkfp6o9CS1hOYPfbEWyWhce2c Ktp1oTHALzCb8sW4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=DipQ3AMaAdAtn5EwnSvutFf3vANlprVUYGAtGwQ8xJA=; b=Jlo+pwFuyvNJmFZuGd7MbRX+GnaMYp4GACq9BPd+qi0zpOfH07/16pcjL0rNhazJBL7U/NwYZxq60 P8xlA6YIuJwz7Yaado8NoBQIl3I7d50sFuAgSkC1bnHaS6gx5iHz41XbeWtu/w9SHdhgBZkXgBem5k bQLMyzML16PoEWVoI/Aq7XHhHREhwIzgcxFgQBm8HFtjovtHuLJxTQDeS0zWSiK6sCchY6t1fJUn60 j6pA3rflmAcOAt+TICllKCdsY2El0rccji1IJbB/DQZQHUGPHqyZ4m/OVItrYP0vGF4RFwqMUlh9Ax kHz37CqMmVUDpLc9U83I9H7SAsfAwFA== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: 31e644c4-e60c-11ee-b7d4-9b9d9be6ef2c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id 31e644c4-e60c-11ee-b7d4-9b9d9be6ef2c; Tue, 19 Mar 2024 16:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DipQ3AMaAdAtn5EwnSvutFf3vANlprVUYGAtGwQ8xJA=; b=c1a37i5O+1UVmk9Bbkb06hUQxS XMs5+dEJ5ag8lyaFaGTum5R1SDySbl/ZjuHwFEroALguH32nPitQzvHaO0vHHXEy1uliyZI/xNenK WdmLoN9k+1Ml1L7witHoo00I3/m6Yuub/QknlK1/v3TJBRiZ14w+BfeD0Qk2l7AQ5fvBVFub2g5BV ee+CRYlEoy332gLg5LvjQ2cL+/+m0uv9di/OW9bjv3+W7kVEk9PR/it0A0+4iYPBqsyDguYyoHqh5 do0oNh0kZadei+QIopLYfLL4MZjg1+ysHmS7gClUOu8PAPNnHdZhheNp3K3zYF/q5Wo/l8oDDfkHX se7+DADg==; Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rmcBQ-004VVI-2o; Tue, 19 Mar 2024 17:19:24 +0100 From: Sven Schnelle To: Richard Henderson Cc: qemu-devel@nongnu.org, Helge Deller , Sven Schnelle Subject: [PATCH v2 5/6] target/hppa: mask privilege bits in mfia Date: Tue, 19 Mar 2024 17:19:20 +0100 Message-ID: <20240319161921.487080-6-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240319161921.487080-1-svens@stackframe.org> References: <20240319161921.487080-1-svens@stackframe.org> MIME-Version: 1.0 Received-SPF: pass client-ip=23.83.223.94; envelope-from=svens@stackframe.org; helo=ivory.cherry.relay.mailchannels.net 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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org mfia should return only the iaoq bits without privilege bits. Fixes: 98a9cb792c8 ("target-hppa: Implement system and memory-management insns") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 46da546eb9..51bf1b06c9 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -1961,7 +1961,7 @@ static bool trans_mfia(DisasContext *ctx, arg_mfia *a) { unsigned rt = a->t; TCGv_i64 tmp = dest_gpr(ctx, rt); - tcg_gen_movi_i64(tmp, ctx->iaoq_f); + tcg_gen_movi_i64(tmp, ctx->iaoq_f & ~3ULL); save_gpr(ctx, rt, tmp); cond_free(&ctx->null_cond); From patchwork Tue Mar 19 16:19:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 13596886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08EB5C6FD1F for ; Tue, 19 Mar 2024 16:20:53 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmcBe-0005XK-2L; Tue, 19 Mar 2024 12:19:38 -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 1rmcBd-0005Wy-EV for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:37 -0400 Received: from gorilla.birch.relay.mailchannels.net ([23.83.209.75]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmcBY-00049i-IG for qemu-devel@nongnu.org; Tue, 19 Mar 2024 12:19:37 -0400 X-Sender-Id: _forwarded-from|134.3.94.10 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E9D137A3500 for ; Tue, 19 Mar 2024 16:19:30 +0000 (UTC) Received: from outbound5i.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id 312537A353C for ; Tue, 19 Mar 2024 16:19:30 +0000 (UTC) ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1710865170; a=rsa-sha256; cv=pass; b=M46xgwfGciaat+C9HPVS3jOPUMFiNWute+KgSY5HZ76zNdZj+utVu/At9MB/ArXXKF8+EK ct7dyWskisL276i1Pfboa2QszwUttnvqx/GLlqgwESUyObtpg1AnV61ejyF+ohrP7MyNl3 68SpkxxNYSFOLO18zepiAOJsQPDIlhek2uT14IXMI34QVrz3zhhxuJ/2bPan6IB/EdeIRu cQ3qO3LkHlTlACYN9kJOPUBGzFt7OX8GOuveK8GdQk0E1zce430cRL3DU+99VM3ZSTPs9g YjvTSBgnLqc9I/Mu7ZZr0hqJ5sYBJm7xV8FNlBrAVzeFmDbRuBDQY1sdyxYS4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710865170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nsOg+Lt96eeBmszLlwUQV+iZJr8zqRhhGNXUkFLNdCc=; b=HjuT+a4UjaZ+qGaiHNUX6MSrME5doUlyXY47/oin6FLX/pSGFRb0TonE0gMBIJozPS3XrH uxJNLFvqLRRgyOrpaLdYgrBNTGno4X6ydvQAM72aouKRs9Ua34zLKWKRilxNBfGXh28xR5 0A2rf1CwDQrFbnCiyAQJk3HXRzGWMvMaOiy0x9e96O3HS6RQuo+SpfeIV+BbZ5Cia9TWev ruRfh3hjeJgt8qmgP0VkmlfMEqju8ds7q+Q6PgUgqzBHDO+EwKAdAo4pxN2NB80U03dpDc 5A9U67fzRGATwF0/adt7wUgpu8PsGE15tteR3EFUoXfqk8FhUY7TzNncjFnKoQ== ARC-Authentication-Results: i=2; rspamd-76c7995f89-dkjsh; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Grain-Battle: 662f78654ab1ea52_1710865170805_1737999124 X-MC-Loop-Signature: 1710865170805:3847895272 X-MC-Ingress-Time: 1710865170804 Received: from outbound5i.eu.mailhop.org (outbound5i.eu.mailhop.org [35.156.234.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.122.162.95 (trex/6.9.2); Tue, 19 Mar 2024 16:19:30 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1710865057; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=d2OUNpPNM1uvjY37sk7VzBQhPZQchRL9szWOi17FwU+TLSmJMy3n50aE0mcSdiGHAlO5k0ZUs4oFG uwWJxGsI3ackzLDc1ZNtof4Gg+aRbUU831JwhsNsnpR4E0aDNm4Wh0muoHMSxuyvS/rpZMrjNlEf3E tUAS8TsoLw4J02JQNwSrN9lwoOwIoONwh9gY8UfeaXBvlVCEqHPkGfAqEr8gsdnOTw3eipKDbWTQ3J rZjQzKHQGYExC5bJXtfx7MDk8tMRoclip/sBSUnK2NF32g07OQfaFxe0giYIIFpldJbqPznsZ7sLJ1 oR90RsIFngMel3kEAuXRqwqGI2Nc1ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=nsOg+Lt96eeBmszLlwUQV+iZJr8zqRhhGNXUkFLNdCc=; b=Ewg5qvIapJjlEWeEWZw51mpu/xZahQQiBC1tG9AqSKdU6FRqlJCT/20llj8fizRmrIgIg6OKfK9lK SJiP1Q2C4QzyOd/kgKs4ZsC9f3gILj5ESNUB4VwladhZMPsZ2jUX11BbvUkjTMw6vd1Nzn2XGUH+N1 3cZK9tFGoArAf7rMFuBndwRMJFa+GqkHS/Z2ZBbcOaXcajBiiNTkfQznmfiyu99PxBhz6cxhQIM5ay +TYsdjnh6V1sNxadfdu1G8Tk950I4Vlx9GBF1AWEZWW+8r4uMf+eIVNBFTWU2TVx3fTVtPFlOqA7nR WbaGnSS+PRJOFQ3tVXp8WLycCyu135Q== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=G8MUa3+h; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=nsOg+Lt96eeBmszLlwUQV+iZJr8zqRhhGNXUkFLNdCc=; b=VwuBi4YOTmewbomCukoV2T78w8M74absEuLX9zmCPrgj+5CbPE9fuuwHWfwr5hORFF9kpoGwkukWD g8Hitzz3UvW98uMuh+2o8Lrs+5Ep3UFMgXD4JDxrLYNuGP9QFMdMN9qmrmWTY9DY921wvxaJwik47M LYBi5yCQkcOyoEig= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=nsOg+Lt96eeBmszLlwUQV+iZJr8zqRhhGNXUkFLNdCc=; b=t/s7kKQmAX1PqbkNV+cagjvfjgLfq0Ua/RnJSRnetUHEPwKagLaCMYvIVAJoUZ6acwGJFRgxhPOLi R7AQjjfbGZm6oNzX7b7Sz0Uj3Gtf66taTkdhcgsK7lSN69nrVaze8Nl040xxidJU24xfhuHYR6D6f+ M67cmJlJDt7A5I/eONFLEbFvRWlfp7CED8ATfiRhnprz1N6KoF79satY6etbxcUFP4h/RBMibu7FQ5 nqeeL8aDuEncu1RXptrmuEPLZTmb3/Aw0anATPRTzeknDtoUD/HHCwXldrfsBKPruUWFF/cYbpDmtV rQ9+lQKqkSL/d6kBVA6b9trgDq31Skw== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: 31a04ee3-e60c-11ee-b7d4-9b9d9be6ef2c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id 31a04ee3-e60c-11ee-b7d4-9b9d9be6ef2c; Tue, 19 Mar 2024 16:17:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nsOg+Lt96eeBmszLlwUQV+iZJr8zqRhhGNXUkFLNdCc=; b=G8MUa3+hH5APLvWl2BOoWx4n5j ZvaCkPhtM7ttXkdjRwB5ad4r0vNROkMv6KlSV7OEpYyMMrXoqvSrnboShl5Yd6BTXGoXOhuNUZMp0 jcU+uaUxg0WlYL7qYlQF7s6Cj6TAaUb5F0vn0AlmvWGlegv3qhpR1w0TwlemAVP4mDzYKvSIU7Ny9 3/br1HOqGwNH3UZFxwXFJr39+lwvEa0Sp/jVr97JVamCGYXUnxAN4/h8wRFWjcmfa/N4rsgC4KP+X W5/3nYUVcA7V+ECVTUzrpU8UEU+sBBaLC6U+MVltw9+ToB4i7EMdYgFhLTh5sg0mhxCgzD+jk7Gi+ kc8eRBSA==; Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rmcBR-004VVI-1D; Tue, 19 Mar 2024 17:19:25 +0100 From: Sven Schnelle To: Richard Henderson Cc: qemu-devel@nongnu.org, Helge Deller , Sven Schnelle Subject: [PATCH v2 6/6] target/hppa: fix do_stdby_e() Date: Tue, 19 Mar 2024 17:19:21 +0100 Message-ID: <20240319161921.487080-7-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240319161921.487080-1-svens@stackframe.org> References: <20240319161921.487080-1-svens@stackframe.org> MIME-Version: 1.0 Received-SPF: pass client-ip=23.83.209.75; envelope-from=svens@stackframe.org; helo=gorilla.birch.relay.mailchannels.net 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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org stdby,e,m was writing data from the wrong half of the register into memory for cases 0-3. Fixes: 25460fc5a71 ("target/hppa: Implement STDBY") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson --- target/hppa/op_helper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index 480fe80844..6cf49f33b7 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -281,17 +281,17 @@ static void do_stdby_e(CPUHPPAState *env, target_ulong addr, uint64_t val, case 3: /* The 3 byte store must appear atomic. */ if (parallel) { - atomic_store_mask32(env, addr - 3, val, 0xffffff00u, ra); + atomic_store_mask32(env, addr - 3, val >> 32, 0xffffff00u, ra); } else { - cpu_stw_data_ra(env, addr - 3, val >> 16, ra); - cpu_stb_data_ra(env, addr - 1, val >> 8, ra); + cpu_stw_data_ra(env, addr - 3, val >> 48, ra); + cpu_stb_data_ra(env, addr - 1, val >> 40, ra); } break; case 2: - cpu_stw_data_ra(env, addr - 2, val >> 16, ra); + cpu_stw_data_ra(env, addr - 2, val >> 48, ra); break; case 1: - cpu_stb_data_ra(env, addr - 1, val >> 24, ra); + cpu_stb_data_ra(env, addr - 1, val >> 56, ra); break; default: /* Nothing is stored, but protection is checked and the