MAINTAINERS: Make status spellings consistent
[qemu/ar7.git] / include / hw / s390x / storage-keys.h
blob2888d42d0b4a3d12e65057abd139a3f490d6a518
1 /*
2 * s390 storage key device
4 * Copyright 2015 IBM Corp.
5 * Author(s): Jason J. Herne <jjherne@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_KEYS_H
13 #define S390_STORAGE_KEYS_H
15 #include "hw/qdev-core.h"
16 #include "monitor/monitor.h"
17 #include "qom/object.h"
19 #define TYPE_S390_SKEYS "s390-skeys"
20 OBJECT_DECLARE_TYPE(S390SKeysState, S390SKeysClass, S390_SKEYS)
22 struct S390SKeysState {
23 DeviceState parent_obj;
24 bool migration_enabled;
29 struct S390SKeysClass {
30 DeviceClass parent_class;
31 int (*skeys_enabled)(S390SKeysState *ks);
32 int (*get_skeys)(S390SKeysState *ks, uint64_t start_gfn, uint64_t count,
33 uint8_t *keys);
34 int (*set_skeys)(S390SKeysState *ks, uint64_t start_gfn, uint64_t count,
35 uint8_t *keys);
38 #define TYPE_KVM_S390_SKEYS "s390-skeys-kvm"
39 #define TYPE_QEMU_S390_SKEYS "s390-skeys-qemu"
40 typedef struct QEMUS390SKeysState QEMUS390SKeysState;
41 DECLARE_INSTANCE_CHECKER(QEMUS390SKeysState, QEMU_S390_SKEYS,
42 TYPE_QEMU_S390_SKEYS)
44 struct QEMUS390SKeysState {
45 S390SKeysState parent_obj;
46 uint8_t *keydata;
47 uint32_t key_count;
50 void s390_skeys_init(void);
52 S390SKeysState *s390_get_skeys_device(void);
54 void hmp_dump_skeys(Monitor *mon, const QDict *qdict);
55 void hmp_info_skeys(Monitor *mon, const QDict *qdict);
57 #endif /* S390_STORAGE_KEYS_H */