aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 16:41:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-27 16:41:54 -0400
commite28e909c36bb5d6319953822d84df00fce7cbd18 (patch)
treea4aca971908a7a604c6fdd9a95360728f9f721b3 /include/linux
parentdc03c0f9d12d85286d5e3623aa96d5c2a271b8e6 (diff)
parentfabc712866435660f7fa1070e1fabe29eba5bc4c (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull second batch of KVM updates from Radim Krčmář: "General: - move kvm_stat tool from QEMU repo into tools/kvm/kvm_stat (kvm_stat had nothing to do with QEMU in the first place -- the tool only interprets debugfs) - expose per-vm statistics in debugfs and support them in kvm_stat (KVM always collected per-vm statistics, but they were summarised into global statistics) x86: - fix dynamic APICv (VMX was improperly configured and a guest could access host's APIC MSRs, CVE-2016-4440) - minor fixes ARM changes from Christoffer Dall: - new vgic reimplementation of our horribly broken legacy vgic implementation. The two implementations will live side-by-side (with the new being the configured default) for one kernel release and then we'll remove the legacy one. - fix for a non-critical issue with virtual abort injection to guests" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (70 commits) tools: kvm_stat: Add comments tools: kvm_stat: Introduce pid monitoring KVM: Create debugfs dir and stat files for each VM MAINTAINERS: Add kvm tools tools: kvm_stat: Powerpc related fixes tools: Add kvm_stat man page tools: Add kvm_stat vm monitor script kvm:vmx: more complete state update on APICv on/off KVM: SVM: Add more SVM_EXIT_REASONS KVM: Unify traced vector format svm: bitwise vs logical op typo KVM: arm/arm64: vgic-new: Synchronize changes to active state KVM: arm/arm64: vgic-new: enable build KVM: arm/arm64: vgic-new: implement mapped IRQ handling KVM: arm/arm64: vgic-new: Wire up irqfd injection KVM: arm/arm64: vgic-new: Add vgic_v2/v3_enable KVM: arm/arm64: vgic-new: vgic_init: implement map_resources KVM: arm/arm64: vgic-new: vgic_init: implement vgic_init KVM: arm/arm64: vgic-new: vgic_init: implement vgic_create KVM: arm/arm64: vgic-new: vgic_init: implement kvm_vgic_hyp_init ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/irqchip/arm-gic-v3.h6
-rw-r--r--include/linux/irqchip/arm-gic.h2
-rw-r--r--include/linux/kvm_host.h7
3 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 9e6fdd33bdb2..bfbd707de390 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -273,6 +273,12 @@
273#define ICH_LR_ACTIVE_BIT (1ULL << 63) 273#define ICH_LR_ACTIVE_BIT (1ULL << 63)
274#define ICH_LR_PHYS_ID_SHIFT 32 274#define ICH_LR_PHYS_ID_SHIFT 32
275#define ICH_LR_PHYS_ID_MASK (0x3ffULL << ICH_LR_PHYS_ID_SHIFT) 275#define ICH_LR_PHYS_ID_MASK (0x3ffULL << ICH_LR_PHYS_ID_SHIFT)
276#define ICH_LR_PRIORITY_SHIFT 48
277
278/* These are for GICv2 emulation only */
279#define GICH_LR_VIRTUALID (0x3ffUL << 0)
280#define GICH_LR_PHYSID_CPUID_SHIFT (10)
281#define GICH_LR_PHYSID_CPUID (7UL << GICH_LR_PHYSID_CPUID_SHIFT)
276 282
277#define ICH_MISR_EOI (1 << 0) 283#define ICH_MISR_EOI (1 << 0)
278#define ICH_MISR_U (1 << 1) 284#define ICH_MISR_U (1 << 1)
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
index 9c940263ca23..fd051855539b 100644
--- a/include/linux/irqchip/arm-gic.h
+++ b/include/linux/irqchip/arm-gic.h
@@ -33,6 +33,7 @@
33 33
34#define GIC_DIST_CTRL 0x000 34#define GIC_DIST_CTRL 0x000
35#define GIC_DIST_CTR 0x004 35#define GIC_DIST_CTR 0x004
36#define GIC_DIST_IIDR 0x008
36#define GIC_DIST_IGROUP 0x080 37#define GIC_DIST_IGROUP 0x080
37#define GIC_DIST_ENABLE_SET 0x100 38#define GIC_DIST_ENABLE_SET 0x100
38#define GIC_DIST_ENABLE_CLEAR 0x180 39#define GIC_DIST_ENABLE_CLEAR 0x180
@@ -76,6 +77,7 @@
76#define GICH_LR_VIRTUALID (0x3ff << 0) 77#define GICH_LR_VIRTUALID (0x3ff << 0)
77#define GICH_LR_PHYSID_CPUID_SHIFT (10) 78#define GICH_LR_PHYSID_CPUID_SHIFT (10)
78#define GICH_LR_PHYSID_CPUID (0x3ff << GICH_LR_PHYSID_CPUID_SHIFT) 79#define GICH_LR_PHYSID_CPUID (0x3ff << GICH_LR_PHYSID_CPUID_SHIFT)
80#define GICH_LR_PRIORITY_SHIFT 23
79#define GICH_LR_STATE (3 << 28) 81#define GICH_LR_STATE (3 << 28)
80#define GICH_LR_PENDING_BIT (1 << 28) 82#define GICH_LR_PENDING_BIT (1 << 28)
81#define GICH_LR_ACTIVE_BIT (1 << 29) 83#define GICH_LR_ACTIVE_BIT (1 << 29)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index b1fa8f11c95b..1c9c973a7dd9 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -412,6 +412,8 @@ struct kvm {
412#endif 412#endif
413 long tlbs_dirty; 413 long tlbs_dirty;
414 struct list_head devices; 414 struct list_head devices;
415 struct dentry *debugfs_dentry;
416 struct kvm_stat_data **debugfs_stat_data;
415}; 417};
416 418
417#define kvm_err(fmt, ...) \ 419#define kvm_err(fmt, ...) \
@@ -991,6 +993,11 @@ enum kvm_stat_kind {
991 KVM_STAT_VCPU, 993 KVM_STAT_VCPU,
992}; 994};
993 995
996struct kvm_stat_data {
997 int offset;
998 struct kvm *kvm;
999};
1000
994struct kvm_stats_debugfs_item { 1001struct kvm_stats_debugfs_item {
995 const char *name; 1002 const char *name;
996 int offset; 1003 int offset;