qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] -device foo, help shouldn't be allowed for devices where -d


From: Peter Maydell
Subject: [Qemu-devel] -device foo, help shouldn't be allowed for devices where -device foo is forbidden
Date: Mon, 14 Jan 2019 16:31:35 +0000

We prohibit -device foo for non-pluggable devices:
$ ./build/all/x86_64-softmmu/qemu-system-x86_64 -device i8257
qemu-system-x86_64: -device i8257: Parameter 'driver' expects
pluggable device type

And we suppress them from "-device help" output too.

But we still allow the user to do this:

$ ./build/all/x86_64-softmmu/qemu-system-x86_64 -device i8257,help
i8257 options:
  dshift=<int32>
  base=<int32>
  pageh-base=<int32>
  page-base=<int32>

Does anybody know how best to fix this? I guess we want to check
dc->user_creatable in qdev_device_help() and print "%s is not
a pluggable device" or something similar instead ?

(The output is particularly useless for some devices, eg

$ ./build/all/arm-softmmu/qemu-system-arm -M virt -device iotkit,help
iotkit options:
  ppc-irq-splitter-5=<child<split-irq>>
  nswatchdog=<child<cmsdk-apb-watchdog>>
  iotkit-sysinfo=<child<iotkit-sysinfo>>
  sec-resp-splitter=<child<split-irq>>
  ppc-irq-splitter-6=<child<split-irq>>
  mpc-irq-splitter-16=<child<split-irq>>
  memory=<link<qemu:memory-region>>
  mpc=<child<tz-mpc>>
  dualtimer=<child<cmsdk-apb-dualtimer>>
  ppc-irq-splitter-9=<child<split-irq>>
  ppc-irq-splitter-8=<child<split-irq>>
  ppc-irq-splitter-7=<child<split-irq>>
  mpc-irq-splitter-6=<child<split-irq>>
  ppc-irq-splitter-4=<child<split-irq>>
  iotkit-container[0]=<child<qemu:memory-region>>
  s32kwatchdog=<child<cmsdk-apb-watchdog>>
  mpc-irq-splitter-5=<child<split-irq>>
  iotkit-sysctl=<child<iotkit-sysctl>>
  EXP_NUMIRQ=<uint32>
  MAINCLK=<uint32>
  mpc-irq-orgate=<child<or-irq>>
  mpc-irq-splitter-9=<child<split-irq>>
  mpc-irq-splitter-8=<child<split-irq>>
  mpc-irq-splitter-7=<child<split-irq>>
  mpc-irq-splitter-4=<child<split-irq>>
  mpc-irq-splitter-2=<child<split-irq>>
  mpc-irq-splitter-1=<child<split-irq>>
  mpc-irq-splitter-3=<child<split-irq>>
  apb-ppc1=<child<tz-ppc>>
  apb-ppc0=<child<tz-ppc>>
  mpc-irq-splitter-0=<child<split-irq>>
  mpc-irq-splitter-15=<child<split-irq>>
  mpc-irq-splitter-14=<child<split-irq>>
  mpc-irq-splitter-13=<child<split-irq>>
  mpc-irq-splitter-12=<child<split-irq>>
  mpc-irq-splitter-11=<child<split-irq>>
  mpc-irq-splitter-10=<child<split-irq>>
  ppc-irq-splitter-3=<child<split-irq>>
  ppc-irq-splitter-2=<child<split-irq>>
  ppc-irq-splitter-1=<child<split-irq>>
  swatchdog=<child<cmsdk-apb-watchdog>>
  nmi-orgate=<child<or-irq>>
  s32ktimer=<child<cmsdk-apb-timer>>
  ppc-irq-splitter-0=<child<split-irq>>
  timer1=<child<cmsdk-apb-timer>>
  timer0=<child<cmsdk-apb-timer>>
  secctl=<child<iotkit-secctl>>
  armv7m=<child<armv7m>>
  ppc-irq-orgate=<child<or-irq>>

where the properties are all intended to be
set up by QEMU code, not by a user.)

thanks
-- PMM



reply via email to

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