All of lore.kernel.org
 help / color / mirror / Atom feed
* Adding pcie-root-port devices via QMP apparently isn't possible
@ 2021-05-18 12:28 Thomas Parrott
  2021-05-18 12:29 ` Thomas Parrott
  2021-05-18 14:39 ` Marcel Apfelbaum
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Parrott @ 2021-05-18 12:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcel, jusual

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

Due to QEMU moving towards a QMP configuration mechanism and away from
config file support, the LXD team are currently in the process of migrating
to using QMP to add devices to VMs (so that we can support the use of QEMU
6.0).

Currently we are using the `-S` flag to freeze CPU at startup, then using
QMP to add NIC devices via the `device_add` command, and then using the
`cont` command to start the VM guest.

However we have found that it is apparently not possible to add a
pcie-root-port device via QMP.

Initially we tried using something like:

device_add
{"id":"qemu_pcie5","driver":"pcie-root-port","bus":"pcie.0","addr":"1.5","chassis":5,"multifunction":"on"}

Which was a straight conversion from the current config file we use.

However this gave the error:

Error: Bus 'pcie.0' does not support hotplugging

Then I found the `--preconfig` flag which sounded interesting, so we
removed the use of `-daemonize` which prevents the use of --preconfig` and
then tried adding the pcie-root-port devices in the preconfig stage.

But this resulted in the error:

The command 'device_add' isn't permitted in 'preconfig' state

So we wondered is this a bug, or if not, what is the correct way to be
adding pcie-root-ports going forward?

Thanks
Tom Parrott

[-- Attachment #2: Type: text/html, Size: 1781 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-18 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 12:28 Adding pcie-root-port devices via QMP apparently isn't possible Thomas Parrott
2021-05-18 12:29 ` Thomas Parrott
2021-05-18 14:39 ` Marcel Apfelbaum
2021-05-18 14:43   ` Thomas Parrott

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.