xref: /qemu/target/s390x/kvm/kvm_s390x.h (revision 4ab6a1feac0a142045d3b7bdbb8182a99c0b8980)
1f16bbb9bSDavid Hildenbrand /*
2f16bbb9bSDavid Hildenbrand  * QEMU KVM support -- s390x specific functions.
3f16bbb9bSDavid Hildenbrand  *
4f16bbb9bSDavid Hildenbrand  * Copyright (c) 2009 Ulrich Hecht
5f16bbb9bSDavid Hildenbrand  *
6f16bbb9bSDavid Hildenbrand  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7f16bbb9bSDavid Hildenbrand  * See the COPYING file in the top-level directory.
8f16bbb9bSDavid Hildenbrand  */
9f16bbb9bSDavid Hildenbrand 
10f16bbb9bSDavid Hildenbrand #ifndef KVM_S390X_H
11f16bbb9bSDavid Hildenbrand #define KVM_S390X_H
12f16bbb9bSDavid Hildenbrand 
13f16bbb9bSDavid Hildenbrand struct kvm_s390_irq;
14f16bbb9bSDavid Hildenbrand 
15e6505d53SDavid Hildenbrand void kvm_s390_floating_interrupt_legacy(struct kvm_s390_irq *irq);
16f16bbb9bSDavid Hildenbrand void kvm_s390_vcpu_interrupt(S390CPU *cpu, struct kvm_s390_irq *irq);
17f16bbb9bSDavid Hildenbrand void kvm_s390_access_exception(S390CPU *cpu, uint16_t code, uint64_t te_code);
18f16bbb9bSDavid Hildenbrand int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t ar, void *hostbuf,
19f16bbb9bSDavid Hildenbrand                     int len, bool is_write);
20f16bbb9bSDavid Hildenbrand void kvm_s390_program_interrupt(S390CPU *cpu, uint16_t code);
21f16bbb9bSDavid Hildenbrand int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_state);
22f16bbb9bSDavid Hildenbrand void kvm_s390_vcpu_interrupt_pre_save(S390CPU *cpu);
23f16bbb9bSDavid Hildenbrand int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu);
24f16bbb9bSDavid Hildenbrand int kvm_s390_get_ri(void);
25f16bbb9bSDavid Hildenbrand int kvm_s390_get_gs(void);
26f16bbb9bSDavid Hildenbrand int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_clock);
277edd4a49SCollin L. Walling int kvm_s390_get_clock_ext(uint8_t *tod_high, uint64_t *tod_clock);
28*4ab6a1feSDavid Hildenbrand int kvm_s390_set_clock(uint8_t tod_high, uint64_t tod_clock);
29*4ab6a1feSDavid Hildenbrand int kvm_s390_set_clock_ext(uint8_t tod_high, uint64_t tod_clock);
30f16bbb9bSDavid Hildenbrand void kvm_s390_enable_css_support(S390CPU *cpu);
31f16bbb9bSDavid Hildenbrand int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch,
32f16bbb9bSDavid Hildenbrand                                     int vq, bool assign);
33f16bbb9bSDavid Hildenbrand int kvm_s390_cmma_active(void);
34f16bbb9bSDavid Hildenbrand void kvm_s390_cmma_reset(void);
35f16bbb9bSDavid Hildenbrand void kvm_s390_reset_vcpu(S390CPU *cpu);
36f16bbb9bSDavid Hildenbrand int kvm_s390_set_mem_limit(uint64_t new_limit, uint64_t *hw_limit);
37f16bbb9bSDavid Hildenbrand void kvm_s390_crypto_reset(void);
38eabcea18SDavid Hildenbrand void kvm_s390_restart_interrupt(S390CPU *cpu);
39eabcea18SDavid Hildenbrand void kvm_s390_stop_interrupt(S390CPU *cpu);
40f16bbb9bSDavid Hildenbrand 
41f16bbb9bSDavid Hildenbrand #endif /* KVM_S390X_H */
42