[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 33/33] hw/s390x: Mark the "sclpquiesce" device with u
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 33/33] hw/s390x: Mark the "sclpquiesce" device with user_creatable = false |
Date: |
Fri, 6 Oct 2017 11:59:56 +0200 |
From: Thomas Huth <address@hidden>
The "sclpquiesce" device is just an internal device that should not be
created by the user directly. Though it currently does not seem to cause
any obvious trouble when the user instantiates an additional device, let's
better mark it with user_creatable = false to avoid unexpected behavior,
e.g. because the quiesce notifier gets registered multiple times.
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Halil Pasic <address@hidden>
Reviewed-by: Claudio Imbrenda <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/sclpquiesce.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c
index 762cb184ac..02416435a1 100644
--- a/hw/s390x/sclpquiesce.c
+++ b/hw/s390x/sclpquiesce.c
@@ -118,8 +118,13 @@ static void quiesce_class_init(ObjectClass *klass, void
*data)
dc->reset = quiesce_reset;
dc->vmsd = &vmstate_sclpquiesce;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
- k->init = quiesce_init;
+ /*
+ * Reason: This is just an internal device - the notifier should
+ * not be registered multiple times in quiesce_init()
+ */
+ dc->user_creatable = false;
+ k->init = quiesce_init;
k->get_send_mask = send_mask;
k->get_receive_mask = receive_mask;
k->can_handle_event = can_handle_event;
--
2.13.6
- [Qemu-devel] [PULL 23/33] target/s390x: get rid of next_core_id, (continued)
- [Qemu-devel] [PULL 23/33] target/s390x: get rid of next_core_id, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 24/33] s390x: introduce and use S390_MAX_CPUS, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 27/33] s390x/css: fix css migration compat handling, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 25/33] s390x/tcg: make STFL store into the lowcore, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 26/33] s390x: sort some devices into categories, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 28/33] s390/kvm: Support for get/set of extended TOD-Clock for guest, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 31/33] s390x/sclp: mark sclp-cpu-hotplug as non-usercreatable, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 29/33] s390/kvm: make TOD setting failures fatal for migration, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 30/33] s390x/sclp: Mark the sclp device with user_creatable = false, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 32/33] s390x/tcg: initialize machine check queue, Cornelia Huck, 2017/10/06
- [Qemu-devel] [PULL 33/33] hw/s390x: Mark the "sclpquiesce" device with user_creatable = false,
Cornelia Huck <=
- Re: [Qemu-devel] [PULL 00/33] next batch of s390x patches, Peter Maydell, 2017/10/06