[Qemu-devel] [PATCH] hw/s390x/ipl: The s390-ipl device is not hot-pluggable

Thomas Huth posted 1 patch 6 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1502861458-30270-1-git-send-email-thuth@redhat.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
hw/s390x/ipl.c | 2 ++
1 file changed, 2 insertions(+)
[Qemu-devel] [PATCH] hw/s390x/ipl: The s390-ipl device is not hot-pluggable
Posted by Thomas Huth 6 years, 7 months ago
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.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/s390x/ipl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index cc36003..0d06fc1 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -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 = {
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH] hw/s390x/ipl: The s390-ipl device is not hot-pluggable
Posted by Cornelia Huck 6 years, 7 months ago
On Wed, 16 Aug 2017 07:30:58 +0200
Thomas Huth <thuth@redhat.com> 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.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/s390x/ipl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> index cc36003..0d06fc1 100644
> --- a/hw/s390x/ipl.c
> +++ b/hw/s390x/ipl.c
> @@ -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.

Re: [Qemu-devel] [PATCH] hw/s390x/ipl: The s390-ipl device is not hot-pluggable
Posted by David Hildenbrand 6 years, 7 months ago
On 16.08.2017 07:30, Thomas Huth 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.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/s390x/ipl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> index cc36003..0d06fc1 100644
> --- a/hw/s390x/ipl.c
> +++ b/hw/s390x/ipl.c
> @@ -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

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David

Re: [Qemu-devel] [PATCH] hw/s390x/ipl: The s390-ipl device is not hot-pluggable
Posted by Cornelia Huck 6 years, 7 months ago
On Thu, 17 Aug 2017 11:05:35 +0200
David Hildenbrand <david@redhat.com> wrote:

> On 16.08.2017 07:30, Thomas Huth 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.
> > 
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > ---
> >  hw/s390x/ipl.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> > index cc36003..0d06fc1 100644
> > --- a/hw/s390x/ipl.c
> > +++ b/hw/s390x/ipl.c
> > @@ -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
> 
> Reviewed-by: David Hildenbrand <david@redhat.com>
> 

Not too late for me to add the tag :)

Thanks!