Skip to contentSkip to conversation

hw/s390x/ipl: The s390-ipl device is not hot-pluggable

PATCH Applied Thomas Huth 3 participants 4 messages Aug 16, 2017 – Aug 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/s390x/ipl: The s390-ipl device is not hot-pluggable

The s390-ipl device can not be created by the user, since it is meant only to be instantiated once internally to load the ROMs and kernel. If the user tries to do a "device_add s390-ipl" via the monitor later, QEMU aborts with a "ROM images must be loaded at startup" error message.

---
 hw/s390x/ipl.c | 2 ++
 1 file changed, 2 insertions(+)
hw/s390x/ipl.c +2 -0
index cc36003..0d06fc1 100644
@@ -442,6 +442,8 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
     dc->reset = s390_ipl_reset;
     dc->vmsd = &vmstate_ipl;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    /* Reason: Loads the ROMs and thus can only be used one time - internally */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo s390_ipl_info = {
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 15 lines · On Wed, 16 Aug 2017 07:30:58 +0200 Thomas Huth <[email protected]> wrote:

The s390-ipl device can not be created by the user, since it is meant only to be instantiated once internally to load the ROMs and kernel. If the user tries to do a "device_add s390-ipl" via the monitor later, QEMU aborts with a "ROM images must be loaded at startup" error message.

---
 hw/s390x/ipl.c | 2 ++
 1 file changed, 2 insertions(+)
hw/s390x/ipl.c +0 -0
index cc36003..0d06fc1 100644

hw/s390x/ipl.c static void s390_ipl_class_init(ObjectClass *klass, void *data) · line 449

Quoted 8 lines
hw/s390x/ipl.c +2 -0
@@ -442,6 +442,8 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
     dc->reset = s390_ipl_reset;
     dc->vmsd = &vmstate_ipl;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    /* Reason: Loads the ROMs and thus can only be used one time - internally */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo s390_ipl_info = {

Thanks, applied.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 16 lines · Thomas Huth

The s390-ipl device can not be created by the user, since it is meant only to be instantiated once internally to load the ROMs and kernel. If the user tries to do a "device_add s390-ipl" via the monitor later, QEMU aborts with a "ROM images must be loaded at startup" error message.

---
 hw/s390x/ipl.c | 2 ++
 1 file changed, 2 insertions(+)
hw/s390x/ipl.c +0 -0
index cc36003..0d06fc1 100644

hw/s390x/ipl.c static void s390_ipl_class_init(ObjectClass *klass, void *data) · line 449

Quoted 8 lines
hw/s390x/ipl.c +2 -0
@@ -442,6 +442,8 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
     dc->reset = s390_ipl_reset;
     dc->vmsd = &vmstate_ipl;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    /* Reason: Loads the ROMs and thus can only be used one time - internally */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo s390_ipl_info = {

Late but still

Signature · 3 lines
Thanks,

David
#3 lore raw
Quoted 23 lines · On Thu, 17 Aug 2017 11:05:35 +0200 David Hildenbrand <[email protected]> wrote:
Quoted 22 lines · Thomas Huth

The s390-ipl device can not be created by the user, since it is meant only to be instantiated once internally to load the ROMs and kernel. If the user tries to do a "device_add s390-ipl" via the monitor later, QEMU aborts with a "ROM images must be loaded at startup" error message.

---
 hw/s390x/ipl.c | 2 ++
 1 file changed, 2 insertions(+)
hw/s390x/ipl.c +2 -0
index cc36003..0d06fc1 100644
@@ -442,6 +442,8 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
     dc->reset = s390_ipl_reset;
     dc->vmsd = &vmstate_ipl;
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    /* Reason: Loads the ROMs and thus can only be used one time - internally */
+    dc->user_creatable = false;
 }
 
Quoted 7 lines

hw/s390x/ipl.c static void s390_ipl_class_init(ObjectClass *klass, void *data) · line 449

Quoted 2 lines
hw/s390x/ipl.c +0 -0
 static const TypeInfo s390_ipl_info = {

Late but still

Not too late for me to add the tag :)

Thanks!