hw/arm/xlnx-zynqmp: Remove obsolete 'has_rpu' property
[qemu/ar7.git] / include / hw / s390x / storage-attributes.h
blob5239eb538c1b087797867a247abfc14551af6a4d
1 /*
2 * s390 storage attributes device
4 * Copyright 2016 IBM Corp.
5 * Author(s): Claudio Imbrenda <imbrenda@linux.vnet.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.
12 #ifndef S390_STORAGE_ATTRIBUTES_H
13 #define S390_STORAGE_ATTRIBUTES_H
15 #include "hw/qdev-core.h"
16 #include "monitor/monitor.h"
17 #include "qom/object.h"
19 #define TYPE_S390_STATTRIB "s390-storage_attributes"
20 #define TYPE_QEMU_S390_STATTRIB "s390-storage_attributes-qemu"
21 #define TYPE_KVM_S390_STATTRIB "s390-storage_attributes-kvm"
23 OBJECT_DECLARE_TYPE(S390StAttribState, S390StAttribClass, S390_STATTRIB)
25 struct S390StAttribState {
26 DeviceState parent_obj;
27 uint64_t migration_cur_gfn;
28 bool migration_enabled;
32 struct S390StAttribClass {
33 DeviceClass parent_class;
34 /* Return value: < 0 on error, or new count */
35 int (*get_stattr)(S390StAttribState *sa, uint64_t *start_gfn,
36 uint32_t count, uint8_t *values);
37 int (*peek_stattr)(S390StAttribState *sa, uint64_t start_gfn,
38 uint32_t count, uint8_t *values);
39 int (*set_stattr)(S390StAttribState *sa, uint64_t start_gfn,
40 uint32_t count, uint8_t *values);
41 void (*synchronize)(S390StAttribState *sa);
42 int (*set_migrationmode)(S390StAttribState *sa, bool value);
43 int (*get_active)(S390StAttribState *sa);
44 long long (*get_dirtycount)(S390StAttribState *sa);
47 typedef struct QEMUS390StAttribState QEMUS390StAttribState;
48 DECLARE_INSTANCE_CHECKER(QEMUS390StAttribState, QEMU_S390_STATTRIB,
49 TYPE_QEMU_S390_STATTRIB)
51 struct QEMUS390StAttribState {
52 S390StAttribState parent_obj;
55 typedef struct KVMS390StAttribState KVMS390StAttribState;
56 DECLARE_INSTANCE_CHECKER(KVMS390StAttribState, KVM_S390_STATTRIB,
57 TYPE_KVM_S390_STATTRIB)
59 struct KVMS390StAttribState {
60 S390StAttribState parent_obj;
61 uint64_t still_dirty;
62 uint8_t *incoming_buffer;
65 void s390_stattrib_init(void);
67 #ifdef CONFIG_KVM
68 Object *kvm_s390_stattrib_create(void);
69 #else
70 static inline Object *kvm_s390_stattrib_create(void)
72 return NULL;
74 #endif
76 void hmp_info_cmma(Monitor *mon, const QDict *qdict);
77 void hmp_migrationmode(Monitor *mon, const QDict *qdict);
79 #endif /* S390_STORAGE_ATTRIBUTES_H */