linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: andre.przywara@arm.com (Andre Przywara)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 07/15] TEMPORARY: update public headers for GICv3 ITS emulation
Date: Wed, 20 Jul 2016 18:04:27 +0100	[thread overview]
Message-ID: <20160720170435.28090-8-andre.przywara@arm.com> (raw)
In-Reply-To: <20160720170435.28090-1-andre.przywara@arm.com>

This patch is preliminary and updates the headers from a kernel with
ITS emulation and ARM GSI routing support. It should be replaced by a
proper header update once the kernel patches have been merged and all
merge conflict have been sorted out.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arm/aarch64/include/asm/kvm.h |  2 ++
 include/linux/kvm.h           | 13 +++++++++++--
 x86/include/asm/kvm.h         |  6 +++---
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/arm/aarch64/include/asm/kvm.h b/arm/aarch64/include/asm/kvm.h
index f209ea1..3051f86 100644
--- a/arm/aarch64/include/asm/kvm.h
+++ b/arm/aarch64/include/asm/kvm.h
@@ -87,9 +87,11 @@ struct kvm_regs {
 /* Supported VGICv3 address types  */
 #define KVM_VGIC_V3_ADDR_TYPE_DIST	2
 #define KVM_VGIC_V3_ADDR_TYPE_REDIST	3
+#define KVM_VGIC_ITS_ADDR_TYPE		4
 
 #define KVM_VGIC_V3_DIST_SIZE		SZ_64K
 #define KVM_VGIC_V3_REDIST_SIZE		(2 * SZ_64K)
+#define KVM_VGIC_V3_ITS_SIZE		(2 * SZ_64K)
 
 #define KVM_ARM_VCPU_POWER_OFF		0 /* CPU is started in OFF state */
 #define KVM_ARM_VCPU_EL1_32BIT		1 /* CPU running a 32bit VM */
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index a7f1f80..91226f4 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -865,6 +865,8 @@ struct kvm_ppc_smmu_info {
 #define KVM_CAP_SPAPR_TCE_64 125
 #define KVM_CAP_ARM_PMU_V3 126
 #define KVM_CAP_VCPU_ATTRIBUTES 127
+#define KVM_CAP_MAX_VCPU_ID 128
+#define KVM_CAP_MSI_DEVID 131
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
@@ -877,7 +879,10 @@ struct kvm_irq_routing_msi {
 	__u32 address_lo;
 	__u32 address_hi;
 	__u32 data;
-	__u32 pad;
+	union {
+		__u32 pad;
+		__u32 devid;
+	};
 };
 
 struct kvm_irq_routing_s390_adapter {
@@ -1023,12 +1028,14 @@ struct kvm_one_reg {
 	__u64 addr;
 };
 
+#define KVM_MSI_VALID_DEVID	(1U << 0)
 struct kvm_msi {
 	__u32 address_lo;
 	__u32 address_hi;
 	__u32 data;
 	__u32 flags;
-	__u8  pad[16];
+	__u32 devid;
+	__u8  pad[12];
 };
 
 struct kvm_arm_device_addr {
@@ -1073,6 +1080,8 @@ enum kvm_device_type {
 #define KVM_DEV_TYPE_FLIC		KVM_DEV_TYPE_FLIC
 	KVM_DEV_TYPE_ARM_VGIC_V3,
 #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_MAX,
 };
 
diff --git a/x86/include/asm/kvm.h b/x86/include/asm/kvm.h
index cd54147..739c0c5 100644
--- a/x86/include/asm/kvm.h
+++ b/x86/include/asm/kvm.h
@@ -216,9 +216,9 @@ struct kvm_cpuid_entry2 {
 	__u32 padding[3];
 };
 
-#define KVM_CPUID_FLAG_SIGNIFCANT_INDEX		BIT(0)
-#define KVM_CPUID_FLAG_STATEFUL_FUNC		BIT(1)
-#define KVM_CPUID_FLAG_STATE_READ_NEXT		BIT(2)
+#define KVM_CPUID_FLAG_SIGNIFCANT_INDEX		(1 << 0)
+#define KVM_CPUID_FLAG_STATEFUL_FUNC		(1 << 1)
+#define KVM_CPUID_FLAG_STATE_READ_NEXT		(1 << 2)
 
 /* for KVM_SET_CPUID2 */
 struct kvm_cpuid2 {
-- 
2.9.0

  parent reply	other threads:[~2016-07-20 17:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 17:04 [PATCH v7 00/15] kvmtool: arm: ITS emulation and GSI routing support Andre Przywara
2016-07-20 17:04 ` [PATCH v7 01/15] FDT: introduce global phandle allocation Andre Przywara
2016-07-20 17:04 ` [PATCH v7 02/15] arm: use new phandle allocation functions Andre Przywara
2016-07-20 17:04 ` [PATCH v7 03/15] irq: move IRQ routing into irq.c Andre Przywara
2016-11-02 14:37   ` Jean-Philippe Brucker
2016-11-04 17:35     ` Andre Przywara
2016-07-20 17:04 ` [PATCH v7 04/15] MSI-X: update GSI routing after changed MSI-X configuration Andre Przywara
2016-07-20 17:04 ` [PATCH v7 05/15] virtio: fix endianness check for vhost support Andre Przywara
2016-07-20 17:04 ` [PATCH v7 06/15] PCI: Only allocate IRQ routing entry when available Andre Przywara
2016-07-20 17:04 ` Andre Przywara [this message]
2016-07-20 17:04 ` [PATCH v7 08/15] arm: allow creation of an MSI register frame region Andre Przywara
2016-07-20 17:04 ` [PATCH v7 09/15] arm: FDT: create MSI controller DT node Andre Przywara
2016-07-20 17:04 ` [PATCH v7 10/15] add kvm__check_vm_capability Andre Przywara
2016-07-20 17:04 ` [PATCH v7 11/15] PCI: inject PCI device ID on MSI injection Andre Przywara
2016-07-20 17:04 ` [PATCH v7 12/15] arm: setup SPI IRQ routing tables Andre Przywara
2016-07-20 17:04 ` [PATCH v7 13/15] extend GSI IRQ routing to take a device ID Andre Przywara
2016-07-20 17:04 ` [PATCH v7 14/15] arm64: enable GICv3-ITS emulation Andre Przywara
2016-07-20 17:04 ` [PATCH v7 15/15] arm: gic: allow 32-bit compilation Andre Przywara

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=20160720170435.28090-8-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).