Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / include / hw / s390x / s390-virtio-ccw.h
blobc1d46e78af8524802225fb192ffd9f6a5bc4434e
1 /*
2 * virtio ccw machine definitions
4 * Copyright 2012, 2016 IBM Corp.
5 * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
7 * This work is licensed under the terms of the GNU GPL, version 2 or (at
8 * your option) any later version. See the COPYING file in the top-level
9 * directory.
11 #ifndef HW_S390X_S390_VIRTIO_CCW_H
12 #define HW_S390X_S390_VIRTIO_CCW_H
14 #include "hw/boards.h"
15 #include "qom/object.h"
17 #define TYPE_S390_CCW_MACHINE "s390-ccw-machine"
19 OBJECT_DECLARE_TYPE(S390CcwMachineState, S390CcwMachineClass, S390_CCW_MACHINE)
22 struct S390CcwMachineState {
23 /*< private >*/
24 MachineState parent_obj;
26 /*< public >*/
27 bool aes_key_wrap;
28 bool dea_key_wrap;
29 bool pv;
30 uint8_t loadparm[8];
33 #define S390_PTF_REASON_NONE (0x00 << 8)
34 #define S390_PTF_REASON_DONE (0x01 << 8)
35 #define S390_PTF_REASON_BUSY (0x02 << 8)
36 #define S390_TOPO_FC_MASK 0xffUL
37 void s390_handle_ptf(S390CPU *cpu, uint8_t r1, uintptr_t ra);
39 struct S390CcwMachineClass {
40 /*< private >*/
41 MachineClass parent_class;
43 /*< public >*/
44 bool ri_allowed;
45 bool cpu_model_allowed;
46 bool css_migration_enabled;
47 bool hpage_1m_allowed;
48 int max_threads;
51 /* runtime-instrumentation allowed by the machine */
52 bool ri_allowed(void);
53 /* cpu model allowed by the machine */
54 bool cpu_model_allowed(void);
55 /* 1M huge page mappings allowed by the machine */
56 bool hpage_1m_allowed(void);
58 /**
59 * Returns true if (vmstate based) migration of the channel subsystem
60 * is enabled, false if it is disabled.
62 bool css_migration_enabled(void);
64 #endif