1 /*
2  * virtio ccw machine definitions
3  *
4  * Copyright 2012, 2016 IBM Corp.
5  * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
6  *
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.
10  */
11 #ifndef HW_S390X_S390_VIRTIO_CCW_H
12 #define HW_S390X_S390_VIRTIO_CCW_H
13 
14 #include "hw/boards.h"
15 #include "qom/object.h"
16 
17 #define TYPE_S390_CCW_MACHINE               "s390-ccw-machine"
18 
19 typedef struct S390CcwMachineClass S390CcwMachineClass;
20 typedef struct S390CcwMachineState S390CcwMachineState;
21 DECLARE_OBJ_CHECKERS(S390CcwMachineState, S390CcwMachineClass,
22                      S390_CCW_MACHINE, TYPE_S390_CCW_MACHINE)
23 
24 
25 struct S390CcwMachineState {
26     /*< private >*/
27     MachineState parent_obj;
28 
29     /*< public >*/
30     bool aes_key_wrap;
31     bool dea_key_wrap;
32     bool pv;
33     uint8_t loadparm[8];
34 };
35 
36 struct S390CcwMachineClass {
37     /*< private >*/
38     MachineClass parent_class;
39 
40     /*< public >*/
41     bool ri_allowed;
42     bool cpu_model_allowed;
43     bool css_migration_enabled;
44     bool hpage_1m_allowed;
45 };
46 
47 /* runtime-instrumentation allowed by the machine */
48 bool ri_allowed(void);
49 /* cpu model allowed by the machine */
50 bool cpu_model_allowed(void);
51 /* 1M huge page mappings allowed by the machine */
52 bool hpage_1m_allowed(void);
53 
54 /**
55  * Returns true if (vmstate based) migration of the channel subsystem
56  * is enabled, false if it is disabled.
57  */
58 bool css_migration_enabled(void);
59 
60 #endif
61