From patchwork Tue Sep 24 21:00:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 174305 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4664917ill; Tue, 24 Sep 2019 14:08:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFX1kZqMOkfHgirPDeAoBTip4hOJ7L7VT1OuSJ9X9PgiFauSsCTRrI1f1bFWqFgBkKQ4+9 X-Received: by 2002:a05:6000:10ce:: with SMTP id b14mr4463519wrx.96.1569359292756; Tue, 24 Sep 2019 14:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569359292; cv=none; d=google.com; s=arc-20160816; b=0v7s3sbvCJL/7sjutyK10pxOdWVq8U3NT3CFsZqsafIaRqVYCkrnWA+vv2/4HSg/Bh Kq2SnvplMX8/ZY7LWZhBI48GWBB55MnoW4SOJm8bur5zh7yOjOnH6SVFxFKV6fFKEmFl 8brm6UNzXMLaDscIbxbu5IFoO8+9f2zZeHcM34MH+ZqWpNqsueXDYRWjCUkxNL4L1J++ zS4e81HipjH2V3GrmyMN9TnwaTKzDT46k94NGkGD/0VmBNt5r+qsLURo5iVX+VhcKcJ/ GvjZ/tvqRTGq/LfSywwlmvEoiPXseQUtcnaviTQeW98X2x31k9gMr3kO9D7X/xoR3B+6 jFsA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=m1eRzofoxuQrMbNNK2k2mREITVN8XrZ/G/+Fv6KDucg=; b=0C4M8GVuyyyqIfe2HUTUFtUEn2hN8Ek6m4rcHaFJ2MngYU+fz0Qyv1guC4SsOn2Py4 OxvVERC+mKHZnWg2kVJO2FjV39MAarhw0shawr87LOMmkZVUS5uofvzOzRyhAYp2salg GMQEeACLfukpwYazBFqEOBUaxL9SpUTilM/dqQe5Ia0BlMLafzI8+cyFAk1niP3Gw8mP tVzsdhZPdS0G/0FWbStQ8Isyiwgr76lu6Bzn2FkJgFv4g1LyPWPNYHW1HhUsC7Ojw/2x MbhxNng/iX1PtWLAv41JQ1KYZJEsfoQsXYi7zXL2rjT4NuJjVjw8uUZ6hyG5t4/qeRay W9tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bx3X3xnJ; 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 f14si1858985edt.92.2019.09.24.14.08.12 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Sep 2019 14:08:12 -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=bx3X3xnJ; 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 ([::1]:51398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCs2d-0000G4-3P for patch@linaro.org; Tue, 24 Sep 2019 17:08:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55540) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrw2-0002Yb-6e for qemu-devel@nongnu.org; Tue, 24 Sep 2019 17:01:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCrw0-0004Ud-Lt for qemu-devel@nongnu.org; Tue, 24 Sep 2019 17:01:21 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:54739) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCrvy-0004SQ-JN for qemu-devel@nongnu.org; Tue, 24 Sep 2019 17:01:18 -0400 Received: by mail-wm1-x341.google.com with SMTP id p7so1866588wmp.4 for ; Tue, 24 Sep 2019 14:01:12 -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=m1eRzofoxuQrMbNNK2k2mREITVN8XrZ/G/+Fv6KDucg=; b=bx3X3xnJ+Wk+zLpj44cb+0EeOuyRBxSc+YaqhfRUh6XW9FJu8v38q7GiFs4UfbazCM yp6Rb/R4N93RSDY6hfJJ5G4/nScrX6BDOzIF2/G3jkxxdouAWObADxUuhPhqosNI5vL1 LTV+uQvDvKzjqMkV0B/sXvqW6dfgQZHmv370EdHjMbbaH7yMkn7TWmS6QEEOaD/vMwc8 hAXx4/RC+wEwwGMAD8r2/R5TmhSQ1dzV3JUZq4gzWXZrS5g72twoogNsxECwpqsnT20S kGLtIOPj3y97rU56LyW1239gZDV68SOy4yw8WlGolo8kC7FpFdcIKgbOfHlKU5lWwwq+ nwNA== 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=m1eRzofoxuQrMbNNK2k2mREITVN8XrZ/G/+Fv6KDucg=; b=S4K69irWZkcIKJXCUQxFdQAggQzkkAa82Y8xCEDXz7CkRugGrU6o8/TSRtmeuTqE5p TwVKyTH63BUwUYbT4/lpvSrs8capwNw1ypCZ3MwVKYjZMvouIGoh+2OGui1KAg+spwyl ejsebRA37r4Sh/gqv4zYpgfNnL4qGygJjkhxC3JKmQsVCI3zi0A39JZt0iFnt4M4K+X+ yd5Em/QcEBWPpZi7kER+CLT1O5vwkE8VpvPVUTRmqf5XKfj8cwZgireGnZ9+PK5/1dCb GYCxodZVNN+6sVy5ZaUyYNIzV21NnuBNBBlZ5Q9YyVcT6lcNGEPPvAtOgFqSloKFsLZw lHEQ== X-Gm-Message-State: APjAAAWYzjQyX+ZzDTdtlQdajMxSNsNpyk7lvIHYIViNi0W54FaVUzpc bmqVMSeBsyCeTik96rmj4u3bgg== X-Received: by 2002:a05:600c:40f:: with SMTP id q15mr2379363wmb.23.1569358871926; Tue, 24 Sep 2019 14:01:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u22sm4841053wru.72.2019.09.24.14.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2019 14:01:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5EC321FF93; Tue, 24 Sep 2019 22:01:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 06/33] target/alpha: Mask IOV exception with INV for user-only Date: Tue, 24 Sep 2019 22:00:39 +0100 Message-Id: <20190924210106.27117-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190924210106.27117-1-alex.bennee@linaro.org> References: <20190924210106.27117-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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?Alex_Benn=C3=A9e?= , Richard Henderson , jsnow@redhat.com, f4bug@amsat.org, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson 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 Signed-off-by: Alex Bennée Message-Id: <20190921043256.4575-7-richard.henderson@linaro.org> --- target/alpha/helper.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.20.1 diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 1b3479738b7..55d7274d946 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);