Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
If hotplug balloon device under pcie-root-port before windows 2022 guest boot up, balloon device is not shown in Device Manager, and balloon can't function well after guest boot up.
Version-Release number of selected component (if applicable):
qemu-kvm-6.2.0-2.el9
How reproducible:
always
Steps to Reproduce:
1. Boot win2022 guest with q35 machine type with '-S'
2. Hotplug balloon device under pcie-root-port
(qemu) device_add virtio-balloon-pci,id=balloon0,bus=pcie.0-root-port-5
3. Resume guest
(qemu) c
4. After guest boot up, evict balloon
(qemu) info balloon
balloon: actual=8192
(qemu) balloon 4096
(qemu) info balloon
balloon: actual=8192
Actual results:
Balloon device is not shown in Device Manager, and balloon can't function well after windows guest boot up.
Expected results:
Balloon function well.
Additional info:
1. It's a regression, works well with qemu-kvm-6.1.0-5.module+el8.6.0+13430+8fdd5f85.
2. It can reproduce on rhel8.6 with qemu-kvm-6.2.0-1.module+el8.6.0+13725+61ae1949.
3. Per https://bugzilla.redhat.com/show_bug.cgi?id=2032267#c8 #9, it's a side effect of below commit.
> commit d5daff7d312653b92f23c7a8e198090b32b8dae6
> Author: Gerd Hoffmann <kraxel>
> Date: Thu Nov 11 14:08:55 2021 +0100
>
> pcie: implement slot power control for pcie root ports
>
> With this patch hot-plugged pci devices will only be visible to the
> guest if the guests hotplug driver has enabled slot power.
>
> This should fix the hot-plug race which one can hit when hot-plugging
> a pci device at boot, while the guest is in the middle of the pci bus
> scan.
>
(In reply to Yumei Huang from comment #0)
> 3. Per https://bugzilla.redhat.com/show_bug.cgi?id=2032267#c8 #9, it's a
> side effect of below commit.
>
> > commit d5daff7d312653b92f23c7a8e198090b32b8dae6
> > Author: Gerd Hoffmann <kraxel>
> > Date: Thu Nov 11 14:08:55 2021 +0100
> >
> > pcie: implement slot power control for pcie root ports
> >
> > With this patch hot-plugged pci devices will only be visible to the
> > guest if the guests hotplug driver has enabled slot power.
> >
> > This should fix the hot-plug race which one can hit when hot-plugging
> > a pci device at boot, while the guest is in the middle of the pci bus
> > scan.
> >Bug 2032267 was specifically bisected to that commit, I don't see the similarity to what's being reported here to make such a strong assumption. Has a bisect been done relative to this issue to identify that commit? [needinfo]
Otherwise, work has been done in upstream QEMU to resolve guest boot-time hotplug races. Adding Julia to Cc and I'll leave it to the QEMU PCI maintainers.
(In reply to Alex Williamson from comment #2)
> (In reply to Yumei Huang from comment #0)
> > 3. Per https://bugzilla.redhat.com/show_bug.cgi?id=2032267#c8 #9, it's a
> > side effect of below commit.
> >
> > > commit d5daff7d312653b92f23c7a8e198090b32b8dae6
> > > Author: Gerd Hoffmann <kraxel>
> > > Date: Thu Nov 11 14:08:55 2021 +0100
> > >
> > > pcie: implement slot power control for pcie root ports
> > >
> > > With this patch hot-plugged pci devices will only be visible to the
> > > guest if the guests hotplug driver has enabled slot power.
> > >
> > > This should fix the hot-plug race which one can hit when hot-plugging
> > > a pci device at boot, while the guest is in the middle of the pci bus
> > > scan.
> > >
>
> Bug 2032267 was specifically bisected to that commit, I don't see the
> similarity to what's being reported here to make such a strong assumption.
> Has a bisect been done relative to this issue to identify that commit?
> [needinfo]
>
Yes, tested with machine type 'pc-q35-5.2', the issue can reproduce when check out to this commit, and can't reproduce when checkout to the former commit.
And the issue is gone if using 'pc-q35-6.1', even with this commit.
Also tested downstream build, qemu-kvm-6.2.0-5.el9, the issue is gone with pc-q35-rhel9.0.0, and reproduces with pc-q35-rhel8.5.0.