diff options
| author | Jens Freimann <jfrei@linux.vnet.ibm.com> | 2013-10-07 10:13:44 -0400 |
|---|---|---|
| committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-01-29 16:00:41 -0500 |
| commit | 81aa8efe0190cf5bf7eaafb57341cd7d0aea96cd (patch) | |
| tree | 47bf8d718e963777541893806c407e097c00ebac | |
| parent | c760f5e29d92adf5184589f1e616a4be146fb57c (diff) | |
KVM: s390: add and extend interrupt information data structs
With the currently available struct kvm_s390_interrupt it is not possible to
inject every kind of interrupt as defined in the z/Architecture. Add
additional interruption parameters to the structures and move it to kvm.h
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| -rw-r--r-- | arch/s390/include/asm/kvm_host.h | 34 | ||||
| -rw-r--r-- | include/uapi/linux/kvm.h | 63 |
2 files changed, 64 insertions, 33 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index eef3dd3fd9a9..3ffc9646e742 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/hrtimer.h> | 16 | #include <linux/hrtimer.h> |
| 17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
| 18 | #include <linux/kvm_host.h> | 18 | #include <linux/kvm_host.h> |
| 19 | #include <linux/kvm.h> | ||
| 19 | #include <asm/debug.h> | 20 | #include <asm/debug.h> |
| 20 | #include <asm/cpu.h> | 21 | #include <asm/cpu.h> |
| 21 | 22 | ||
| @@ -168,18 +169,6 @@ struct kvm_vcpu_stat { | |||
| 168 | u32 diagnose_9c; | 169 | u32 diagnose_9c; |
| 169 | }; | 170 | }; |
| 170 | 171 | ||
| 171 | struct kvm_s390_io_info { | ||
| 172 | __u16 subchannel_id; /* 0x0b8 */ | ||
| 173 | __u16 subchannel_nr; /* 0x0ba */ | ||
| 174 | __u32 io_int_parm; /* 0x0bc */ | ||
| 175 | __u32 io_int_word; /* 0x0c0 */ | ||
| 176 | }; | ||
| 177 | |||
| 178 | struct kvm_s390_ext_info { | ||
| 179 | __u32 ext_params; | ||
| 180 | __u64 ext_params2; | ||
| 181 | }; | ||
| 182 | |||
| 183 | #define PGM_OPERATION 0x01 | 172 | #define PGM_OPERATION 0x01 |
| 184 | #define PGM_PRIVILEGED_OP 0x02 | 173 | #define PGM_PRIVILEGED_OP 0x02 |
| 185 | #define PGM_EXECUTE 0x03 | 174 | #define PGM_EXECUTE 0x03 |
| @@ -188,27 +177,6 @@ struct kvm_s390_ext_info { | |||
| 188 | #define PGM_SPECIFICATION 0x06 | 177 | #define PGM_SPECIFICATION 0x06 |
| 189 | #define PGM_DATA 0x07 | 178 | #define PGM_DATA 0x07 |
| 190 | 179 | ||
| 191 | struct kvm_s390_pgm_info { | ||
| 192 | __u16 code; | ||
| 193 | }; | ||
| 194 | |||
| 195 | struct kvm_s390_prefix_info { | ||
| 196 | __u32 address; | ||
| 197 | }; | ||
| 198 | |||
| 199 | struct kvm_s390_extcall_info { | ||
| 200 | __u16 code; | ||
| 201 | }; | ||
| 202 | |||
| 203 | struct kvm_s390_emerg_info { | ||
| 204 | __u16 code; | ||
| 205 | }; | ||
| 206 | |||
| 207 | struct kvm_s390_mchk_info { | ||
| 208 | __u64 cr14; | ||
| 209 | __u64 mcic; | ||
| 210 | }; | ||
| 211 | |||
| 212 | struct kvm_s390_interrupt_info { | 180 | struct kvm_s390_interrupt_info { |
| 213 | struct list_head list; | 181 | struct list_head list; |
| 214 | u64 type; | 182 | u64 type; |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 932d7f2637d6..86faf47ae494 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -434,6 +434,69 @@ struct kvm_s390_interrupt { | |||
| 434 | __u64 parm64; | 434 | __u64 parm64; |
| 435 | }; | 435 | }; |
| 436 | 436 | ||
| 437 | struct kvm_s390_io_info { | ||
| 438 | __u16 subchannel_id; | ||
| 439 | __u16 subchannel_nr; | ||
| 440 | __u32 io_int_parm; | ||
| 441 | __u32 io_int_word; | ||
| 442 | }; | ||
| 443 | |||
| 444 | struct kvm_s390_ext_info { | ||
| 445 | __u32 ext_params; | ||
| 446 | __u32 pad; | ||
| 447 | __u64 ext_params2; | ||
| 448 | }; | ||
| 449 | |||
| 450 | struct kvm_s390_pgm_info { | ||
| 451 | __u64 trans_exc_code; | ||
| 452 | __u64 mon_code; | ||
| 453 | __u64 per_address; | ||
| 454 | __u32 data_exc_code; | ||
| 455 | __u16 code; | ||
| 456 | __u16 mon_class_nr; | ||
| 457 | __u8 per_code; | ||
| 458 | __u8 per_atmid; | ||
| 459 | __u8 exc_access_id; | ||
| 460 | __u8 per_access_id; | ||
| 461 | __u8 op_access_id; | ||
| 462 | __u8 pad[3]; | ||
| 463 | }; | ||
| 464 | |||
| 465 | struct kvm_s390_prefix_info { | ||
| 466 | __u32 address; | ||
| 467 | }; | ||
| 468 | |||
| 469 | struct kvm_s390_extcall_info { | ||
| 470 | __u16 code; | ||
| 471 | }; | ||
| 472 | |||
| 473 | struct kvm_s390_emerg_info { | ||
| 474 | __u16 code; | ||
| 475 | }; | ||
| 476 | |||
| 477 | struct kvm_s390_mchk_info { | ||
| 478 | __u64 cr14; | ||
| 479 | __u64 mcic; | ||
| 480 | __u64 failing_storage_address; | ||
| 481 | __u32 ext_damage_code; | ||
| 482 | __u32 pad; | ||
| 483 | __u8 fixed_logout[16]; | ||
| 484 | }; | ||
| 485 | |||
| 486 | struct kvm_s390_irq { | ||
| 487 | __u64 type; | ||
| 488 | union { | ||
| 489 | struct kvm_s390_io_info io; | ||
| 490 | struct kvm_s390_ext_info ext; | ||
| 491 | struct kvm_s390_pgm_info pgm; | ||
| 492 | struct kvm_s390_emerg_info emerg; | ||
| 493 | struct kvm_s390_extcall_info extcall; | ||
| 494 | struct kvm_s390_prefix_info prefix; | ||
| 495 | struct kvm_s390_mchk_info mchk; | ||
| 496 | char reserved[64]; | ||
| 497 | } u; | ||
| 498 | }; | ||
| 499 | |||
| 437 | /* for KVM_SET_GUEST_DEBUG */ | 500 | /* for KVM_SET_GUEST_DEBUG */ |
| 438 | 501 | ||
| 439 | #define KVM_GUESTDBG_ENABLE 0x00000001 | 502 | #define KVM_GUESTDBG_ENABLE 0x00000001 |
