qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Luis <miguel.luis@oracle.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	Haibo Xu <haibo.xu@linaro.org>, Andrew Jones <drjones@redhat.com>,
	Marc Zyngier <maz@kernel.org>
Cc: Miguel Luis <miguel.luis@oracle.com>
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	[thread overview]
Message-ID: <20230227163718.62003-2-miguel.luis@oracle.com> (raw)
In-Reply-To: <20230227163718.62003-1-miguel.luis@oracle.com>

From: Haibo Xu <haibo.xu@linaro.org>

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 <haibo.xu@linaro.org>
Signed-off-by: Miguel Luis <miguel.luis@oracle.com>
---
 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
 
-- 
2.39.2



  reply	other threads:[~2023-02-27 16:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 16:37 [RFC PATCH 0/5] QEMU v7.2.0 aarch64 Nested Virtualization Support Miguel Luis
2023-02-27 16:37 ` Miguel Luis [this message]
2023-02-27 16:49   ` [RFC PATCH 1/5] linux-headers: [kvm, arm64] add the necessary definitions to match host kernel Cornelia Huck
2023-02-28 10:01     ` Miguel Luis
2023-02-27 16:37 ` [RFC PATCH 2/5] hw/intc/gicv3: add support for setting KVM vGIC maintenance IRQ Miguel Luis
2023-03-06 14:02   ` Peter Maydell
2023-03-06 14:32     ` Marc Zyngier
2023-03-06 20:04       ` Miguel Luis
2023-03-06 18:34     ` Miguel Luis
2023-02-27 16:37 ` [RFC PATCH 3/5] target/arm/kvm: add helper to detect EL2 when using KVM Miguel Luis
2023-02-27 19:27   ` Richard Henderson
2023-02-27 16:37 ` [RFC PATCH 4/5] target/arm: enable feature ARM_FEATURE_EL2 if EL2 is supported Miguel Luis
2023-02-27 19:24   ` Richard Henderson
2023-02-28 12:23     ` Miguel Luis
2023-07-06  8:16   ` Eric Auger
2023-07-14 12:45     ` Miguel Luis
2023-02-27 16:37 ` [RFC PATCH 5/5] arm/virt: provide virtualization extensions to the guest Miguel Luis
2023-02-27 19:26   ` Richard Henderson
2023-02-28 12:31     ` Miguel Luis
2024-02-08 16:55 ` [RFC PATCH 0/5] QEMU v7.2.0 aarch64 Nested Virtualization Support Eric Auger
2024-02-08 17:33   ` Miguel Luis
2024-02-08 18:23     ` Eric Auger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230227163718.62003-2-miguel.luis@oracle.com \
    --to=miguel.luis@oracle.com \
    --cc=cohuck@redhat.com \
    --cc=drjones@redhat.com \
    --cc=haibo.xu@linaro.org \
    --cc=maz@kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).