From patchwork Sat Sep 21 04:32:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174180 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp253089ill; Fri, 20 Sep 2019 21:41:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyk9/KBMc2Ab3/34NWrjrAUbtAScjUX+E3KhQwy8kxYve5as9kz76yiJTo5kFSqpuYwhbjw X-Received: by 2002:aa7:c5c1:: with SMTP id h1mr25398001eds.10.1569040903179; Fri, 20 Sep 2019 21:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569040903; cv=none; d=google.com; s=arc-20160816; b=pMS8xJeS3gejtNH2mRWygoWQSXc2N10rzV7/3z/akKeNxwHZhljnuk7fddh4UZftSA p+tE1iB6WXsBpltz90RRady8JHbcAPMamwbnpTOvjbFku8Vk1Av/91fQyOl6UKi1ma8x a/msEcM5L5xxvyMQ1C8QXCAkxTGoHsPdXmgdjsNy2VhWR7S8Vg5rRjqyxcB+yOATZAEv 4HFqVX97MoWrU51wcaahqOk47yUNqi9ksPznid42MfxED7qKy07sow93CMKpSvilTNun R6aVlAniWrWXjdpXVrBZ6PzvL32CNbQI+weZXGzZdmKFF9ArkdVqZI6USzsTqYofAwut 5BnA== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=ZAz7iFPOWkaueNLTk5914u9zAUBjebd4K9tG0kc56ik=; b=iewsVnys2Gcdd+SCmsGbUpMYolQhwlf4rPEKBnWRuzJm3HuXH8mY9CXUU+d+puhS4k YR+HY41Fkabzt34Hr1bgffAAFeNhmfoRMQKJoG2h2FyZElYmn+YJJaeix58b9PqbJSO/ hWfehUgQsi+uoT5HO0eVVz6ePRtUV0h5RlFsnN9m958FaVwbiWaYmXiZ+8/fXwtr7dCy 2c/pcSVWzv+1ypDp20W3AJYLg99fLaGZJLorfhlhntG4+aJcYvBl1sZilj2nvF0+W9Eh TfhVfDowHcxh0t1AEPzWph9RsywUlObax8tXB++Bb1zg0EqCsPyntx8MQiivfjmbR6FS 16CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W6TlkkmR; 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 c4si2014633ejb.183.2019.09.20.21.41.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 21:41:43 -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=W6TlkkmR; 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]:38878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBXDK-0002NA-3H for patch@linaro.org; Sat, 21 Sep 2019 00:41:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40653) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBX5K-0003R9-0h for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBX5F-0006Xt-42 for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:25 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:41511) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBX5E-0006R7-HU for qemu-devel@nongnu.org; Sat, 21 Sep 2019 00:33:20 -0400 Received: by mail-pl1-x644.google.com with SMTP id t10so4136681plr.8 for ; Fri, 20 Sep 2019 21:33:09 -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=ZAz7iFPOWkaueNLTk5914u9zAUBjebd4K9tG0kc56ik=; b=W6TlkkmRUo8U+sKO+9O8huqeCjEkeVuFYHPwo1VRE8I61vhfsMZyE81CNh5nXf7SuO QSGuWaIm/HZsHpLkX21TygExtQi0MwQo0zTyfw+pfmdq7VsgpIAFXE1PhP/CcqHFt4dG yLVRleLCnNdjQecZPR9jSm/T5yinzn2QqpxH62gGckopHa1pvNxyD47xol+buMzBNtfI PcvPXOMVHd3UjUFx8UvqoMjigQyJoDhpFjtcZs4vi/rAyHTJE7vTml58eVPzbSzuhKc9 ssOOTL2ZY3GAKK57+cE2ruwd0fI5RotF+phYxpljhXhtXZzpXrh08UQNGAE1seP3HQLy 306w== 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=ZAz7iFPOWkaueNLTk5914u9zAUBjebd4K9tG0kc56ik=; b=XHmrMak2wq8cM3/dlm8NMM/2bm3azqLz65ztcjZuth8NV55jzJYIJM9uRDAdQePn46 GpqriLMbg3NYvYxFPUUJaUcdkGWX/DVdqr5uPJvN15UBihTSdwqBHjKd7ceU0ICpTK7B 9AV0+bUxagVYOChHt3hqRV+EiIl9ekffOmuB809rdTR8+6f8n45WJvCjzQ6rM+PFgE5B s9HMA3XJIuYYzxukTD4io5O2g8oY9Se9sdkrUA3yKHG3XRam5GLjMVb29/Tg2MUohv6L 32XZa0b7dRO00XbHz0GN/LI9EZltwS6i2rosxN88QVscljWoonylydFoPEzwlbtO3wqO xu4Q== X-Gm-Message-State: APjAAAXfrdEBTnJzC27hez1b2rWOBCvhX06+4eUvRWLd343OT87P2brQ Bi3+f2M3xd6wzRguaIUa5KgrZUOuRNs= X-Received: by 2002:a17:902:ac98:: with SMTP id h24mr21012369plr.64.1569040388609; Fri, 20 Sep 2019 21:33:08 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 193sm4179986pfc.59.2019.09.20.21.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2019 21:33:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 6/7] target/alpha: Mask IOV exception with INV for user-only Date: Fri, 20 Sep 2019 21:32:55 -0700 Message-Id: <20190921043256.4575-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190921043256.4575-1-richard.henderson@linaro.org> References: <20190921043256.4575-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::644 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: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The kernel masks the integer overflow exception with the software invalid exception mask. Include IOV in the set of exception bits masked by fpcr_exc_enable. Fixes the new float_convs test. Signed-off-by: Richard Henderson --- target/alpha/helper.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 Reviewed-by: Alex Bennée Tested-by: Alex Bennée diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 1b3479738b..55d7274d94 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -58,6 +58,13 @@ void cpu_alpha_store_fpcr(CPUAlphaState *env, uint64_t val) */ uint32_t soft_fpcr = alpha_ieee_swcr_to_fpcr(env->swcr) >> 32; fpcr |= soft_fpcr & (FPCR_STATUS_MASK | FPCR_DNZ); + + /* + * The IOV exception is disabled by the kernel with SWCR_TRAP_ENABLE_INV, + * which got mapped by alpha_ieee_swcr_to_fpcr to FPCR_INVD. + * Add FPCR_IOV to fpcr_exc_enable so that it is handled identically. + */ + t |= CONVERT_BIT(soft_fpcr, FPCR_INVD, FPCR_IOV); #endif t |= CONVERT_BIT(fpcr, FPCR_INED, FPCR_INE);