aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/s390-stattrib-kvm.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-08-24 14:00:29 +0200
committerCornelia Huck <cohuck@redhat.com>2017-08-30 18:23:26 +0200
commit3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce (patch)
tree094f6b5b54a8d111ae281683a1fc2f53cec680bb /hw/s390x/s390-stattrib-kvm.c
parentc862bddbcb9fc5993a26365d3f2adcc7fba9fbe4 (diff)
downloadqemu-3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce.zip
qemu-3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce.tar.gz
qemu-3ea6d20e0baacb4a1211ed0ea57db14e2fc927ce.tar.bz2
s390x/s390-stattrib: Mark the storage attribute as not user_creatable
The storage attribute devices are only meant to be instantiated one time, internally. They can not be used by the user, so mark them with user_creatable = false. Suggested-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1503576029-24264-1-git-send-email-thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/s390-stattrib-kvm.c')
-rw-r--r--hw/s390x/s390-stattrib-kvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c
index ed95d13..41770a7 100644
--- a/hw/s390x/s390-stattrib-kvm.c
+++ b/hw/s390x/s390-stattrib-kvm.c
@@ -164,6 +164,7 @@ static int kvm_s390_stattrib_get_active(S390StAttribState *sa)
static void kvm_s390_stattrib_class_init(ObjectClass *oc, void *data)
{
S390StAttribClass *sac = S390_STATTRIB_CLASS(oc);
+ DeviceClass *dc = DEVICE_CLASS(oc);
sac->get_stattr = kvm_s390_stattrib_get_stattr;
sac->peek_stattr = kvm_s390_stattrib_peek_stattr;
@@ -172,6 +173,9 @@ static void kvm_s390_stattrib_class_init(ObjectClass *oc, void *data)
sac->get_dirtycount = kvm_s390_stattrib_get_dirtycount;
sac->synchronize = kvm_s390_stattrib_synchronize;
sac->get_active = kvm_s390_stattrib_get_active;
+
+ /* Reason: Can only be instantiated one time (internally) */
+ dc->user_creatable = false;
}
static const TypeInfo kvm_s390_stattrib_info = {