From patchwork Tue Aug 23 21:38:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 599477 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp2724662mae; Tue, 23 Aug 2022 14:39:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR7WrAXcQ48011n9HtSEhWN9L24fjJLJndd0V/TnzhdN2P2CEpHr9Np5NfJ+1id/SDwneZbm X-Received: by 2002:a05:622a:183:b0:343:7d49:e60f with SMTP id s3-20020a05622a018300b003437d49e60fmr20959942qtw.600.1661290743020; Tue, 23 Aug 2022 14:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661290743; cv=none; d=google.com; s=arc-20160816; b=AUrES5ggxZh+2CZ2FAvEvw9WxWj2F2EaK/b5dyZ2LXrNJCwtku1rUPBS+RU6pwvsJz A5KmPIXd5HrUWM+rKSYrSoGWjlA30ga3CBm4+a26J7CvTmtRRjbxPAPYVit1LYnZgYF/ mmdLB/XN6xG/TGEM3rdMeozxceu/GNRzewcG9z/qGB2FEr1SgrPs0hLw436dNOzeSXMM aVKu9s44Xz1i05Wan1KuQoVyQW0FczoT99X/9Ygk4qlFBfSs+BazPoaeVFZCqWYhZpZN IbHE+MNvyfqFp9iprfDVKx1l9vCu1lcWUJkdEK3UkxCJzzos8McONAZ15JwbPt9gag23 stbA== 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:cc:to :from:dkim-signature; bh=+L96YrL5vlt2Q3Y2tUcm/tGygoK05LHKMQNt/eOvkUg=; b=yL82jekHZdM4+ECl0F1kY4ufwDwN8jOKHc1qUjtpks2Y5S7A9iYEsTGMxbPhBX3/jK 50PnH2K8qS2ucMTABxJRJFjQs+VMTL0huBlGXdeH72enbG2KeXEy297AI4eqQAbyqLaE UI/0Ze+g/x2djMS2WORLK6PSIazD1kZuINMEYh31mwmFyREVZ24Y3zHQcg9HWrup0OTk Wz+fvT5qlFuGho4fJvCzhViUkIvnRQ2nCxeFv7s0OEDNA2GQ50VGI8qObgPVa+e9CYB2 fvn1ASispZwRYVxH6Rzm9Q5JLd9x9fw7cjHfGGmOp8+eKuz9LHFNE67qqbUFEcofjYD7 H3Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OUlqXMve; 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 eo8-20020ad45948000000b004970e349083si799262qvb.433.2022.08.23.14.39.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Aug 2022 14:39:03 -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=OUlqXMve; 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]:43592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQbby-0000xA-L5 for patch@linaro.org; Tue, 23 Aug 2022 17:39:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQbbC-0000jT-9z for qemu-devel@nongnu.org; Tue, 23 Aug 2022 17:38:14 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:41944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQbbA-000617-Bj for qemu-devel@nongnu.org; Tue, 23 Aug 2022 17:38:14 -0400 Received: by mail-pl1-x62c.google.com with SMTP id p18so13962976plr.8 for ; Tue, 23 Aug 2022 14:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=+L96YrL5vlt2Q3Y2tUcm/tGygoK05LHKMQNt/eOvkUg=; b=OUlqXMveUb6x9TzHuLBtapl+VJf+4CqHvWR6Mq/7az8xShV6xu6+9pWzkFFiAZqmH+ z+T56DBgxExn+xmNEIjiJBlM3QJNZ29aOkzzShikg774+WM+lxoxDvdln61KxDtVv+F4 H338OnTgfDye5n87sxoiYf/r6xIwBI8yzRqcFgPwpyY2EExb0fgTw68sDtXwtbsLk9LA ix/OTM6vsk2AydILxob8MzardArq66Cj7raHL6YXi0dvnBJNrN9+u7V/z2+C4bNKONX9 7knJKRT/qBBSjvREmtkdLqOs65e4sJNEW/bPNYIvmpwZgac+xqcwPkZuLKMfuqu+ZkLC enKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=+L96YrL5vlt2Q3Y2tUcm/tGygoK05LHKMQNt/eOvkUg=; b=AZfWQ9Y14xhthjO1U3XsK9NDLXHdT9yYVu4/cvSQHpN0y19omXT3SUN8d3ZPyBcHfp NOhnXvpHyksb85J0/onVcYc21two9qYjYJZdZ1NwfrmzSYv0T+B0TKx/LfOrQ/9LV4OI FfaxL3O8Bv7MJYIe6N+TOqHro3UMofCJMDfaiayzbQMOwYcBo0QeEEr4PvxgZ2uQkotK xyfp+8MbJtcDebUyHbxL/s4uZpNhStD5I4AuXmMMhV2GBRjFHpw9ZZAyIzLC1Np1PYo2 VYn0mZ1qPytDKCJxFKJ2oTpA7uBGhGjDbUWkQbccuRhNNssS2yijoNnED5gd2et8YY+7 PAcw== X-Gm-Message-State: ACgBeo1oh34q5K07s8RlLw2YHAhCmlcvoXQzXyr5up1vJq4c4J2TIcyg mzNI/J7fyN3iLx9flPxFcBm+M/YHBY9C+A== X-Received: by 2002:a17:902:f60f:b0:172:86f6:241b with SMTP id n15-20020a170902f60f00b0017286f6241bmr26015662plg.162.1661290690956; Tue, 23 Aug 2022 14:38:10 -0700 (PDT) Received: from stoup.. ([2602:47:d49d:ec01:46f9:77b4:ec0a:c2d9]) by smtp.gmail.com with ESMTPSA id s19-20020a635253000000b0040d75537824sm5366403pgl.86.2022.08.23.14.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 14:38:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: david@redhat.com, qemu-s390x@nongnu.org Subject: [PATCH 2/2] target/s390x: Align __excp_addr in s390_probe_access Date: Tue, 23 Aug 2022 14:38:05 -0700 Message-Id: <20220823213805.1970804-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220823213805.1970804-1-richard.henderson@linaro.org> References: <20220823213805.1970804-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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=unavailable 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" Per the comment in s390_cpu_record_sigsegv, the saved address is always page aligned. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand --- target/s390x/tcg/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 4c0f8baa39..19ea7d2f8d 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -147,7 +147,7 @@ static int s390_probe_access(CPUArchState *env, target_ulong addr, int size, #if defined(CONFIG_USER_ONLY) flags = page_get_flags(addr); if (!(flags & (access_type == MMU_DATA_LOAD ? PAGE_READ : PAGE_WRITE_ORG))) { - env->__excp_addr = addr; + env->__excp_addr = addr & TARGET_PAGE_MASK; flags = (flags & PAGE_VALID) ? PGM_PROTECTION : PGM_ADDRESSING; if (nonfault) { return flags;