]> Git Repo - qemu.git/blame - include/hw/s390x/storage-keys.h
Move QOM typedefs and add missing includes
[qemu.git] / include / hw / s390x / storage-keys.h
CommitLineData
0efe406c
JH
1/*
2 * s390 storage key device
3 *
4 * Copyright 2015 IBM Corp.
5 * Author(s): Jason J. Herne <[email protected]>
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
2a6a4076
MA
12#ifndef S390_STORAGE_KEYS_H
13#define S390_STORAGE_KEYS_H
0efe406c 14
a27bd6c7 15#include "hw/qdev-core.h"
a4538a5c 16#include "monitor/monitor.h"
db1015e9 17#include "qom/object.h"
0efe406c
JH
18
19#define TYPE_S390_SKEYS "s390-skeys"
db1015e9
EH
20typedef struct S390SKeysClass S390SKeysClass;
21typedef struct S390SKeysState S390SKeysState;
0efe406c
JH
22#define S390_SKEYS(obj) \
23 OBJECT_CHECK(S390SKeysState, (obj), TYPE_S390_SKEYS)
24
db1015e9 25struct S390SKeysState {
0efe406c 26 DeviceState parent_obj;
9ef40173 27 bool migration_enabled;
0efe406c 28
db1015e9 29};
0efe406c
JH
30
31#define S390_SKEYS_CLASS(klass) \
32 OBJECT_CLASS_CHECK(S390SKeysClass, (klass), TYPE_S390_SKEYS)
33#define S390_SKEYS_GET_CLASS(obj) \
34 OBJECT_GET_CLASS(S390SKeysClass, (obj), TYPE_S390_SKEYS)
35
db1015e9 36struct S390SKeysClass {
0efe406c
JH
37 DeviceClass parent_class;
38 int (*skeys_enabled)(S390SKeysState *ks);
39 int (*get_skeys)(S390SKeysState *ks, uint64_t start_gfn, uint64_t count,
40 uint8_t *keys);
41 int (*set_skeys)(S390SKeysState *ks, uint64_t start_gfn, uint64_t count,
42 uint8_t *keys);
db1015e9 43};
0efe406c
JH
44
45#define TYPE_KVM_S390_SKEYS "s390-skeys-kvm"
46#define TYPE_QEMU_S390_SKEYS "s390-skeys-qemu"
db1015e9 47typedef struct QEMUS390SKeysState QEMUS390SKeysState;
0efe406c
JH
48#define QEMU_S390_SKEYS(obj) \
49 OBJECT_CHECK(QEMUS390SKeysState, (obj), TYPE_QEMU_S390_SKEYS)
50
db1015e9 51struct QEMUS390SKeysState {
0efe406c
JH
52 S390SKeysState parent_obj;
53 uint8_t *keydata;
54 uint32_t key_count;
db1015e9 55};
0efe406c
JH
56
57void s390_skeys_init(void);
58
59S390SKeysState *s390_get_skeys_device(void);
60
a4538a5c 61void hmp_dump_skeys(Monitor *mon, const QDict *qdict);
a08f0081
JH
62void hmp_info_skeys(Monitor *mon, const QDict *qdict);
63
2a6a4076 64#endif /* S390_STORAGE_KEYS_H */
This page took 0.234094 seconds and 4 git commands to generate.