All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Thomas Huth <thuth@redhat.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/s390x: Emit a warning if user tried to enable USB
Date: Fri, 18 Oct 2019 07:20:52 +0200	[thread overview]
Message-ID: <87eezaljd7.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20191017172954.4e9712de.cohuck@redhat.com> (Cornelia Huck's message of "Thu, 17 Oct 2019 17:29:54 +0200")

Cornelia Huck <cohuck@redhat.com> writes:

> On Thu, 17 Oct 2019 16:40:56 +0200
> Thomas Huth <thuth@redhat.com> wrote:
>
>> On 17/10/2019 16.34, Cornelia Huck wrote:
>> > On Thu, 17 Oct 2019 16:21:23 +0200
>> > Thomas Huth <thuth@redhat.com> 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 <thuth@redhat.com>
>> >> ---
>> >>  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?  
>> 
>> I think most machines are silently ignoring it, like we did on s390x
>> until now, too.
>
> I'm wondering how many options we have that do nothing when configured
> :)

Plenty.

-machine usb=on (and its sugared form -usb) are just one of many options
that deposit configuration for the board to pick up.  Some boards do,
some don't.  Some boards pick up and reject some configuration they
can't use.  Some don't.  It's a big family of hack jobs.

For -drive (and its sugared forms), we have generic code to turn "not
picked up" into an error: drive_check_orphaned().
a66c9dc734 "blockdev: Orphaned drive search", 2014-10-03
720b8dc052 "blockdev: Make orphaned -drive fatal", 2017-02-21

[...]


  reply	other threads:[~2019-10-18  5:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 14:21 [PATCH] hw/s390x: Emit a warning if user tried to enable USB Thomas Huth
2019-10-17 14:34 ` Cornelia Huck
2019-10-17 14:40   ` Thomas Huth
2019-10-17 15:29     ` Cornelia Huck
2019-10-18  5:20       ` Markus Armbruster [this message]
2019-10-17 18:18     ` Philippe Mathieu-Daudé
2019-10-18  6:35       ` Thomas Huth
2019-10-18  7:37         ` Philippe Mathieu-Daudé
2019-10-18  8:41         ` Cornelia Huck
2019-10-17 14:45 ` Christian Borntraeger
2019-10-17 16:14   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eezaljd7.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.