summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/s390-skeys-kvm.c4
-rw-r--r--hw/s390x/s390-skeys.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/s390x/s390-skeys-kvm.c b/hw/s390x/s390-skeys-kvm.c
index 131da56bbe..dc54ed8b11 100644
--- a/hw/s390x/s390-skeys-kvm.c
+++ b/hw/s390x/s390-skeys-kvm.c
@@ -54,10 +54,14 @@ static int kvm_s390_skeys_set(S390SKeysState *ss, uint64_t start_gfn,
static void kvm_s390_skeys_class_init(ObjectClass *oc, void *data)
{
S390SKeysClass *skeyclass = S390_SKEYS_CLASS(oc);
+ DeviceClass *dc = DEVICE_CLASS(oc);
skeyclass->skeys_enabled = kvm_s390_skeys_enabled;
skeyclass->get_skeys = kvm_s390_skeys_get;
skeyclass->set_skeys = kvm_s390_skeys_set;
+
+ /* Reason: Internal device (only one skeys device for the whole memory) */
+ dc->user_creatable = false;
}
static const TypeInfo kvm_s390_skeys_info = {
diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c
index c0de3b0c35..53ad5d38d4 100644
--- a/hw/s390x/s390-skeys.c
+++ b/hw/s390x/s390-skeys.c
@@ -229,10 +229,14 @@ static int qemu_s390_skeys_get(S390SKeysState *ss, uint64_t start_gfn,
static void qemu_s390_skeys_class_init(ObjectClass *oc, void *data)
{
S390SKeysClass *skeyclass = S390_SKEYS_CLASS(oc);
+ DeviceClass *dc = DEVICE_CLASS(oc);
skeyclass->skeys_enabled = qemu_s390_skeys_enabled;
skeyclass->get_skeys = qemu_s390_skeys_get;
skeyclass->set_skeys = qemu_s390_skeys_set;
+
+ /* Reason: Internal device (only one skeys device for the whole memory) */
+ dc->user_creatable = false;
}
static const TypeInfo qemu_s390_skeys_info = {