From nobody Mon Feb 9 05:29:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1629122465; cv=none; d=zohomail.com; s=zohoarc; b=Mppjjbu+S0Vwyh+stqS3iRRAtyQoegPBuVr6ffC4Ih2cNU+a+V7HC2hLlaLbQ45xYeocrmDwbCTVpySUE4qAnqI1iuoJwNkx6pDDoDa0KSoFPsZChOL9+c3bGUK8kTPuzv4u7gwN1DOHT9JAnHdFvq+aBaK6hRV6i0SJ2P6V5i4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629122465; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=G+5WdnIF0AlNWQxsS14WT6o6igP3aa3eGxkIM5Nj9A8=; b=EdyDEWs/IN3bHKPhs39fiMIChkOrDpGu2Yr+y/krZBynncP9kyJNlHDdhJA+muEo1xiPGP/qbTSKbxSyl1L3SptnoSuJWENu79Wh0lXzetbZDbr3eUPv3OmlRuS2ZQz5C+l7l7IlCG9L/vP0V15QRwM+puS0je0vpyKkKa6h9T0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1629122465537821.8318035022415; Mon, 16 Aug 2021 07:01:05 -0700 (PDT) Received: from localhost ([::1]:48836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFdAl-0005r5-L5 for importer@patchew.org; Mon, 16 Aug 2021 10:01:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFd8a-0003By-Tr for qemu-devel@nongnu.org; Mon, 16 Aug 2021 09:58:48 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:35634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFd8Z-000620-9y for qemu-devel@nongnu.org; Mon, 16 Aug 2021 09:58:48 -0400 Received: by mail-wr1-x42b.google.com with SMTP id q10so23826637wro.2 for ; Mon, 16 Aug 2021 06:58:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y14sm11855631wrs.29.2021.08.16.06.58.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 06:58:45 -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=G+5WdnIF0AlNWQxsS14WT6o6igP3aa3eGxkIM5Nj9A8=; b=Tdb0r/wbvlfqvUqBK0PBEoSenzXO6sJW7i8ZDQRMW3whbaAuc1trHIRsjCVzvRwiO+ 3E6sqyWPyV8UetGa51lLZ4fqhFZDOBjQCi8PmlLcQlgbG8hBv4N8JHncj6FxVo8PtTFW zaeJ1fQocSc4QVEF+dawpNEPX0miOiaLHWqW6pty0Bfsban+0FRkvWT1mftYcwzLExk7 rk/5ndVRZCP/l/ubHoUTSBkTFTss56edbWgNml1lSZu1kc2ufKm9XNJmcf15Y9aaWvmY NO4UbtYua333uvplrARxd5bs30xcOqGsPsKTZTrzpNSPi6lYYH/mqqmAFpYghTcaGya0 ulXQ== 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=G+5WdnIF0AlNWQxsS14WT6o6igP3aa3eGxkIM5Nj9A8=; b=ic3xvTcE9JEWXUlY/RjbEQNE6GNgsTPRNy6yd1SR+FNSPJLyq2tdkELa/o7SLhIQIA gw+wenggi9OPNm/LpVyUh2eHhQr2f+xd7Y8kNgpYPtManxtQlVYt/24G4TkBygghcs0X KY8z/MzIiAMY6ooVHjnl8tbhfS7VpnINMu8krbB4KeMVjY94e3q4SkRcQYGi09H0gN3t YD+K8pW7tppgt45X524xInV1YnUsxMRraLMLNwx/MAakDFlzZCAhX5hJP8spxRltijyJ igzoSTevkDiVGOHPQDcgX/SiP2XzfOlNtYmS+fIACV/mHQ8SrUiuszKjmHIu8Z4zCU87 poUg== X-Gm-Message-State: AOAM531K+bAnLOFgttU6eY8xVDRdP7CuCpekfaOHSUsJcdYLEku0TrQs gzzD8umFPizB/49LqkhQV928sA== X-Google-Smtp-Source: ABdhPJwYXOMeBcx8+tbRAdNNOSkeVNCxN8KDL173VTiTvz/Nm7+WSlxXy3xCKW0dQ7wKRPuoUm1qdQ== X-Received: by 2002:a5d:4447:: with SMTP id x7mr19872425wrr.198.1629122325300; Mon, 16 Aug 2021 06:58:45 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/3] raspi: Use error_fatal for SoC realize errors, not error_abort Date: Mon, 16 Aug 2021 14:58:40 +0100 Message-Id: <20210816135842.25302-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210816135842.25302-1-peter.maydell@linaro.org> References: <20210816135842.25302-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1629122490183100001 Content-Type: text/plain; charset="utf-8" The SoC realize can fail for legitimate reasons, because it propagates errors up from CPU realize, which in turn can be provoked by user error in setting commandline options. Use error_fatal so we report the error message to the user and exit, rather than asserting via error_abort. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/arm/raspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index b30a17871f7..0ada91c05e9 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -281,7 +281,7 @@ static void raspi_machine_init(MachineState *machine) object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(machine-= >ram)); object_property_set_int(OBJECT(&s->soc), "board-rev", board_rev, &error_abort); - qdev_realize(DEVICE(&s->soc), NULL, &error_abort); + qdev_realize(DEVICE(&s->soc), NULL, &error_fatal); =20 /* Create and plug in the SD cards */ di =3D drive_get_next(IF_SD); --=20 2.20.1 From nobody Mon Feb 9 05:29:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1629122467; cv=none; d=zohomail.com; s=zohoarc; b=AwnaWIFhUw+VRaAjjDfUDNmTiiTkor3OUrbgvEFRUaQqG8Wqg5hWx5YdsmUFcNMWKd8Go5Ec8tPcsQumaXJ5MFvDRGkIglay9bMrlgjD3v+N5IwzxeK8i7zWWfw+xn0nsvKJDfPy3UFWLysc0PAUiu1iOvwdx8/SHr4GwXhWti8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629122467; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t/udaJMwa5qZbLWXNvr9taHHSSvraZWWiRbg1Mycy2Y=; b=PgCtjfIyzkUKWjx86GnqJd6InIWHSmIPPjvE245BKxoNEJ2445XNAusq1qoMi9klmoaQXPTZKrl5UMKVHdg2Mr/fU/ugXVa6WR1yfQTg4iMaHrgqcK8Ia2/sIBKg2kaTvXWJpbEFfnTsBuKRXNm/4WeQ37rbKNlHJK5smyLBIVs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1629122467941231.15474071780397; Mon, 16 Aug 2021 07:01:07 -0700 (PDT) Received: from localhost ([::1]:48970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFdAo-0005wa-Mx for importer@patchew.org; Mon, 16 Aug 2021 10:01:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFd8c-0003Ek-Dt for qemu-devel@nongnu.org; Mon, 16 Aug 2021 09:58:50 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:37852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFd8Z-00062G-Db for qemu-devel@nongnu.org; Mon, 16 Aug 2021 09:58:50 -0400 Received: by mail-wm1-x332.google.com with SMTP id c8-20020a7bc008000000b002e6e462e95fso2332732wmb.2 for ; Mon, 16 Aug 2021 06:58:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y14sm11855631wrs.29.2021.08.16.06.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 06:58:45 -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=t/udaJMwa5qZbLWXNvr9taHHSSvraZWWiRbg1Mycy2Y=; b=bhJDtEvxK+TjglUBdhkAzbtdaJ3JJRaEmp/woMuxnqpXmNdAvHNRqMLhQ4IZLR5eCY gGt4yc+CFtfeC8sVtc1vHnRK5KArpWPwYMA0WndyA/P59rr7EdBy7sl6z89CPHaSyY0F o2Qc2to8YuBHswWnHGBqS3PcV0KC1s03fkH1XQ22vi9zjHLVDfiy57C4iMtGhCjtgBmr bmjzjPBjX64Pt2Jznbl4MKULOauZMenwcE/kfgi/kHY/n+Yw0iIHSFLVOckjxsJ064bM i+okrdCmbsKCPwUomhPlVmG227QszlZrvnQ4R8zrP0AiuPY2GNVCDPNMR4XYB75OTEq1 h7Yg== 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=t/udaJMwa5qZbLWXNvr9taHHSSvraZWWiRbg1Mycy2Y=; b=ECVkA4gRkVsbEM50p8oic7F0ayf7+mtj38ikb0V0xfieTMf7QA3rydS4y5653aEaT5 8q0YBJ58hfrsaDNz4gxjqelrlm7vmgnIhqN4r5wUv2rViZYSJPM55MzZpLUIFmJ6okLA wlCRuv3DYvxFcQlzXR75ZCxCmzqFpmDHHQt8Jl4DZW8UGu/AW55FFKSIxwD+e297WFuc kHeejVGAwkjPetfGalYfQJLfjy2zNkOH2MLZVVZNk13/X6uOb/CKH1v3b3WebiPM3Smz N46YAOV1mN73f6GpPhCI3W5IexaK9Yc0HtcrMAz7OXPxnwObRR56QD4sRPxmadBBD1E3 tO+A== X-Gm-Message-State: AOAM532amSwYonP9BJA+vAtkWoJoQw+ePVJn5Jeog9HkzwHV7JJOMD0S aGrxy9vvp0jkxqe4lL6YnybSmw== X-Google-Smtp-Source: ABdhPJzdwiAFezVvo+vnIJNWNUuAa3BJUby1f3maISL6Uqvuq8zELwJ9wwGLiraUMEozBa7jPjhg2Q== X-Received: by 2002:a7b:c04b:: with SMTP id u11mr9047399wmc.41.1629122326081; Mon, 16 Aug 2021 06:58:46 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/3] target/arm: Avoid assertion trying to use KVM and multiple ASes Date: Mon, 16 Aug 2021 14:58:41 +0100 Message-Id: <20210816135842.25302-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210816135842.25302-1-peter.maydell@linaro.org> References: <20210816135842.25302-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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=unavailable autolearn_force=no X-Spam_action: no action 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?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1629122493501100001 Content-Type: text/plain; charset="utf-8" KVM cannot support multiple address spaces per CPU; if you try to create more than one then cpu_address_space_init() will assert. In the Arm CPU realize function, detect the configurations which would cause us to need more than one AS, and cleanly fail the realize rather than blundering on into the assertion. This turns this: $ qemu-system-aarch64 -enable-kvm -display none -cpu max -machine raspi3b qemu-system-aarch64: ../../softmmu/physmem.c:747: cpu_address_space_init:= Assertion `asidx =3D=3D 0 || !kvm_enabled()' failed. Aborted into: $ qemu-system-aarch64 -enable-kvm -display none -machine raspi3b qemu-system-aarch64: Cannot enable KVM when guest CPU has EL3 enabled and this: $ qemu-system-aarch64 -enable-kvm -display none -machine mps3-an524 qemu-system-aarch64: ../../softmmu/physmem.c:747: cpu_address_space_init:= Assertion `asidx =3D=3D 0 || !kvm_enabled()' failed. Aborted into: $ qemu-system-aarch64 -enable-kvm -display none -machine mps3-an524 qemu-system-aarch64: Cannot enable KVM when using an M-profile guest CPU Fixes: https://gitlab.com/qemu-project/qemu/-/issues/528 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/cpu.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 2866dd76588..4377f3211c8 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1419,6 +1419,29 @@ static void arm_cpu_realizefn(DeviceState *dev, Erro= r **errp) } } =20 + if (kvm_enabled()) { + /* + * Catch all the cases which might cause us to create more than one + * address space for the CPU (otherwise we will assert() later in + * cpu_address_space_init()). + */ + if (arm_feature(env, ARM_FEATURE_M)) { + error_setg(errp, + "Cannot enable KVM when using an M-profile guest CP= U"); + return; + } + if (cpu->has_el3) { + error_setg(errp, + "Cannot enable KVM when guest CPU has EL3 enabled"); + return; + } + if (cpu->tag_memory) { + error_setg(errp, + "Cannot enable KVM when guest CPUs has MTE enabled"= ); + return; + } + } + { uint64_t scale; =20 --=20 2.20.1 From nobody Mon Feb 9 05:29:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1629122668; cv=none; d=zohomail.com; s=zohoarc; b=QNEwchs80aK09A1Ux7oXdYP0K82kUZJD1TRaFDw16yjqn9mBnFQVhod6Q+H0G2h06U0SKV45oD2wQtOWEjzqFvEwgMDuaCbIRPSFF+xp0fS3MvhNvzm5/9S5fBJkTVIOSkPv6xsWL+UqNfoi29vtUwdF7F+ntQI1QQLqAOjPHQ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629122668; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wn5VOuzTj12riqfVnYaRkG+PQKOXcXHYoP+ynL4fbZk=; b=lQhhw79JEJoxu4ULiXxmJcSMEVgmn0qBejJubE4XcQoWBP7QtxAHMkkgWHfeku2uXh3NERvMFK9sn/PVPpTqKWM2KKQOFdS87ucfS7F6hqOW8QMpENSTepxEfX2ta/VblQtZbkyBTVfZpAJpwCuUsnPO1AbMWDJp3M1wZp6jHCY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1629122668930139.0465993735886; Mon, 16 Aug 2021 07:04:28 -0700 (PDT) Received: from localhost ([::1]:57786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFdE3-0003PB-MR for importer@patchew.org; Mon, 16 Aug 2021 10:04:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFd8e-0003Kq-BN for qemu-devel@nongnu.org; Mon, 16 Aug 2021 09:58:52 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:46037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFd8a-00062x-8v for qemu-devel@nongnu.org; Mon, 16 Aug 2021 09:58:52 -0400 Received: by mail-wm1-x333.google.com with SMTP id j12-20020a05600c1c0c00b002e6d80c902dso34631wms.4 for ; Mon, 16 Aug 2021 06:58:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y14sm11855631wrs.29.2021.08.16.06.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 06:58:46 -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=Wn5VOuzTj12riqfVnYaRkG+PQKOXcXHYoP+ynL4fbZk=; b=Gs71d1rwk9iC+JBhlKqxMkAM6WDI9Y8Po5vDe6nqE3ebsSO3bgRwKx3jv3erPhhWV4 Iv+7hd9yvc6L06ofFP4dSl5qVn8Q0FxdKa4bVxvcRmIvsKT77V/VZrjrCHyQTnmcwJpH a2D/xcOzjWZhPVJ/hnhoswMU79bDZmiXQMylWLju6LPOapeCPaJdBs9xw8Yq0RSF76+w VtbMf2YbmE2KndGKWqBiHiHpzc3ggVGBbj3SA72vzNGTIOf+t3zLmOAASXtlnUj49vm/ QehmMV/fh65gME07TVwX7eoxmR+P5kQpzh9vJr2eLcdlR5OJfZjWb1IUTMgTjiLMiuIf zgaA== 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=Wn5VOuzTj12riqfVnYaRkG+PQKOXcXHYoP+ynL4fbZk=; b=sypQ68SlnGbT149lSFRnPmKyrLoQJ6vlEjdk6knU4+DWAAkd1+d/ijKjydOSqwpo33 cP/cVlF62goQAj4folpkKGMHZTzmbY2Vq3NM/EWmZeK7c5msUJoxi9UuHe0JNt/DjdOt qv8uQnX395aq84S299jwcTn5Vg0wnsQiutHRUC9Bgf+NOAIN6AB91J8fECGWQ7dBSby4 CIUIjiDE6dJuBv14bl+jzTOZA8qmxUSpeBZOPNRJcw+CVOpq8Tj6MV0HaRoQeIpJqtye TCpBh9HVfVvQoBgNjjmMoJYWqDWGRt7co8mhcB4ObuQelMmHQ3UWdhiuYeL3y7lQAurM ueNg== X-Gm-Message-State: AOAM532UwrpfNkpMAL7lFL6aAcwvYI442AzbE/j4XTUyjVwd2MiUn1tt iM9SnZyQIxYKeQx3qh6pQbHWRgkZppKUZw== X-Google-Smtp-Source: ABdhPJzUCOsR8aWP2GcfT5JnK5j6RyoQAwhgfn+4dFnYZqMNr3Vl6kEGeIHP6fuKyYRmTXb2TzUQTA== X-Received: by 2002:a7b:c114:: with SMTP id w20mr15607904wmi.85.1629122326973; Mon, 16 Aug 2021 06:58:46 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/3] hw/arm/virt: Delete EL3 error checksnow provided in CPU realize Date: Mon, 16 Aug 2021 14:58:42 +0100 Message-Id: <20210816135842.25302-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210816135842.25302-1-peter.maydell@linaro.org> References: <20210816135842.25302-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1629122687400100001 Content-Type: text/plain; charset="utf-8" Now that the CPU realize function will fail cleanly if we ask for EL3 when KVM is enabled, we don't need to check for errors explicitly in the virt board code. The reported message is slightly different; it is now: qemu-system-aarch64: Cannot enable KVM when guest CPU has EL3 enabled instead of: qemu-system-aarch64: mach-virt: KVM does not support Security extensions We don't delete the MTE check because there the logic is more complex; deleting the check would work but makes the error message less helpful, as it would read: qemu-system-aarch64: MTE requested, but not supported by the guest CPU instead of: qemu-system-aarch64: mach-virt: KVM does not support providing MTE to the= guest CPU Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/arm/virt.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 81eda46b0bb..86c8a4ca3d7 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1852,11 +1852,6 @@ static void machvirt_init(MachineState *machine) } =20 if (vms->secure) { - if (kvm_enabled()) { - error_report("mach-virt: KVM does not support Security extensi= ons"); - exit(1); - } - /* * The Secure view of the world is the same as the NonSecure, * but with a few extra devices. Create it as a container region --=20 2.20.1