aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-22 16:52:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-22 16:52:44 -0400
commitb372115311942202346d93849991f07382783ef1 (patch)
tree14d52554acb0cdba1774be95d3877c47fda8bbff /include
parent5bed49adfe899667887db0739830190309c9011b (diff)
parent0027ff2a75f9dcf0537ac0a65c5840b0e21a4950 (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull second set of KVM updates from Paolo Bonzini: "ARM: - Support for Group0 interrupts in guests - Cache management optimizations for ARMv8.4 systems - Userspace interface for RAS - Fault path optimization - Emulated physical timer fixes - Random cleanups x86: - fixes for L1TF - a new test case - non-support for SGX (inject the right exception in the guest) - fix lockdep false positive" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (49 commits) KVM: VMX: fixes for vmentry_l1d_flush module parameter kvm: selftest: add dirty logging test kvm: selftest: pass in extra memory when create vm kvm: selftest: include the tools headers kvm: selftest: unify the guest port macros tools: introduce test_and_clear_bit KVM: x86: SVM: Call x86_spec_ctrl_set_guest/host() with interrupts disabled KVM: vmx: Inject #UD for SGX ENCLS instruction in guest KVM: vmx: Add defines for SGX ENCLS exiting x86/kvm/vmx: Fix coding style in vmx_setup_l1d_flush() x86: kvm: avoid unused variable warning KVM: Documentation: rename the capability of KVM_CAP_ARM_SET_SERROR_ESR KVM: arm/arm64: Skip updating PTE entry if no change KVM: arm/arm64: Skip updating PMD entry if no change KVM: arm: Use true and false for boolean values KVM: arm/arm64: vgic: Do not use spin_lock_irqsave/restore with irq disabled KVM: arm/arm64: vgic: Move DEBUG_SPINLOCK_BUG_ON to vgic.h KVM: arm: vgic-v3: Add support for ICC_SGI0R and ICC_ASGI1R accesses KVM: arm64: vgic-v3: Add support for ICC_SGI0R_EL1 and ICC_ASGI1R_EL1 accesses KVM: arm/arm64: vgic-v3: Add core support for Group0 SGIs ...
Diffstat (limited to 'include')
-rw-r--r--include/kvm/arm_vgic.h9
-rw-r--r--include/linux/irqchip/arm-gic-v3.h10
-rw-r--r--include/linux/irqchip/arm-gic.h11
-rw-r--r--include/uapi/linux/kvm.h1
4 files changed, 30 insertions, 1 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index cfdd2484cc42..4f31f96bbfab 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -133,6 +133,7 @@ struct vgic_irq {
133 u8 source; /* GICv2 SGIs only */ 133 u8 source; /* GICv2 SGIs only */
134 u8 active_source; /* GICv2 SGIs only */ 134 u8 active_source; /* GICv2 SGIs only */
135 u8 priority; 135 u8 priority;
136 u8 group; /* 0 == group 0, 1 == group 1 */
136 enum vgic_irq_config config; /* Level or edge */ 137 enum vgic_irq_config config; /* Level or edge */
137 138
138 /* 139 /*
@@ -217,6 +218,12 @@ struct vgic_dist {
217 /* vGIC model the kernel emulates for the guest (GICv2 or GICv3) */ 218 /* vGIC model the kernel emulates for the guest (GICv2 or GICv3) */
218 u32 vgic_model; 219 u32 vgic_model;
219 220
221 /* Implementation revision as reported in the GICD_IIDR */
222 u32 implementation_rev;
223
224 /* Userspace can write to GICv2 IGROUPR */
225 bool v2_groups_user_writable;
226
220 /* Do injected MSIs require an additional device ID? */ 227 /* Do injected MSIs require an additional device ID? */
221 bool msis_require_devid; 228 bool msis_require_devid;
222 229
@@ -366,7 +373,7 @@ void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu);
366void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu); 373void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu);
367void kvm_vgic_reset_mapped_irq(struct kvm_vcpu *vcpu, u32 vintid); 374void kvm_vgic_reset_mapped_irq(struct kvm_vcpu *vcpu, u32 vintid);
368 375
369void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg); 376void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg, bool allow_group1);
370 377
371/** 378/**
372 * kvm_vgic_get_max_vcpus - Get the maximum number of VCPUs allowed by HW 379 * kvm_vgic_get_max_vcpus - Get the maximum number of VCPUs allowed by HW
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 9d2ea3e907d0..8bdbb5f29494 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -61,6 +61,16 @@
61#define GICD_CTLR_ENABLE_G1A (1U << 1) 61#define GICD_CTLR_ENABLE_G1A (1U << 1)
62#define GICD_CTLR_ENABLE_G1 (1U << 0) 62#define GICD_CTLR_ENABLE_G1 (1U << 0)
63 63
64#define GICD_IIDR_IMPLEMENTER_SHIFT 0
65#define GICD_IIDR_IMPLEMENTER_MASK (0xfff << GICD_IIDR_IMPLEMENTER_SHIFT)
66#define GICD_IIDR_REVISION_SHIFT 12
67#define GICD_IIDR_REVISION_MASK (0xf << GICD_IIDR_REVISION_SHIFT)
68#define GICD_IIDR_VARIANT_SHIFT 16
69#define GICD_IIDR_VARIANT_MASK (0xf << GICD_IIDR_VARIANT_SHIFT)
70#define GICD_IIDR_PRODUCT_ID_SHIFT 24
71#define GICD_IIDR_PRODUCT_ID_MASK (0xff << GICD_IIDR_PRODUCT_ID_SHIFT)
72
73
64/* 74/*
65 * In systems with a single security state (what we emulate in KVM) 75 * In systems with a single security state (what we emulate in KVM)
66 * the meaning of the interrupt group enable bits is slightly different 76 * the meaning of the interrupt group enable bits is slightly different
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
index 68d8b1f73682..6c4aaf04046c 100644
--- a/include/linux/irqchip/arm-gic.h
+++ b/include/linux/irqchip/arm-gic.h
@@ -71,6 +71,16 @@
71 (GICD_INT_DEF_PRI << 8) |\ 71 (GICD_INT_DEF_PRI << 8) |\
72 GICD_INT_DEF_PRI) 72 GICD_INT_DEF_PRI)
73 73
74#define GICD_IIDR_IMPLEMENTER_SHIFT 0
75#define GICD_IIDR_IMPLEMENTER_MASK (0xfff << GICD_IIDR_IMPLEMENTER_SHIFT)
76#define GICD_IIDR_REVISION_SHIFT 12
77#define GICD_IIDR_REVISION_MASK (0xf << GICD_IIDR_REVISION_SHIFT)
78#define GICD_IIDR_VARIANT_SHIFT 16
79#define GICD_IIDR_VARIANT_MASK (0xf << GICD_IIDR_VARIANT_SHIFT)
80#define GICD_IIDR_PRODUCT_ID_SHIFT 24
81#define GICD_IIDR_PRODUCT_ID_MASK (0xff << GICD_IIDR_PRODUCT_ID_SHIFT)
82
83
74#define GICH_HCR 0x0 84#define GICH_HCR 0x0
75#define GICH_VTR 0x4 85#define GICH_VTR 0x4
76#define GICH_VMCR 0x8 86#define GICH_VMCR 0x8
@@ -94,6 +104,7 @@
94#define GICH_LR_PENDING_BIT (1 << 28) 104#define GICH_LR_PENDING_BIT (1 << 28)
95#define GICH_LR_ACTIVE_BIT (1 << 29) 105#define GICH_LR_ACTIVE_BIT (1 << 29)
96#define GICH_LR_EOI (1 << 19) 106#define GICH_LR_EOI (1 << 19)
107#define GICH_LR_GROUP1 (1 << 30)
97#define GICH_LR_HW (1 << 31) 108#define GICH_LR_HW (1 << 31)
98 109
99#define GICH_VMCR_ENABLE_GRP0_SHIFT 0 110#define GICH_VMCR_ENABLE_GRP0_SHIFT 0
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 3cf632839337..07548de5c988 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -951,6 +951,7 @@ struct kvm_ppc_resize_hpt {
951#define KVM_CAP_HYPERV_TLBFLUSH 155 951#define KVM_CAP_HYPERV_TLBFLUSH 155
952#define KVM_CAP_S390_HPAGE_1M 156 952#define KVM_CAP_S390_HPAGE_1M 156
953#define KVM_CAP_NESTED_STATE 157 953#define KVM_CAP_NESTED_STATE 157
954#define KVM_CAP_ARM_INJECT_SERROR_ESR 158
954 955
955#ifdef KVM_CAP_IRQ_ROUTING 956#ifdef KVM_CAP_IRQ_ROUTING
956 957