From patchwork Mon Apr 1 10:29:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 161531 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp281944jan; Mon, 1 Apr 2019 03:35:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqznNOUJRaD49zkcHFvX9Oijq35f+Xtoy0t2nmiB1SkIYYgTqYg+h8nbkFavgp14L+Zdr+yh X-Received: by 2002:a0d:ee41:: with SMTP id x62mr50966902ywe.58.1554114910941; Mon, 01 Apr 2019 03:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554114910; cv=none; d=google.com; s=arc-20160816; b=a/4GJonCHKhVryGpbV+CldzaeY2feRxn6P8ZhqLMp2YiHEMf8pNZWWaECIBpfAn67d nL4OeVKiWvQmz/2RGaBbEHwEMMQLnEF3WARVKSVbJTuN7lMbGblv9qPcLYDl6AMrklNA AZILtyEtUuhOxbz4JKM/AC/2mdnUa3kaZJYKkZjqZQdyZpHfBmAxCrGgksmKqHiNo3Pt rO/Gd4B1g80SZkjqYlvVGecmdrxUw9rmbKw+fjMQT4p8mfNVxZtZVJ+2w5k7sagHWiqX qye/WNho3J0nWWOaOYMDR4IwrVHLS1hIgETimdky+Nqf76NjM9PFRKFznfnX9+ZtiE9H twfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=Jp1/VUgyjqrL8dxRFSOofHTbpcGwFWwuHNUvyQPNYt0=; b=DOPjbq2/B9xi/8INQGKN513McJ37Hy87R4bpnX/Nupui+dCZS1oPvRgFhLGxw3eZpN KV76UhXkfQrbSrrv2iN1U4NZAs3keDOfhIVZqO+ZkuEO94fgL/itmJTJoTPahS+79crl zBqIqqA/AiVO37aes0Gqqe0N/5L2CKo3RQkINoYRc9LhPCJZT0XKaY6fh/Nmh7/KjccZ jwDhXbXXncHDZQ6pmkZuaTaftApUTJc0Xt6P7SVw/MCuuVYpdxYNPxOydAZ7BszhZBTq 4tk4DseK61yRTG98hcIyLakKe3FtCtjjKETsPQnI7HX+NwwBc8nAsPzhh2QbHttIioL9 8Elw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IoVWgxEs; 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 145si5852209ywe.301.2019.04.01.03.35.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 01 Apr 2019 03:35:10 -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=IoVWgxEs; 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 ([127.0.0.1]:56469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAuHW-0007zm-Hs for patch@linaro.org; Mon, 01 Apr 2019 06:35:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAuC0-0003QX-4u for qemu-devel@nongnu.org; Mon, 01 Apr 2019 06:29:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAuBz-0005ua-9g for qemu-devel@nongnu.org; Mon, 01 Apr 2019 06:29:28 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:43375) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAuBz-0005uF-3w for qemu-devel@nongnu.org; Mon, 01 Apr 2019 06:29:27 -0400 Received: by mail-pg1-x543.google.com with SMTP id z9so4534228pgu.10 for ; Mon, 01 Apr 2019 03:29:27 -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; bh=Jp1/VUgyjqrL8dxRFSOofHTbpcGwFWwuHNUvyQPNYt0=; b=IoVWgxEs0IKcFJUxCYPjxadjF8wD2G7n+K66JhrzMeGdu1tdjMuaW7tWpHJ9Dj2/zX gaQMUZeEndfAZ3hbwxKdSd/Xt+/h7h6c2sAr59qjBsMeTo/XoLVNa1HFh7FQ1kggMd60 cvW9NAhl/pAV82FtIJA2RgHVH9R2Oe11Kr0bNqBKUiEfm0A9JYODY/nldWQV+nsqHhdi fGdcoxRRSM1/arC0ukgztwdWKneX1MSoYh+5AFk/eY8iWKwkIyCMxfOQdSwdxMC6UFdy TF+GPjlwkZPoZv93J9ABuvGZrYjA3kGSEfxVqL96hCo1oKr5YG/jvKzxTU+pF9e67ZE9 EOQQ== 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; bh=Jp1/VUgyjqrL8dxRFSOofHTbpcGwFWwuHNUvyQPNYt0=; b=G7c5Mz/ZpBcH0XU+I+XTXJqWqP4krJ7Fe4ijGl0z+crIgjsFvPja4XA9H1yZ04CbFl YF4gQi/ePGu14RZt21hFRLp7pzGURs+r1aqx7NxcFZznEldKI/w3/LeK0/tu3DvQXi5B eFGU4LmEK4Yr4T+l8MBlbO4KmTSztC6GK0+DpcdWv2K7na4ehdz2j3c2xl8xFzCpN62A U9845ks/3CZdE2evdORQuaPMB4k3rDg7jxHBgWObLHSJLSQAXit7UBdq94aPbMSEonwP 39zkDACJ3X5Ms4K1bYfjwgsewj9mT0dQuYSI1zpJfY+xZ8gtDRWZ/pg6k8180xhf0adU 21Wg== X-Gm-Message-State: APjAAAVt2Eo9qZihaCU9oX7EbMxddPpV7uZPYw5F6srn2OgclTtgMBz/ wnMrIosRpERkB38hldX7b9+isbVSfBdPEw== X-Received: by 2002:a63:ed11:: with SMTP id d17mr59776213pgi.211.1554114565973; Mon, 01 Apr 2019 03:29:25 -0700 (PDT) Received: from cloudburst.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id c134sm20048203pfc.87.2019.04.01.03.29.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 03:29:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 1 Apr 2019 17:29:08 +0700 Message-Id: <20190401102911.8685-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190401102911.8685-1-richard.henderson@linaro.org> References: <20190401102911.8685-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 Subject: [Qemu-devel] [PATCH for-4.1 3/6] target/s390x: Use ilen from unwind in tlb_fill X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x@nongnu.org, cohuck@redhat.com, Richard Henderson , david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 3f76a8abfd..838c32fc96 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -44,7 +44,20 @@ void tlb_fill(CPUState *cs, target_ulong addr, int size, { int ret = s390_cpu_handle_mmu_fault(cs, addr, size, access_type, mmu_idx); if (unlikely(ret != 0)) { - cpu_loop_exit_restore(cs, retaddr); + cpu_restore_state(cs, retaddr, true); + + /* + * Note that handle_mmu_fault sets ilen to either 2 (for code) + * or AUTO (for data). We can resolve AUTO now, as if it was + * set to UNWIND -- that will have been done via assignment + * in cpu_restore_state. Otherwise re-examine access_type. + */ + if (access_type == MMU_INST_FETCH) { + CPUS390XState *env = cs->env_ptr; + env->int_pgm_ilen = 2; + } + + cpu_loop_exit(cs); } }