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
Unified · Split
| @@ -16,6 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #include <linux/hrtimer.h> |
| 17 | 17 | #include <linux/interrupt.h> |
| 18 | 18 | #include <linux/kvm_host.h> |
| 19 | +#include <linux/kvm.h> | |
| 19 | 20 | #include <asm/debug.h> |
| 20 | 21 | #include <asm/cpu.h> |
| 21 | 22 | |
| @@ -168,18 +169,6 @@ struct kvm_vcpu_stat { · 146 unmodified lines | ||
| 168 | 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 | 172 | #define PGM_OPERATION 0x01 |
| 184 | 173 | #define PGM_PRIVILEGED_OP 0x02 |
| 185 | 174 | #define PGM_EXECUTE 0x03 |
| @@ -188,27 +177,6 @@ struct kvm_s390_ext_info { · 2 unmodified lines | ||
| 188 | 177 | #define PGM_SPECIFICATION 0x06 |
| 189 | 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 | 180 | struct kvm_s390_interrupt_info { |
| 213 | 181 | struct list_head list; |
| 214 | 182 | u64 type; |
| @@ -434,6 +434,69 @@ struct kvm_s390_interrupt { · 433 unmodified lines | ||
| 434 | 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 | 500 | /* for KVM_SET_GUEST_DEBUG */ |
| 438 | 501 | |
| 439 | 502 | #define KVM_GUESTDBG_ENABLE 0x00000001 |