diff mbox series

[RFC,1/5] linux-headers: [kvm, arm64] add the necessary definitions to match host kernel

Message ID 20230227163718.62003-2-miguel.luis@oracle.com
State New
Headers show
Series QEMU v7.2.0 aarch64 Nested Virtualization Support | expand

Commit Message

Miguel Luis Feb. 27, 2023, 4:37 p.m. UTC
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(+)

Comments

Cornelia Huck Feb. 27, 2023, 4:49 p.m. UTC | #1
On Mon, Feb 27 2023, Miguel Luis <miguel.luis@oracle.com> wrote:

> 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(+)

Can you please mark this explicitly as a placeholder for a proper
headers update? Just so that it doesn't get lost :)
Miguel Luis Feb. 28, 2023, 10:01 a.m. UTC | #2
Hi Cornelia,

> On 27 Feb 2023, at 15:49, Cornelia Huck <cohuck@redhat.com> wrote:
> 
> On Mon, Feb 27 2023, Miguel Luis <miguel.luis@oracle.com> wrote:
> 
>> 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(+)
> 
> Can you please mark this explicitly as a placeholder for a proper
> headers update? Just so that it doesn't get lost :)

Sure yes! Thank you.

Miguel
diff mbox series

Patch

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