* [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable
@ 2017-08-24 12:00 Thomas Huth
2017-08-24 12:17 ` Claudio Imbrenda
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2017-08-24 12:00 UTC (permalink / raw)
To: qemu-devel, Cornelia Huck, Christian Borntraeger
Cc: David Hildenbrand, Claudio Imbrenda, Halil Pasic, Jason J Herne,
Pierre Morel
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>
---
hw/s390x/s390-stattrib-kvm.c | 4 ++++
hw/s390x/s390-stattrib.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c
index ff3f89f..bc0274d 100644
--- a/hw/s390x/s390-stattrib-kvm.c
+++ b/hw/s390x/s390-stattrib-kvm.c
@@ -163,6 +163,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;
@@ -171,6 +172,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 = {
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
index d14923f..f75548e 100644
--- a/hw/s390x/s390-stattrib.c
+++ b/hw/s390x/s390-stattrib.c
@@ -306,6 +306,7 @@ static int qemu_s390_get_active(S390StAttribState *sa)
static void qemu_s390_stattrib_class_init(ObjectClass *oc, void *data)
{
S390StAttribClass *sa_cl = S390_STATTRIB_CLASS(oc);
+ DeviceClass *dc = DEVICE_CLASS(oc);
sa_cl->synchronize = qemu_s390_synchronize_stub;
sa_cl->get_stattr = qemu_s390_get_stattr_stub;
@@ -314,6 +315,9 @@ static void qemu_s390_stattrib_class_init(ObjectClass *oc, void *data)
sa_cl->set_migrationmode = qemu_s390_set_migrationmode_stub;
sa_cl->get_dirtycount = qemu_s390_get_dirtycount_stub;
sa_cl->get_active = qemu_s390_get_active;
+
+ /* Reason: Can only be instantiated one time (internally) */
+ dc->user_creatable = false;
}
static const TypeInfo qemu_s390_stattrib_info = {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable
2017-08-24 12:00 [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable Thomas Huth
@ 2017-08-24 12:17 ` Claudio Imbrenda
2017-08-24 12:20 ` Halil Pasic
2017-08-24 13:01 ` Cornelia Huck
2 siblings, 0 replies; 4+ messages in thread
From: Claudio Imbrenda @ 2017-08-24 12:17 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, Cornelia Huck, Christian Borntraeger,
David Hildenbrand, Halil Pasic, Jason J Herne, Pierre Morel
On Thu, 24 Aug 2017 14:00:29 +0200
Thomas Huth <thuth@redhat.com> wrote:
> 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>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
> ---
> hw/s390x/s390-stattrib-kvm.c | 4 ++++
> hw/s390x/s390-stattrib.c | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/hw/s390x/s390-stattrib-kvm.c
> b/hw/s390x/s390-stattrib-kvm.c index ff3f89f..bc0274d 100644
> --- a/hw/s390x/s390-stattrib-kvm.c
> +++ b/hw/s390x/s390-stattrib-kvm.c
> @@ -163,6 +163,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;
> @@ -171,6 +172,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 = {
> diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
> index d14923f..f75548e 100644
> --- a/hw/s390x/s390-stattrib.c
> +++ b/hw/s390x/s390-stattrib.c
> @@ -306,6 +306,7 @@ static int qemu_s390_get_active(S390StAttribState
> *sa) static void qemu_s390_stattrib_class_init(ObjectClass *oc, void
> *data) {
> S390StAttribClass *sa_cl = S390_STATTRIB_CLASS(oc);
> + DeviceClass *dc = DEVICE_CLASS(oc);
>
> sa_cl->synchronize = qemu_s390_synchronize_stub;
> sa_cl->get_stattr = qemu_s390_get_stattr_stub;
> @@ -314,6 +315,9 @@ static void
> qemu_s390_stattrib_class_init(ObjectClass *oc, void *data)
> sa_cl->set_migrationmode = qemu_s390_set_migrationmode_stub;
> sa_cl->get_dirtycount = qemu_s390_get_dirtycount_stub;
> sa_cl->get_active = qemu_s390_get_active; +
> + /* Reason: Can only be instantiated one time (internally) */
> + dc->user_creatable = false;
> }
>
> static const TypeInfo qemu_s390_stattrib_info = {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable
2017-08-24 12:00 [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable Thomas Huth
2017-08-24 12:17 ` Claudio Imbrenda
@ 2017-08-24 12:20 ` Halil Pasic
2017-08-24 13:01 ` Cornelia Huck
2 siblings, 0 replies; 4+ messages in thread
From: Halil Pasic @ 2017-08-24 12:20 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Cornelia Huck, Christian Borntraeger
Cc: Claudio Imbrenda, Pierre Morel, Jason J Herne, David Hildenbrand
On 08/24/2017 02:00 PM, Thomas Huth wrote:
> 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>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable
2017-08-24 12:00 [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable Thomas Huth
2017-08-24 12:17 ` Claudio Imbrenda
2017-08-24 12:20 ` Halil Pasic
@ 2017-08-24 13:01 ` Cornelia Huck
2 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-08-24 13:01 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, Christian Borntraeger, David Hildenbrand,
Claudio Imbrenda, Halil Pasic, Jason J Herne, Pierre Morel
On Thu, 24 Aug 2017 14:00:29 +0200
Thomas Huth <thuth@redhat.com> wrote:
> 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>
> ---
> hw/s390x/s390-stattrib-kvm.c | 4 ++++
> hw/s390x/s390-stattrib.c | 4 ++++
> 2 files changed, 8 insertions(+)
Thanks, applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-24 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 12:00 [Qemu-devel] [PATCH for-2.11] s390x/s390-stattrib: Mark the storage attribute as not user_creatable Thomas Huth
2017-08-24 12:17 ` Claudio Imbrenda
2017-08-24 12:20 ` Halil Pasic
2017-08-24 13:01 ` Cornelia Huck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).