[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 23/37] linux-headers: update to 4.20-rc5
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH v6 23/37] linux-headers: update to 4.20-rc5 |
Date: |
Thu, 6 Dec 2018 00:22:37 +0100 |
These changes provide the initial interface with the KVM device
implementing the XIVE native exploitation interrupt mode. Also used to
retrieve the state of the KVM device for the monitor usage and for
migration.
Available from :
https://github.com/legoater/linux/commits/xive-4.20
Signed-off-by: Cédric Le Goater <address@hidden>
---
linux-headers/asm-powerpc/kvm.h | 46 +++++++++++++++++++++++++++++++++
linux-headers/linux/kvm.h | 6 +++++
2 files changed, 52 insertions(+)
diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kvm.h
index 8c876c166ef2..10fe86c21e8f 100644
--- a/linux-headers/asm-powerpc/kvm.h
+++ b/linux-headers/asm-powerpc/kvm.h
@@ -480,6 +480,8 @@ struct kvm_ppc_cpu_char {
#define KVM_REG_PPC_ICP_PPRI_SHIFT 16 /* pending irq priority */
#define KVM_REG_PPC_ICP_PPRI_MASK 0xff
+#define KVM_REG_PPC_NVT_STATE (KVM_REG_PPC | KVM_REG_SIZE_U256 | 0x8d)
+
/* Device control API: PPC-specific devices */
#define KVM_DEV_MPIC_GRP_MISC 1
#define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */
@@ -675,4 +677,48 @@ struct kvm_ppc_cpu_char {
#define KVM_XICS_PRESENTED (1ULL << 43)
#define KVM_XICS_QUEUED (1ULL << 44)
+/* POWER9 XIVE Native Interrupt Controller */
+#define KVM_DEV_XIVE_GRP_CTRL 1
+#define KVM_DEV_XIVE_GET_ESB_FD 1
+#define KVM_DEV_XIVE_GET_TIMA_FD 2
+#define KVM_DEV_XIVE_VC_BASE 3
+#define KVM_DEV_XIVE_SAVE_EQ_PAGES 4
+#define KVM_DEV_XIVE_GRP_SOURCES 2 /* 64-bit source attributes */
+#define KVM_DEV_XIVE_GRP_SYNC 3 /* 64-bit source attributes */
+#define KVM_DEV_XIVE_GRP_EAS 4 /* 64-bit eas attributes */
+#define KVM_DEV_XIVE_GRP_EQ 5 /* 64-bit eq attributes */
+
+/* Layout of 64-bit XIVE source attribute values */
+#define KVM_XIVE_LEVEL_SENSITIVE (1ULL << 0)
+#define KVM_XIVE_LEVEL_ASSERTED (1ULL << 1)
+
+/* Layout of 64-bit eas attribute values */
+#define KVM_XIVE_EAS_PRIORITY_SHIFT 0
+#define KVM_XIVE_EAS_PRIORITY_MASK 0x7
+#define KVM_XIVE_EAS_SERVER_SHIFT 3
+#define KVM_XIVE_EAS_SERVER_MASK 0xfffffff8ULL
+#define KVM_XIVE_EAS_MASK_SHIFT 32
+#define KVM_XIVE_EAS_MASK_MASK 0x100000000ULL
+#define KVM_XIVE_EAS_EISN_SHIFT 33
+#define KVM_XIVE_EAS_EISN_MASK 0xfffffffe00000000ULL
+
+/* Layout of 64-bit eq attribute */
+#define KVM_XIVE_EQ_PRIORITY_SHIFT 0
+#define KVM_XIVE_EQ_PRIORITY_MASK 0x7
+#define KVM_XIVE_EQ_SERVER_SHIFT 3
+#define KVM_XIVE_EQ_SERVER_MASK 0xfffffff8ULL
+
+/* Layout of 64-bit eq attribute values */
+struct kvm_ppc_xive_eq {
+ __u32 flags;
+ __u32 qsize;
+ __u64 qpage;
+ __u32 qtoggle;
+ __u32 qindex;
+};
+
+#define KVM_XIVE_EQ_FLAG_ENABLED 0x00000001
+#define KVM_XIVE_EQ_FLAG_ALWAYS_NOTIFY 0x00000002
+#define KVM_XIVE_EQ_FLAG_ESCALATE 0x00000004
+
#endif /* __LINUX_KVM_POWERPC_H */
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index f11a7eb49cfa..b7a74c58d0db 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -965,6 +965,8 @@ struct kvm_ppc_resize_hpt {
#define KVM_CAP_COALESCED_PIO 162
#define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163
#define KVM_CAP_EXCEPTION_PAYLOAD 164
+#define KVM_CAP_ARM_VM_IPA_SIZE 165
+#define KVM_CAP_PPC_IRQ_XIVE 166
#ifdef KVM_CAP_IRQ_ROUTING
@@ -1188,6 +1190,8 @@ enum kvm_device_type {
#define KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_V3
KVM_DEV_TYPE_ARM_VGIC_ITS,
#define KVM_DEV_TYPE_ARM_VGIC_ITS KVM_DEV_TYPE_ARM_VGIC_ITS
+ KVM_DEV_TYPE_XIVE,
+#define KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_XIVE
KVM_DEV_TYPE_MAX,
};
@@ -1305,6 +1309,8 @@ struct kvm_s390_ucas_mapping {
#define KVM_GET_DEVICE_ATTR _IOW(KVMIO, 0xe2, struct kvm_device_attr)
#define KVM_HAS_DEVICE_ATTR _IOW(KVMIO, 0xe3, struct kvm_device_attr)
+#define KVM_DESTROY_DEVICE _IOWR(KVMIO, 0xf0, struct kvm_create_device)
+
/*
* ioctls for vcpu fds
*/
--
2.17.2
- Re: [Qemu-devel] [PATCH v6 15/37] spapr: export and rename the xics_max_server_number() routine, (continued)
- [Qemu-devel] [PATCH v6 12/37] spapr: initialize VSMT before initializing the IRQ backend, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 16/37] spapr: introdude a new machine IRQ backend for XIVE, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 18/37] spapr: add device tree support for the XIVE exploitation mode, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 19/37] spapr: allocate the interrupt thread context under the CPU core, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 20/37] spapr: extend the sPAPR IRQ backend for XICS migration, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 17/37] spapr: add hcalls support for the XIVE exploitation interrupt mode, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 21/37] spapr: add a 'reset' method to the sPAPR IRQ backend, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 22/37] spapr: add a 'pseries-3.1-xive' machine type, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 23/37] linux-headers: update to 4.20-rc5,
Cédric Le Goater <=
- [Qemu-devel] [PATCH v6 25/37] spapr/xive: add state synchronization with KVM, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 26/37] spapr/xive: introduce a VM state change handler, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 28/37] spapr/xive: fix migration of the XiveTCTX under TCG, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 29/37] spapr: set the interrupt presenter at reset, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 30/37] spapr/xive: enable XIVE MMIOs at reset, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 27/37] spapr/xive: add migration support for KVM, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 24/37] spapr/xive: add KVM support, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 31/37] spapr: add a 'pseries-3.1-dual' machine type, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 32/37] ppc/xics: introduce a icp_kvm_connect() routine, Cédric Le Goater, 2018/12/05
- [Qemu-devel] [PATCH v6 33/37] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers, Cédric Le Goater, 2018/12/05