From patchwork Mon Feb 27 16:37:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Luis X-Patchwork-Id: 13153882 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 EFC45C64ED6 for ; Mon, 27 Feb 2023 16:39:25 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWgVU-0002X1-T6; Mon, 27 Feb 2023 11:37:44 -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 1pWgVM-0001gO-Rt; Mon, 27 Feb 2023 11:37:37 -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 1pWgVK-0005yE-6n; Mon, 27 Feb 2023 11:37:36 -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 31RFx0lT017991; Mon, 27 Feb 2023 16:37:27 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=rTriC+4TYpBpCIaLSrQKJLiKY2LpnU1OrAoDHanWq8M=; b=H2XAaV5ECKXIbVNRByx5+LztjO8BLkJIhCr+RSteSv4lT2a+GVDK8g17Q0kyxLg9WU+h 6hchzacfcSY9HZLDdyFhRgz2t0yNGCdrORAnK5FNPAxbW7u6+eVbNsGDuizdSZ2IgRen CsPX8A0K45wChthB7ecR7zMmMqDWOxjxgOBJaj856oYa7NT5jnBnfpfJmkkmRAIlhKCu 0/4lkMLirarzB8G21IQ5FQpN668jOk2+Zxg10QbgptTw7W5kcZulsSfzf4T4yKfDs11O yas+JJ7nKw7HFnQJA3d3yT37mYL5OLRnUhMxChneIURCeoV3o9popQBOZEG8SKricpkp zw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nybakm2pf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Feb 2023 16:37:27 +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 31RFLjoZ015922; Mon, 27 Feb 2023 16:37:26 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ny8s5sxw1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Feb 2023 16:37:26 +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 31RGbMkG006629; Mon, 27 Feb 2023 16:37:26 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-2; Mon, 27 Feb 2023 16:37:25 +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 1/5] linux-headers: [kvm, arm64] add the necessary definitions to match host kernel Date: Mon, 27 Feb 2023 15:37:14 -0100 Message-Id: <20230227163718.62003-2-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: Ic64kyM51a6SpWhw5atj_ymbtFzg0klF X-Proofpoint-ORIG-GUID: Ic64kyM51a6SpWhw5atj_ymbtFzg0klF 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 linux-headers define host properties needed for the VMM to interact with KVM, so let's include them *while* they're not available yet on linux upstream since aarch64 nested virtualization is still a work in progress. Ref: https://lore.kernel.org/qemu-devel/636b5932e4cf061b6f97516e82d4319c1d29b871.1616052889.git.haibo.xu@linaro.org/ Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis --- linux-headers/asm-arm64/kvm.h | 2 ++ linux-headers/linux/kvm.h | 1 + 2 files changed, 3 insertions(+) diff --git a/linux-headers/asm-arm64/kvm.h b/linux-headers/asm-arm64/kvm.h index 4bf2d7246e..7bbcba7418 100644 --- a/linux-headers/asm-arm64/kvm.h +++ b/linux-headers/asm-arm64/kvm.h @@ -108,6 +108,7 @@ struct kvm_regs { #define KVM_ARM_VCPU_SVE 4 /* enable SVE for this CPU */ #define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 /* VCPU uses address authentication */ #define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */ +#define KVM_ARM_VCPU_HAS_EL2 7 /* Support Nested Virtualization */ struct kvm_vcpu_init { __u32 target; @@ -379,6 +380,7 @@ enum { #define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 #define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 #define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 +#define KVM_DEV_ARM_VGIC_GRP_MAINT_IRQ 9 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index ebdafa576d..bfd1d73988 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1175,6 +1175,7 @@ struct kvm_ppc_resize_hpt { #define KVM_CAP_VM_DISABLE_NX_HUGE_PAGES 220 #define KVM_CAP_S390_ZPCI_OP 221 #define KVM_CAP_S390_CPU_TOPOLOGY 222 +#define KVM_CAP_ARM_EL2 226 #ifdef KVM_CAP_IRQ_ROUTING