qemu-s390x
[Top][All Lists]
Advanced

[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: Cornelia Huck
Subject: Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB
Date: Thu, 17 Oct 2019 16:34:02 +0200

On Thu, 17 Oct 2019 16:21:23 +0200
Thomas Huth <address@hidden> 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.
> 
>  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");

I'm wondering if this is the only machine type not supporting usb...
if not, how are others handling it?

The usb parsing code in machine.c does not care if usb is even
configured (CONFIG_USB). There's other stuff in there like
igd-passthru, which seems to be x86 specific; probably historical
reasons?

> +    }
> +
>      s390_sclp_init();
>      /* init memory + setup max page size. Required for the CPU model */
>      s390_memory_init(machine->ram_size);




reply via email to

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