]> git.ipfire.org Git - thirdparty/qemu.git/blame - include/hw/s390x/s390-virtio-ccw.h
s390x: Introduce a SCLPDevice pointer under the machine
[thirdparty/qemu.git] / include / hw / s390x / s390-virtio-ccw.h
CommitLineData
8b8a61ad
JF
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"
db1015e9 15#include "qom/object.h"
b350f6c8 16#include "hw/s390x/sclp.h"
8b8a61ad
JF
17
18#define TYPE_S390_CCW_MACHINE "s390-ccw-machine"
19
a489d195 20OBJECT_DECLARE_TYPE(S390CcwMachineState, S390CcwMachineClass, S390_CCW_MACHINE)
8b8a61ad 21
8b8a61ad 22
db1015e9 23struct S390CcwMachineState {
8b8a61ad
JF
24 /*< private >*/
25 MachineState parent_obj;
26
27 /*< public >*/
28 bool aes_key_wrap;
29 bool dea_key_wrap;
c3347ed0 30 bool pv;
7104bae9 31 uint8_t loadparm[8];
b350f6c8
CLG
32
33 SCLPDevice *sclp;
db1015e9 34};
8b8a61ad 35
af37bad5
PM
36#define S390_PTF_REASON_NONE (0x00 << 8)
37#define S390_PTF_REASON_DONE (0x01 << 8)
38#define S390_PTF_REASON_BUSY (0x02 << 8)
39#define S390_TOPO_FC_MASK 0xffUL
40void s390_handle_ptf(S390CPU *cpu, uint8_t r1, uintptr_t ra);
41
db1015e9 42struct S390CcwMachineClass {
8b8a61ad
JF
43 /*< private >*/
44 MachineClass parent_class;
45
46 /*< public >*/
9700230b 47 bool ri_allowed;
e73316d5 48 bool cpu_model_allowed;
52629b3b 49 bool css_migration_enabled;
28221f9c 50 bool hpage_1m_allowed;
6393b299 51 int max_threads;
db1015e9 52};
8b8a61ad 53
9700230b
FZ
54/* runtime-instrumentation allowed by the machine */
55bool ri_allowed(void);
e73316d5
CB
56/* cpu model allowed by the machine */
57bool cpu_model_allowed(void);
28221f9c
JF
58/* 1M huge page mappings allowed by the machine */
59bool hpage_1m_allowed(void);
9700230b 60
52629b3b
HP
61/**
62 * Returns true if (vmstate based) migration of the channel subsystem
63 * is enabled, false if it is disabled.
64 */
65bool css_migration_enabled(void);
66
8b8a61ad 67#endif