From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Parrott <thomas.parrott@canonical.com>,
Julia Suvorova <jusual@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: Fwd: Adding devices via QMP's device_add don't have their bootindex setting respected
Date: Tue, 18 May 2021 14:55:34 +0200 [thread overview]
Message-ID: <848d4c41-6c05-2877-fae1-83a9d3a5082d@redhat.com> (raw)
In-Reply-To: <CADNu6esNHqEPzpROiRu+PEFGZJhi3Sgs=duEqjAz53FJv-UMCQ@mail.gmail.com>
On 18/05/21 14:22, Thomas Parrott wrote:
> 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).
If the only issue you have is with -spice, that's just a bug that we
need to fix. -readconfig is still supposed to work, even though
-writeconfig is deprecated and I'd like to remove it as soon as 6.1.
In particular, the issue you reported below is not a bug. Devices that
are added after startup are considered hotplugged, and the boot index
list is frozen until the next reset. QMP-based configuration of
coldplugged devices is in the works, but unfortunately it is not yet ready.
Paolo
> 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.
>
> This is working mostly fine, but there is one issue; the provided
> "bootindex" property is not respected.
>
> E.g.
>
> device_add
> {"addr":"00.0","bootindex":"0","bus":"qemu_pcie4","driver":"virtio-net-pci","id":"dev-lxd_eth0","mac":"00:16:3e:0c:69:e7","mq":"on","multifunction":"off","netdev":"lxd_eth0","vectors":"6"}
>
> The device is seen within the VM guest and the VM BIOS, but its boot
> order is last rather than first.
>
> We've also tried using a non-zero bootindex of 1 and that has the same
> effect.
>
> After discussions on #qemu IRC channel, we found that running
> `system_reset` after adding the devices allowed the `bootindex` property
> to be respected.
>
> So this looks like bug. Perhaps we can discuss it in one of the
> forthcoming community calls?
>
> Thanks
> Tom Parrott
next prev parent reply other threads:[~2021-05-18 12:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 10:51 Adding devices via QMP's device_add don't have their bootindex setting respected Thomas Parrott
[not found] ` <CADNu6esNHqEPzpROiRu+PEFGZJhi3Sgs=duEqjAz53FJv-UMCQ@mail.gmail.com>
2021-05-18 12:55 ` Paolo Bonzini [this message]
2021-05-18 13:08 ` Fwd: " Thomas Parrott
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=848d4c41-6c05-2877-fae1-83a9d3a5082d@redhat.com \
--to=pbonzini@redhat.com \
--cc=jusual@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thomas.parrott@canonical.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).