From patchwork Mon Feb 27 16:37:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Luis X-Patchwork-Id: 13153881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9C9DC64ED6 for ; Mon, 27 Feb 2023 16:39:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWgVb-0003PE-4C; Mon, 27 Feb 2023 11:37:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWgVX-00030J-GU; Mon, 27 Feb 2023 11:37:47 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWgVU-00063V-2t; Mon, 27 Feb 2023 11:37:47 -0500 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31RFwvTH017935; Mon, 27 Feb 2023 16:37:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2022-7-12; bh=DPCvqMvPGr7V9CaopBQymsI4DUZJ7DMryFxJNSsGiN0=; b=n5YvX+GdQ97oigmnQY1fuJ+/VI/mN28paW/eg77ToGDuPhZLcIVNrvbL+1N9nX4JOUMc 4Fxi2Rek5Q3CW6M7Aj2qNgG6od19/B5au4R543FvcmzOrsU/qqd9QGLZXQ4oW69EHK42 3bf/0LGi44K+TiUt0G5VqLDBHe24MC3snGZEEZvmOtQjVTiS/wYlEyjMnf+zySJJhtFS IbD8BVX+gRCo8Mg/9CITNKzfZSzjn80Yn4SOIyXYNH6OQa2T3+9239VJWg31IiDzMaE4 4y55sVgOvPAKf/6BrikQ/XTCIIB9667WhRlc5F//B8Ui2/RIemZxmWc8WhTClchkPJ74 Pw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nybakm2q8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Feb 2023 16:37:40 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31RFvTXR015935; Mon, 27 Feb 2023 16:37:40 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ny8s5sy6e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Feb 2023 16:37:39 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 31RGbMkO006629; Mon, 27 Feb 2023 16:37:39 GMT Received: from mlluis-mac.uk.oracle.com (dhcp-10-175-167-110.vpn.oracle.com [10.175.167.110]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3ny8s5sxr5-6; Mon, 27 Feb 2023 16:37:38 +0000 From: Miguel Luis To: Peter Maydell , "Michael S . Tsirkin" , Cornelia Huck , Paolo Bonzini , qemu-arm@nongnu.org, qemu-devel@nongnu.org, Haibo Xu , Andrew Jones , Marc Zyngier Cc: Miguel Luis Subject: [RFC PATCH 5/5] arm/virt: provide virtualization extensions to the guest Date: Mon, 27 Feb 2023 15:37:18 -0100 Message-Id: <20230227163718.62003-6-miguel.luis@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230227163718.62003-1-miguel.luis@oracle.com> References: <20230227163718.62003-1-miguel.luis@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-27_13,2023-02-27_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302270129 X-Proofpoint-GUID: uYuUIqgWuiwxsgj6NLYdHGKFxoaKAUku X-Proofpoint-ORIG-GUID: uYuUIqgWuiwxsgj6NLYdHGKFxoaKAUku Received-SPF: pass client-ip=205.220.177.32; envelope-from=miguel.luis@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Haibo Xu VHE enablement if host supports EL2. Ref: https://lore.kernel.org/qemu-devel/b7c2626e6c720ccc43e57197dff3dac72d613640.1616052890.git.haibo.xu@linaro.org/ Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis --- hw/arm/virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 377181e009..7103aecf3f 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2093,7 +2093,8 @@ static void machvirt_init(MachineState *machine) exit(1); } - if (vms->virt && (kvm_enabled() || hvf_enabled())) { + if (vms->virt && (kvm_enabled() || hvf_enabled()) + && !kvm_arm_el2_supported()) { error_report("mach-virt: %s does not support providing " "Virtualization extensions to the guest CPU", kvm_enabled() ? "KVM" : "HVF");