aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 12:47:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 12:47:01 -0400
commit900360131066f192c82311a098d03d6ac6429e20 (patch)
treee9681537a2d1f75fa5be21d8f1116f9f0ba8a391 /arch/s390/include/asm/kvm_host.h
parent4541fec3104bef0c60633f9e180be94ea5ccc2b7 (diff)
parentca3f0874723fad81d0c701b63ae3a17a408d5f25 (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Paolo Bonzini: "First batch of KVM changes for 4.1 The most interesting bit here is irqfd/ioeventfd support for ARM and ARM64. Summary: ARM/ARM64: fixes for live migration, irqfd and ioeventfd support (enabling vhost, too), page aging s390: interrupt handling rework, allowing to inject all local interrupts via new ioctl and to get/set the full local irq state for migration and introspection. New ioctls to access memory by virtual address, and to get/set the guest storage keys. SIMD support. MIPS: FPU and MIPS SIMD Architecture (MSA) support. Includes some patches from Ralf Baechle's MIPS tree. x86: bugfixes (notably for pvclock, the others are small) and cleanups. Another small latency improvement for the TSC deadline timer" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (146 commits) KVM: use slowpath for cross page cached accesses kvm: mmu: lazy collapse small sptes into large sptes KVM: x86: Clear CR2 on VCPU reset KVM: x86: DR0-DR3 are not clear on reset KVM: x86: BSP in MSR_IA32_APICBASE is writable KVM: x86: simplify kvm_apic_map KVM: x86: avoid logical_map when it is invalid KVM: x86: fix mixed APIC mode broadcast KVM: x86: use MDA for interrupt matching kvm/ppc/mpic: drop unused IRQ_testbit KVM: nVMX: remove unnecessary double caching of MAXPHYADDR KVM: nVMX: checks for address bits beyond MAXPHYADDR on VM-entry KVM: x86: cache maxphyaddr CPUID leaf in struct kvm_vcpu KVM: vmx: pass error code with internal error #2 x86: vdso: fix pvclock races with task migration KVM: remove kvm_read_hva and kvm_read_hva_atomic KVM: x86: optimize delivery of TSC deadline timer interrupt KVM: x86: extract blocking logic from __vcpu_run kvm: x86: fix x86 eflags fixed bit KVM: s390: migrate vcpu interrupt state ...
Diffstat (limited to 'arch/s390/include/asm/kvm_host.h')
-rw-r--r--arch/s390/include/asm/kvm_host.h46
1 files changed, 41 insertions, 5 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
index f407bbf5ee94..d01fc588b5c3 100644
--- a/arch/s390/include/asm/kvm_host.h
+++ b/arch/s390/include/asm/kvm_host.h
@@ -172,7 +172,9 @@ struct kvm_s390_sie_block {
172 __u32 fac; /* 0x01a0 */ 172 __u32 fac; /* 0x01a0 */
173 __u8 reserved1a4[20]; /* 0x01a4 */ 173 __u8 reserved1a4[20]; /* 0x01a4 */
174 __u64 cbrlo; /* 0x01b8 */ 174 __u64 cbrlo; /* 0x01b8 */
175 __u8 reserved1c0[30]; /* 0x01c0 */ 175 __u8 reserved1c0[8]; /* 0x01c0 */
176 __u32 ecd; /* 0x01c8 */
177 __u8 reserved1cc[18]; /* 0x01cc */
176 __u64 pp; /* 0x01de */ 178 __u64 pp; /* 0x01de */
177 __u8 reserved1e6[2]; /* 0x01e6 */ 179 __u8 reserved1e6[2]; /* 0x01e6 */
178 __u64 itdba; /* 0x01e8 */ 180 __u64 itdba; /* 0x01e8 */
@@ -183,11 +185,17 @@ struct kvm_s390_itdb {
183 __u8 data[256]; 185 __u8 data[256];
184} __packed; 186} __packed;
185 187
188struct kvm_s390_vregs {
189 __vector128 vrs[32];
190 __u8 reserved200[512]; /* for future vector expansion */
191} __packed;
192
186struct sie_page { 193struct sie_page {
187 struct kvm_s390_sie_block sie_block; 194 struct kvm_s390_sie_block sie_block;
188 __u8 reserved200[1024]; /* 0x0200 */ 195 __u8 reserved200[1024]; /* 0x0200 */
189 struct kvm_s390_itdb itdb; /* 0x0600 */ 196 struct kvm_s390_itdb itdb; /* 0x0600 */
190 __u8 reserved700[2304]; /* 0x0700 */ 197 __u8 reserved700[1280]; /* 0x0700 */
198 struct kvm_s390_vregs vregs; /* 0x0c00 */
191} __packed; 199} __packed;
192 200
193struct kvm_vcpu_stat { 201struct kvm_vcpu_stat {
@@ -238,6 +246,7 @@ struct kvm_vcpu_stat {
238 u32 instruction_sigp_stop; 246 u32 instruction_sigp_stop;
239 u32 instruction_sigp_stop_store_status; 247 u32 instruction_sigp_stop_store_status;
240 u32 instruction_sigp_store_status; 248 u32 instruction_sigp_store_status;
249 u32 instruction_sigp_store_adtl_status;
241 u32 instruction_sigp_arch; 250 u32 instruction_sigp_arch;
242 u32 instruction_sigp_prefix; 251 u32 instruction_sigp_prefix;
243 u32 instruction_sigp_restart; 252 u32 instruction_sigp_restart;
@@ -270,6 +279,7 @@ struct kvm_vcpu_stat {
270#define PGM_SPECIAL_OPERATION 0x13 279#define PGM_SPECIAL_OPERATION 0x13
271#define PGM_OPERAND 0x15 280#define PGM_OPERAND 0x15
272#define PGM_TRACE_TABEL 0x16 281#define PGM_TRACE_TABEL 0x16
282#define PGM_VECTOR_PROCESSING 0x1b
273#define PGM_SPACE_SWITCH 0x1c 283#define PGM_SPACE_SWITCH 0x1c
274#define PGM_HFP_SQUARE_ROOT 0x1d 284#define PGM_HFP_SQUARE_ROOT 0x1d
275#define PGM_PC_TRANSLATION_SPEC 0x1f 285#define PGM_PC_TRANSLATION_SPEC 0x1f
@@ -334,6 +344,11 @@ enum irq_types {
334 IRQ_PEND_COUNT 344 IRQ_PEND_COUNT
335}; 345};
336 346
347/* We have 2M for virtio device descriptor pages. Smallest amount of
348 * memory per page is 24 bytes (1 queue), so (2048*1024) / 24 = 87381
349 */
350#define KVM_S390_MAX_VIRTIO_IRQS 87381
351
337/* 352/*
338 * Repressible (non-floating) machine check interrupts 353 * Repressible (non-floating) machine check interrupts
339 * subclass bits in MCIC 354 * subclass bits in MCIC
@@ -411,13 +426,32 @@ struct kvm_s390_local_interrupt {
411 unsigned long pending_irqs; 426 unsigned long pending_irqs;
412}; 427};
413 428
429#define FIRQ_LIST_IO_ISC_0 0
430#define FIRQ_LIST_IO_ISC_1 1
431#define FIRQ_LIST_IO_ISC_2 2
432#define FIRQ_LIST_IO_ISC_3 3
433#define FIRQ_LIST_IO_ISC_4 4
434#define FIRQ_LIST_IO_ISC_5 5
435#define FIRQ_LIST_IO_ISC_6 6
436#define FIRQ_LIST_IO_ISC_7 7
437#define FIRQ_LIST_PFAULT 8
438#define FIRQ_LIST_VIRTIO 9
439#define FIRQ_LIST_COUNT 10
440#define FIRQ_CNTR_IO 0
441#define FIRQ_CNTR_SERVICE 1
442#define FIRQ_CNTR_VIRTIO 2
443#define FIRQ_CNTR_PFAULT 3
444#define FIRQ_MAX_COUNT 4
445
414struct kvm_s390_float_interrupt { 446struct kvm_s390_float_interrupt {
447 unsigned long pending_irqs;
415 spinlock_t lock; 448 spinlock_t lock;
416 struct list_head list; 449 struct list_head lists[FIRQ_LIST_COUNT];
417 atomic_t active; 450 int counters[FIRQ_MAX_COUNT];
451 struct kvm_s390_mchk_info mchk;
452 struct kvm_s390_ext_info srv_signal;
418 int next_rr_cpu; 453 int next_rr_cpu;
419 unsigned long idle_mask[BITS_TO_LONGS(KVM_MAX_VCPUS)]; 454 unsigned long idle_mask[BITS_TO_LONGS(KVM_MAX_VCPUS)];
420 unsigned int irq_count;
421}; 455};
422 456
423struct kvm_hw_wp_info_arch { 457struct kvm_hw_wp_info_arch {
@@ -465,6 +499,7 @@ struct kvm_vcpu_arch {
465 s390_fp_regs host_fpregs; 499 s390_fp_regs host_fpregs;
466 unsigned int host_acrs[NUM_ACRS]; 500 unsigned int host_acrs[NUM_ACRS];
467 s390_fp_regs guest_fpregs; 501 s390_fp_regs guest_fpregs;
502 struct kvm_s390_vregs *host_vregs;
468 struct kvm_s390_local_interrupt local_int; 503 struct kvm_s390_local_interrupt local_int;
469 struct hrtimer ckc_timer; 504 struct hrtimer ckc_timer;
470 struct kvm_s390_pgm_info pgm; 505 struct kvm_s390_pgm_info pgm;
@@ -553,6 +588,7 @@ struct kvm_arch{
553 int use_cmma; 588 int use_cmma;
554 int user_cpu_state_ctrl; 589 int user_cpu_state_ctrl;
555 int user_sigp; 590 int user_sigp;
591 int user_stsi;
556 struct s390_io_adapter *adapters[MAX_S390_IO_ADAPTERS]; 592 struct s390_io_adapter *adapters[MAX_S390_IO_ADAPTERS];
557 wait_queue_head_t ipte_wq; 593 wait_queue_head_t ipte_wq;
558 int ipte_lock_count; 594 int ipte_lock_count;