qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/s390x/sclp: Mark the sclp device with user_c


From: Halil Pasic
Subject: Re: [Qemu-devel] [PATCH] hw/s390x/sclp: Mark the sclp device with user_creatable = false
Date: Wed, 4 Oct 2017 16:56:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0


On 10/04/2017 03:53 PM, Thomas Huth wrote:
> The "sclp" device is just an internal device that can not be instantiated
> by the users. If they try to use it, they only get a simple error message:
> 
> $ qemu-system-s390x -nographic -device sclp
> qemu-system-s390x: Option '-device s390-sclp-event-facility' cannot be
> handled by this machine
> 
> Since sclp_init() tries to create a TYPE_SCLP_EVENT_FACILITY which is
> a non-pluggable sysbus device, there is really no way that the "sclp"
> device can be used by the user, so let's set the user_creatable = false
> accordingly.
> 
> Signed-off-by: Thomas Huth <address@hidden>
> 

While I'm not really familiar with the sclp code, I do understand the
measure (user_creatable = false), but I'm not sure I understand the
explanation. So it's:

Acked-by: Halil Pasic <address@hidden>

---
>  hw/s390x/sclp.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
> index 30aefbf..9be0cb8 100644
> --- a/hw/s390x/sclp.c
> +++ b/hw/s390x/sclp.c
> @@ -606,6 +606,11 @@ static void sclp_class_init(ObjectClass *oc, void *data)
>      dc->realize = sclp_realize;
>      dc->hotpluggable = false;
>      set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> +    /*
> +     * Reason: Creates TYPE_SCLP_EVENT_FACILITY in sclp_init
> +     * which is a non-pluggable sysbus device
> +     */
> +    dc->user_creatable = false;
> 
>      sc->read_SCP_info = read_SCP_info;
>      sc->read_storage_element0_info = read_storage_element0_info;
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]