From patchwork Mon Mar 7 16:47:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 548879 Delivered-To: patch@linaro.org Received: by 2002:adf:80eb:0:0:0:0:0 with SMTP id 98csp1095005wrl; Mon, 7 Mar 2022 08:54:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6E4Te3TSAGfRkktsdIWK4fd6oPbGTPqIntQN4x8LzzqH/mZwcra/81RS4JeXjillJ7iiI X-Received: by 2002:a81:8044:0:b0:2db:2d8b:154f with SMTP id q65-20020a818044000000b002db2d8b154fmr9770483ywf.191.1646672067193; Mon, 07 Mar 2022 08:54:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646672067; cv=none; d=google.com; s=arc-20160816; b=WJs7e6krAUJL5utrXMO942shbZ3q8yNrqVEOu2jMQr6+V7XdMF5SN+oxGNENhpkJ4p +DvOOlG76Zmlst0N16+hm/BmS5xlhNY+ZEv+AVordX3uhoI+nkWwK2zpTLOny3elZRwo SdJ2Gp0gBrvxoGdfSWSNXWLlUronCcRJP/QcwRfRh/Mvuxqf4WxBVw9wzzFDX+t5hExO NLoxA3rZb+wZOjMoZ4SrEGJEmBJjmhSzhFN7p5z8LwNew1TnvhJRzoLJ+anZEaW2wXMS XJlft/HARiGdjIMaIHidU+P82bWdL8ecrVNTuj9ktUvttBP51/3K9oh0HOyR2gqvHalj QH9Q== 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=rQyfB/hnr8PD3XNGQDMI+Pr8j6F6XBEv5eRGs9i8nt8=; b=fHbRd2MPpnmU4LV1SPLDhI2itN8GV8QjJh7kYymsjzMn096ZzJfWq+sNM75C/a+cmd ichnBpo7DeuBqr+2egoW0N7rMN/couXg0G90RdK0Pm8anM/2x60xw0sVKOUjXZIfcGaI B/2/dHbnWByFMJM6VQKwuKEeL9IOwUV8VgEsR/o7Mo8icHKPWausoKkR4JNICMB3zEGk Odhtg2zSa6cwz1hm+Jib9VNhC7rk2mlL+VLcbnIqdNXgJ9Bbg71/QAKLo66LOeT5llIK fC70258RNz7HohUJOIRaLkPVeiMLgIshOfp4yBIRj+HrtDPB5iDJL1IAr3ucrqU1vWUQ 002g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D10jSVS4; 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 i187-20020a816dc4000000b002dc8341e6dfsi4482898ywc.319.2022.03.07.08.54.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Mar 2022 08:54:27 -0800 (PST) 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=D10jSVS4; 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]:55520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRGcs-0008J7-Kj for patch@linaro.org; Mon, 07 Mar 2022 11:54:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRGWB-00023Y-KD for qemu-devel@nongnu.org; Mon, 07 Mar 2022 11:47:33 -0500 Received: from [2a00:1450:4864:20::42d] (port=43538 helo=mail-wr1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRGW8-0007mo-BE for qemu-devel@nongnu.org; Mon, 07 Mar 2022 11:47:29 -0500 Received: by mail-wr1-x42d.google.com with SMTP id e24so11303259wrc.10 for ; Mon, 07 Mar 2022 08:47:27 -0800 (PST) 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=rQyfB/hnr8PD3XNGQDMI+Pr8j6F6XBEv5eRGs9i8nt8=; b=D10jSVS475FnNaqQh2gJODWNdi1neVRNrKh53wfYyDUs+tiW/M7zdjfMwtlKeAZEKs VXrfpT63vUe30Bs6R6VJEKooRm8UI26e6wEKrWGTXtQUJfJrKkgXS0kVlcZYPd0m2myX tqNy7NM2OSPiP9D/Xfaqi7Ybe/b4eZ4XcskAQdYO0j+JlxvBRmL3KwI/IbuzsrLz0m2L YHXSn2jOazIt2iyzhxD9CdwmcyMsYYNkAhnosk4i8zC3DOq8XUCjOWmNCCpIoVS1fBjP K9gq9s9FQf++OYd4DalwzpuHciybry3EPTzF2F3t70+GuKJsnC9lJa/KcatG82l1HbjS /2Ag== 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=rQyfB/hnr8PD3XNGQDMI+Pr8j6F6XBEv5eRGs9i8nt8=; b=4n4AnLhPdzGYt/k0TG5rwQtAUnW5cpwXLJit4O5Oy7wQte8+r7JxLLwYY7d8TInmeW oPARBXLW30vHhzGo2HgZs5kBq+PAMoFqzbRYiF3QNtirpsgdfRqeQ8rP9NM3uAevd5Nc HmE2ovWr5uzKZVbysj3W6X1PYXSU7KD1wxX8cU0kNMFflqTNNEJBikyyUR/XEy/nAoQE kpVrPNeBh/xA07+kj/m9rxLDMBHcObvAhmaoXmm2XKh5sLL9FuqyBqQuvCj76fr7SAoo k2pJRXNKzMomxAgOvjbAGSTNUeGaGYl8hmHouREMmXqt+BJ2h+MxGqnWKuAfA4cWmEm7 xO3A== X-Gm-Message-State: AOAM531RB07f2amgiPRuIR35K8Aq7++PIEudNHmhpvqoEQ12VaFipQPd gs2pOhIe/fBpe3QMvTQkyM/4V1xYVkpctw== X-Received: by 2002:a05:6000:1206:b0:1f1:e68d:a72b with SMTP id e6-20020a056000120600b001f1e68da72bmr6537274wrx.368.1646671647036; Mon, 07 Mar 2022 08:47:27 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v188-20020a1cacc5000000b00384b71a50d5sm13806652wme.24.2022.03.07.08.47.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 08:47:26 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/18] hw/arm/virt: Disable LPA2 for -machine virt-6.2 Date: Mon, 7 Mar 2022 16:47:09 +0000 Message-Id: <20220307164709.2503250-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220307164709.2503250-1-peter.maydell@linaro.org> References: <20220307164709.2503250-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42d (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson There is a Linux kernel bug present until v5.12 that prevents booting with FEAT_LPA2 enabled. As a workaround for TCG, disable this feature for machine versions prior to 7.0. Cc: Daniel P. Berrangé Signed-off-by: Richard Henderson Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell --- include/hw/arm/virt.h | 1 + hw/arm/virt.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index c1ea17d0def..7e76ee26198 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -132,6 +132,7 @@ struct VirtMachineClass { bool no_secure_gpio; /* Machines < 6.2 have no support for describing cpu topology to guest */ bool no_cpu_topology; + bool no_tcg_lpa2; }; struct VirtMachineState { diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 46bf7ceddf3..46a42502bc5 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2102,6 +2102,10 @@ static void machvirt_init(MachineState *machine) object_property_set_bool(cpuobj, "pmu", false, NULL); } + if (vmc->no_tcg_lpa2 && object_property_find(cpuobj, "lpa2")) { + object_property_set_bool(cpuobj, "lpa2", false, NULL); + } + if (object_property_find(cpuobj, "reset-cbar")) { object_property_set_int(cpuobj, "reset-cbar", vms->memmap[VIRT_CPUPERIPHS].base, @@ -3020,8 +3024,11 @@ DEFINE_VIRT_MACHINE_AS_LATEST(7, 0) static void virt_machine_6_2_options(MachineClass *mc) { + VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc)); + virt_machine_7_0_options(mc); compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len); + vmc->no_tcg_lpa2 = true; } DEFINE_VIRT_MACHINE(6, 2)