Message ID | 20210920141947.5537-18-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | 85e7d1e9ff11e5df827cc7b81034b85efae7d315 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp2132868jao; Mon, 20 Sep 2021 07:54:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySOAil1SrBxNEDeSVToCvke4zcRPGfdCkz/KJefjqrvMftA1w9JMCTilWtjhwMqgwzekNg X-Received: by 2002:ab0:2744:: with SMTP id c4mr12323682uap.81.1632149691559; Mon, 20 Sep 2021 07:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632149691; cv=none; d=google.com; s=arc-20160816; b=kjMm8jdGVTl0nrYMJlYM0JY90QSPF4LQWZ84SFr/m9VZ+JIGtxlAfztK0U1g36OMiU 7At87mMBQMU4zZ6EjNi6xQqv9GVzhIsEpZDghRYrVVki/xolFWYE7QNy+NPmD02jYd1q SGiuUbHvlSEg9aHVu/zlNSGB2Rs+s9e/wbdMGZzeF6d0iv35T3mxSBwsJfC/hstFi9sN jahfN28UksCcLKyJrVogc38iZLGN4FiMYPEoOpVP5hsUJMjw/BKT7c/wXvHQ1dghupm4 jzKv9DTkMWJC+W3HOZ7llTB8qn5r9lSgKV1ATvYSfBvPzTYA4LRnc+47g4isDn8+SrG7 CnDw== 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:to:from :dkim-signature; bh=xu+mK8AOnXi204q+XHXbI1+B7494jG7C23y0nQnHqpg=; b=u/4pjzFvF99JU19yOKkwKyXr696uK4y9Tbkctxr6mY26ad8kVW6M89daBEn7Zha8TB OgoENPVr8Nzwi1ruu/vbDwAgDsd2FpbrzN/xqge4NjchtI1Tevqg17ox7YmJDxBqbjNa d02T0A7NpxyOu2pOASsXWybtiQlEQh31QqccPWbPRmrsLqwGKwwg5QyCbE6ce6KW4bzW uCcIrV5l9SJIB9CcJUSl26yWPXpig3X6WowKwr3CCwxsPi5SBdcodiFEy381gflG09Sn wL2B6TZKxD363pL2hitwbuNeAHwR6TJaIUjUxNE4iWeVxT4wTufZEGQrKdG4acPpwnCq aRKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AWnorpxN; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n15si3047395vsm.27.2021.09.20.07.54.51 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Sep 2021 07:54:51 -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=AWnorpxN; 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]:41276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1mSKh0-0006UK-3g for patch@linaro.org; Mon, 20 Sep 2021 10:54:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>) id 1mSK9h-0002qx-Ed for qemu-devel@nongnu.org; Mon, 20 Sep 2021 10:20:26 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:41517) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>) id 1mSK9O-0000tV-Dz for qemu-devel@nongnu.org; Mon, 20 Sep 2021 10:20:25 -0400 Received: by mail-wr1-x430.google.com with SMTP id w29so30194815wra.8 for <qemu-devel@nongnu.org>; Mon, 20 Sep 2021 07:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=xu+mK8AOnXi204q+XHXbI1+B7494jG7C23y0nQnHqpg=; b=AWnorpxNH5EkQJZhM7wkyfKai3qNM0H+I+oWM782rgsk2YA93qjkBoWCjrKgUIM9/N H2KcQrpUDPlMb6DNUAs3x9MwD8OVIdqDyjZHvNRBlpuspy919Br7ry9b8IVdOqkIZIUk rGwknR/8UmCTNbIdr1u/hqGio4KuisMn0AMg6iar6F6e9vtRjgereI/2SLUQyVKkaTZH c5XUKL8EATOzc7AEDPJXLrW7y8cOMeIcKCw6mhYuiylGu0NKeRBhFhUroZ8zNFAlUMxs C2KK2rD+S6nydAXLkaZXwRrKTeZi0ZJdqt/Ua638U4nlT6UgCF3dFPQN4qmv67Nb5Rv9 FStg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xu+mK8AOnXi204q+XHXbI1+B7494jG7C23y0nQnHqpg=; b=WLsmGU1ZKnd0+hE+BgtZ0xRXJ7LAyrGwCx5FrKF6IqXY9BReP9m61GM+w4Wuh7MAsT EgnYsbURQP9LhwTtHQ0bvkPdc9S+9JM8Ve5WGV/i1ZYV7ye4mVUjJNfzR1VcG+O/kD2A MBU3eCes0rdkZjS8L92H65t/jAjdDJkmEwERbeC++SVfiJXlbg/rPlMVE9ey9LEIv2+D hMDEnPjaH8RcSyeN4ZIZeOGZpTHzjfCYLq7dsFyKvTctdiuaRwh376CXINwylM8o9y+3 2ZUJNzJlSOD2ghlV260xWUpusgrc0JTdyvV7VDwoFpNOm225XETB0mE6vIyqpSEC680X +aAg== X-Gm-Message-State: AOAM530qGG+3FArD2+Gqm2eq6pe2gPLZqoG8C3qOyBbwXKx9787UnIta kCy9+Z3tHseEuar6SVwO+k5EBt3dCyNX2g== X-Received: by 2002:adf:cc82:: with SMTP id p2mr29451315wrj.5.1632147602542; Mon, 20 Sep 2021 07:20:02 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n17sm16229693wrp.17.2021.09.20.07.20.02 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 07:20:02 -0700 (PDT) From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL 17/27] target/arm: Enforce that FPDSCR.LTPSIZE is 4 on inbound migration Date: Mon, 20 Sep 2021 15:19:37 +0100 Message-Id: <20210920141947.5537-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210920141947.5537-1-peter.maydell@linaro.org> References: <20210920141947.5537-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target-arm queue
|
expand
|
diff --git a/target/arm/machine.c b/target/arm/machine.c index 81e30de8243..c74d8c3f4b3 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -781,6 +781,19 @@ static int cpu_post_load(void *opaque, int version_id) hw_breakpoint_update_all(cpu); hw_watchpoint_update_all(cpu); + /* + * TCG gen_update_fp_context() relies on the invariant that + * FPDSCR.LTPSIZE is constant 4 for M-profile with the LOB extension; + * forbid bogus incoming data with some other value. + */ + if (arm_feature(env, ARM_FEATURE_M) && cpu_isar_feature(aa32_lob, cpu)) { + if (extract32(env->v7m.fpdscr[M_REG_NS], + FPCR_LTPSIZE_SHIFT, FPCR_LTPSIZE_LENGTH) != 4 || + extract32(env->v7m.fpdscr[M_REG_S], + FPCR_LTPSIZE_SHIFT, FPCR_LTPSIZE_LENGTH) != 4) { + return -1; + } + } if (!kvm_enabled()) { pmu_op_finish(&cpu->env); }