* [Bug 1906463] [NEW] "-device help" does not report all devices
@ 2020-12-02 0:57 Doug Evans
2020-12-02 6:53 ` Markus Armbruster
2020-12-02 7:53 ` [Bug 1906463] " Thomas Huth
0 siblings, 2 replies; 6+ messages in thread
From: Doug Evans @ 2020-12-02 0:57 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
-device help doesn't report all devices.
E.g., devices that are instantiated by a board don't get printed in part because they don't exist when "-device help" is processed. As an experiment I deferred processing of "-device help" as long as possible and some devices were still not printed, so there's more going on here.
QEMU commit hash: 944fdc5e27a5b5adbb765891e8e70e88ba9a00ec
Repro:
$ configure --target-list=arm-softmmu
$ make
$ ./qemu-system-arm -device help | grep npcm7xx
<empty>
I'd expect to see things like npcm7xx-rng in the output.
I can imagine enumerating board-provided devices is a challenge.
Still, it'd be really nice if "-device help" printed them, and having
"-device $driver,help" work as well.
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1906463
Title:
"-device help" does not report all devices
Status in QEMU:
New
Bug description:
-device help doesn't report all devices.
E.g., devices that are instantiated by a board don't get printed in part because they don't exist when "-device help" is processed. As an experiment I deferred processing of "-device help" as long as possible and some devices were still not printed, so there's more going on here.
QEMU commit hash: 944fdc5e27a5b5adbb765891e8e70e88ba9a00ec
Repro:
$ configure --target-list=arm-softmmu
$ make
$ ./qemu-system-arm -device help | grep npcm7xx
<empty>
I'd expect to see things like npcm7xx-rng in the output.
I can imagine enumerating board-provided devices is a challenge.
Still, it'd be really nice if "-device help" printed them, and having
"-device $driver,help" work as well.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1906463/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bug 1906463] [NEW] "-device help" does not report all devices
2020-12-02 0:57 [Bug 1906463] [NEW] "-device help" does not report all devices Doug Evans
@ 2020-12-02 6:53 ` Markus Armbruster
2020-12-02 16:48 ` Doug Evans
2020-12-02 7:53 ` [Bug 1906463] " Thomas Huth
1 sibling, 1 reply; 6+ messages in thread
From: Markus Armbruster @ 2020-12-02 6:53 UTC (permalink / raw)
To: Doug Evans; +Cc: qemu-devel
Doug Evans <1906463@bugs.launchpad.net> writes:
> Public bug reported:
>
> -device help doesn't report all devices.
> E.g., devices that are instantiated by a board don't get printed in part because they don't exist when "-device help" is processed. As an experiment I deferred processing of "-device help" as long as possible and some devices were still not printed, so there's more going on here.
>
> QEMU commit hash: 944fdc5e27a5b5adbb765891e8e70e88ba9a00ec
>
> Repro:
> $ configure --target-list=arm-softmmu
> $ make
> $ ./qemu-system-arm -device help | grep npcm7xx
> <empty>
>
> I'd expect to see things like npcm7xx-rng in the output.
Works as intended.
"-device help" shows the devices that are available with -device.
npcm7xx-rng isn't:
$ qemu-system-arm -M virt -device npcm7xx-rng
qemu-system-arm: -device npcm7xx-rng: Parameter 'driver' expects pluggable device type
Monitor command "info qdm" shows all devices, including npcm7xx-rng:
$ qemu-system-arm -M virt -monitor stdio
QEMU 5.1.92 monitor - type 'help' for more information
(qemu) info qdm
[...]
name "npcm7xx-rng", bus System, desc "NPCM7xx Random Number Generator", no-user
[...]
Note "no-user": it's not available with -device.
> I can imagine enumerating board-provided devices is a challenge.
> Still, it'd be really nice if "-device help" printed them, and having
> "-device $driver,help" work as well.
It works:
$ qemu-system-arm -M virt -device npcm7xx-rng,help
npcm7xx-rng options:
regs[0]=<child<qemu:memory-region>>
Hope this helps!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1906463] Re: "-device help" does not report all devices
2020-12-02 0:57 [Bug 1906463] [NEW] "-device help" does not report all devices Doug Evans
2020-12-02 6:53 ` Markus Armbruster
@ 2020-12-02 7:53 ` Thomas Huth
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2020-12-02 7:53 UTC (permalink / raw)
To: qemu-devel
This works as intended, see Markus' reply here:
https://lists.gnu.org/archive/html/qemu-devel/2020-12/msg00337.html
** Changed in: qemu
Status: New => Invalid
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1906463
Title:
"-device help" does not report all devices
Status in QEMU:
Invalid
Bug description:
-device help doesn't report all devices.
E.g., devices that are instantiated by a board don't get printed in part because they don't exist when "-device help" is processed. As an experiment I deferred processing of "-device help" as long as possible and some devices were still not printed, so there's more going on here.
QEMU commit hash: 944fdc5e27a5b5adbb765891e8e70e88ba9a00ec
Repro:
$ configure --target-list=arm-softmmu
$ make
$ ./qemu-system-arm -device help | grep npcm7xx
<empty>
I'd expect to see things like npcm7xx-rng in the output.
I can imagine enumerating board-provided devices is a challenge.
Still, it'd be really nice if "-device help" printed them, and having
"-device $driver,help" work as well.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1906463/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bug 1906463] [NEW] "-device help" does not report all devices
2020-12-02 6:53 ` Markus Armbruster
@ 2020-12-02 16:48 ` Doug Evans
2020-12-02 17:41 ` Peter Maydell
0 siblings, 1 reply; 6+ messages in thread
From: Doug Evans @ 2020-12-02 16:48 UTC (permalink / raw)
To: Markus Armbruster; +Cc: QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 2694 bytes --]
On Tue, Dec 1, 2020 at 10:53 PM Markus Armbruster <armbru@redhat.com> wrote:
> Doug Evans <1906463@bugs.launchpad.net> writes:
>
> > Public bug reported:
> >
> > -device help doesn't report all devices.
> > E.g., devices that are instantiated by a board don't get printed in part
> because they don't exist when "-device help" is processed. As an experiment
> I deferred processing of "-device help" as long as possible and some
> devices were still not printed, so there's more going on here.
> >
> > QEMU commit hash: 944fdc5e27a5b5adbb765891e8e70e88ba9a00ec
> >
> > Repro:
> > $ configure --target-list=arm-softmmu
> > $ make
> > $ ./qemu-system-arm -device help | grep npcm7xx
> > <empty>
> >
> > I'd expect to see things like npcm7xx-rng in the output.
>
> Works as intended.
>
> "-device help" shows the devices that are available with -device.
> npcm7xx-rng isn't:
>
> $ qemu-system-arm -M virt -device npcm7xx-rng
> qemu-system-arm: -device npcm7xx-rng: Parameter 'driver' expects
> pluggable device type
>
> Monitor command "info qdm" shows all devices, including npcm7xx-rng:
>
> $ qemu-system-arm -M virt -monitor stdio
> QEMU 5.1.92 monitor - type 'help' for more information
> (qemu) info qdm
> [...]
> name "npcm7xx-rng", bus System, desc "NPCM7xx Random Number
> Generator", no-user
> [...]
>
> Note "no-user": it's not available with -device.
>
> > I can imagine enumerating board-provided devices is a challenge.
> > Still, it'd be really nice if "-device help" printed them, and having
> > "-device $driver,help" work as well.
>
> It works:
>
> $ qemu-system-arm -M virt -device npcm7xx-rng,help
> npcm7xx-rng options:
> regs[0]=<child<qemu:memory-region>>
>
> Hope this helps!
>
Thanks for the reply. It does help, but it's odd that I can't use "-device
help" to discover a device, but once discovered I can use it to get help on
that device.
At least I get why now. Thanks again.
Btw, if I may ask another dumb question, I get this:
@ruffy:build-arm$ ./qemu-system-arm -M virt -monitor stdio
Unable to init server: Could not connect: Connection refused
QEMU 5.1.93 monitor - type 'help' for more information
(qemu) gtk initialization failed
<exit>
If I add "-display none" then it works, but it's odd that it's trying to
initialize with gtk here ($DISPLAY isn't set, there is no X present).
-help output says gtk is the default for -display, I'm guessing you didn't
configure with gtk so that's why it works for you.
Question: I'm not up on what the current state of the art is here, but
given that $DISPLAY is unset, why not punt on gtk and default to "none" ?
(printing a warning at startup explaining why if that helps)
[-- Attachment #2: Type: text/html, Size: 3960 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bug 1906463] [NEW] "-device help" does not report all devices
2020-12-02 16:48 ` Doug Evans
@ 2020-12-02 17:41 ` Peter Maydell
2020-12-02 17:55 ` Doug Evans
0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2020-12-02 17:41 UTC (permalink / raw)
To: Doug Evans; +Cc: Markus Armbruster, QEMU Developers
On Wed, 2 Dec 2020 at 16:51, Doug Evans <dje@google.com> wrote:
>
> Btw, if I may ask another dumb question, I get this:
>
> @ruffy:build-arm$ ./qemu-system-arm -M virt -monitor stdio
> Unable to init server: Could not connect: Connection refused
> QEMU 5.1.93 monitor - type 'help' for more information
> (qemu) gtk initialization failed
> <exit>
>
> If I add "-display none" then it works, but it's odd that it's trying to initialize with gtk here ($DISPLAY isn't set, there is no X present).
That's expected. By default we try to create a GUI window.
If DISPLAY is not set, then that fails, which is why
we print "gtk initialization failed" and exit.
This is the same behaviour as other GUI apps:
$ DISPLAY= xterm
xterm: Xt error: Can't open display:
xterm: DISPLAY is not set
$ DISPLAY= firefox
Unable to init server: Broadway display type not supported:
Error: cannot open display:
$ DISPLAY= evince
Unable to init server: Could not connect: Connection refused
Cannot parse arguments: Cannot open display:
If you don't want graphics you should tell QEMU you
don't want graphics (eg with '-display none').
This seems to me more helpful to most users than the
alternative (if you know you don't want the GUI then
it's easy to disable it; but most non-sophisticated
users do want it).
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bug 1906463] [NEW] "-device help" does not report all devices
2020-12-02 17:41 ` Peter Maydell
@ 2020-12-02 17:55 ` Doug Evans
0 siblings, 0 replies; 6+ messages in thread
From: Doug Evans @ 2020-12-02 17:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: Markus Armbruster, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]
On Wed, Dec 2, 2020 at 9:41 AM Peter Maydell <peter.maydell@linaro.org>
wrote:
> On Wed, 2 Dec 2020 at 16:51, Doug Evans <dje@google.com> wrote:
> >
> > Btw, if I may ask another dumb question, I get this:
> >
> > @ruffy:build-arm$ ./qemu-system-arm -M virt -monitor stdio
> > Unable to init server: Could not connect: Connection refused
> > QEMU 5.1.93 monitor - type 'help' for more information
> > (qemu) gtk initialization failed
> > <exit>
> >
> > If I add "-display none" then it works, but it's odd that it's trying to
> initialize with gtk here ($DISPLAY isn't set, there is no X present).
>
> That's expected. By default we try to create a GUI window.
> If DISPLAY is not set, then that fails, which is why
> we print "gtk initialization failed" and exit.
> This is the same behaviour as other GUI apps:
>
> $ DISPLAY= xterm
> xterm: Xt error: Can't open display:
> xterm: DISPLAY is not set
>
> $ DISPLAY= firefox
> Unable to init server: Broadway display type not supported:
> Error: cannot open display:
>
> $ DISPLAY= evince
> Unable to init server: Could not connect: Connection refused
> Cannot parse arguments: Cannot open display:
>
> If you don't want graphics you should tell QEMU you
> don't want graphics (eg with '-display none').
>
> This seems to me more helpful to most users than the
> alternative (if you know you don't want the GUI then
> it's easy to disable it; but most non-sophisticated
> users do want it).
>
Thanks. That's not unreasonable.
OTOH, all those examples don't have a non-X mode.
As counterexamples there's emacs and gvim.
The present situation is fine, now that I understand it.
I can write a wrapper that DTRT.
[-- Attachment #2: Type: text/html, Size: 2892 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-12-02 17:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 0:57 [Bug 1906463] [NEW] "-device help" does not report all devices Doug Evans
2020-12-02 6:53 ` Markus Armbruster
2020-12-02 16:48 ` Doug Evans
2020-12-02 17:41 ` Peter Maydell
2020-12-02 17:55 ` Doug Evans
2020-12-02 7:53 ` [Bug 1906463] " Thomas Huth
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.