[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB
From: |
Christian Borntraeger |
Subject: |
Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB |
Date: |
Thu, 17 Oct 2019 16:45:44 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 17.10.19 16:21, Thomas Huth wrote:
> There is no USB on s390x, so running qemu-system-s390x with
> "-machine ...,usb=on" is certainly wrong. Emit a warning to make
> the users aware of their misconfiguration.
>
> Signed-off-by: Thomas Huth <address@hidden>
> ---
> After a year or two, we could finally turn this into a hard error,
> but I think we should give the users some time to fix their command
> lines first, so I'm initially only emitting a warning here.
I think a warn message is ok, but we should never make this a hard
error.
I am pretty sure that there are some tools in the wild that create xmls
or qemu commands lines cross-platform and deploy those dynamically.
These tools have probably been fixed to work good enough with s390x
but nobody with qemu clue has ever looked at these command lines. And
I am pretty sure that no user will actually see the command like nor
the error message.
So this warning will stay unnoticed until we make this a hard error. And
then we have broken a previously working setup.
In other words, I appreciate the willingness to detect mis-uses but I
fear that we will never be able to assume that everything is fixed.
>
> hw/s390x/s390-virtio-ccw.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index d3edeef0ad..af8c4c0daf 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -243,6 +243,10 @@ static void ccw_init(MachineState *machine)
> VirtualCssBus *css_bus;
> DeviceState *dev;
>
> + if (machine->usb) {
> + warn_report("This machine does not support USB");
> + }
> +
> s390_sclp_init();
> /* init memory + setup max page size. Required for the CPU model */
> s390_memory_init(machine->ram_size);
>
- [PATCH] hw/s390x: Emit a warning if user tried to enable USB, Thomas Huth, 2019/10/17
- Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB, Cornelia Huck, 2019/10/17
- Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB, Thomas Huth, 2019/10/17
- Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB, Philippe Mathieu-Daudé, 2019/10/17
- Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB, Thomas Huth, 2019/10/18
- Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB, Philippe Mathieu-Daudé, 2019/10/18
- Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB, Cornelia Huck, 2019/10/18
Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB,
Christian Borntraeger <=