From nobody Wed Jul 3 22:50:23 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 1629314655177304.10298282411395; Wed, 18 Aug 2021 12:24:15 -0700 (PDT) Received: from localhost ([::1]:48130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGRAc-0000hQ-5r for importer@patchew.org; Wed, 18 Aug 2021 15:24:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGR6E-0000PH-MY for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:19:42 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:40677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGR6D-0008Ul-Av for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:19:42 -0400 Received: by mail-pg1-x532.google.com with SMTP id y23so3299733pgi.7 for ; Wed, 18 Aug 2021 12:19:40 -0700 (PDT) Received: from localhost.localdomain ([173.197.107.15]) by smtp.gmail.com with ESMTPSA id a6sm524108pjs.40.2021.08.18.12.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 12:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KU5GqqnHBwJE2oQY4NvVS8KLTvZHsylgeTI1DbvIUb8=; b=XJzJOJ5i7POCCWnTghvc7n/d1yACvi25Qm5k5YHF8sypTt3SPFKxocr0MO9H6Fx6lA JD8njcXcvG1lSQ4Lg4hCAjA/lEkerpAbgpP4QpYuNeDjQI1vmTQEc0pvpGeRTlsdZvTg 01huFulTTPPriyR7vAYc9JTqf92/iWawrvPybR7az7KRtQ9f9BJQhZxby1cfIvTdRl52 Ntg3su7zFHwHIooIWowgEihtoPXKtWE3tydxXBPRIP7FWG06spofs6ZeyvyvH6bfodX8 oAq2W+Vk4RrhmC5nbCL0mf6XlQktyFiJ//BMNwBrh9qhQHU6bSjX626wq+x6MmmPgWXw +vDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KU5GqqnHBwJE2oQY4NvVS8KLTvZHsylgeTI1DbvIUb8=; b=dCHNAsl2IFHGAmCqbuzlLF5AR8gL05PLE1Fmr6JE/l3XvcrxVgamnyOpsc9gvcKxLE PEttG7u9yLHOepfWrPyafPTQsnUQmT5iC/4Oahk99KoOoYTX1LSg7UF6UGcwem9JkL4P iRejC1cxRD8I+yuwbeAUJBVTzYT7NjawABeT79h16jkI17LHcPSrPtCusGJn5Ks24P62 oSg+mInI9O0MBUS20Sr0YbeW5hg2cLbkJhplIVZBQRy52Aarx/T0salu+J/PzioziqiH PNFAvO12k+EHPvq0M01VGUGCKnPTfjpFZQcRtHecd593EuGIPw0gJohAi2JKctqd6xjM UJlA== X-Gm-Message-State: AOAM531e5ESnrQNcQtnnuXIkRJuRTTKkLlnzxIdSZuWrOdY/ZAuXx4qz fekLsKv4ChKFgjOrCnBRvpwIcNa/RDNisw== X-Google-Smtp-Source: ABdhPJwYhCNPXwuxWDKNxeUPpcbZ7tsGKluTxRC6jpa3vCyr0jm4m5swBcUqJA27OwfvKLEsI77gUA== X-Received: by 2002:a05:6a00:805:b0:3e2:f682:1b32 with SMTP id m5-20020a056a00080500b003e2f6821b32mr3655916pfk.60.1629314380126; Wed, 18 Aug 2021 12:19:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 14/66] target/sh4: Set fault address in superh_cpu_do_unaligned_access Date: Wed, 18 Aug 2021 09:18:28 -1000 Message-Id: <20210818191920.390759-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210818191920.390759-1-richard.henderson@linaro.org> References: <20210818191920.390759-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1629314655904100002 We ought to have been recording the virtual address for reporting to the guest trap handler. Cc: Yoshinori Sato Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/sh4/op_helper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index c0cbb95382..d6d70c339f 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -29,6 +29,9 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr a= ddr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) { + CPUSH4State *env =3D cs->env_ptr; + + env->tea =3D addr; switch (access_type) { case MMU_INST_FETCH: case MMU_DATA_LOAD: @@ -37,6 +40,8 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr a= ddr, case MMU_DATA_STORE: cs->exception_index =3D 0x100; break; + default: + g_assert_not_reached(); } cpu_loop_exit_restore(cs, retaddr); } --=20 2.25.1