From: "Michael S. Tsirkin" <mst@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Daniel Paziyski <danielpaziyski@gmail.com>,
qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
qemu-stable@nongnu.org
Subject: Re: [PULL 40/78] pcie_sriov: register user created virtual function before realizing it
Date: Fri, 30 Oct 2026 09:10:58 -0400 [thread overview]
Message-ID: <20261030091030-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <fe0694c6-383b-4cf2-abc0-c6d73a3d6c3c@tls.msk.ru>
On Fri, Oct 30, 2026 at 09:28:50AM +0300, Michael Tokarev wrote:
> On 10/28/26 20:34, Daniel Paziyski wrote:
> > Hello Michael,
> >
> > I think you have queued this patch for pulling on accident. There is a bug here,
> > which is yet to be solved, as you have pointed out in
> >
> > https://lore.kernel.org/qemu-devel/20261028074508-mutt-send-email-mst@kernel.org/T/#mca344ac148a62107cdc298e97e6713b6657b5c55
> >
> > Please, hold off this patch for a while, until I come up with a fix soon.
> Am I right this buggy version of the patch has just landed in the master branch,
> instead of the fixed v2 one?
>
> Here's the difference between what's in current master and the v2:
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index d4187293b1f..6242204a52c 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -2310,10 +2310,8 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp)
> pci_dev->cap_present |= QEMU_PCIE_CAP_CXL;
> }
>
> - pci_dev = do_pci_register_device(pci_dev,
> - object_get_typename(OBJECT(qdev)),
> - pci_dev->devfn, errp);
> - if (pci_dev == NULL) {
> + if (!do_pci_register_device(pci_dev, object_get_typename(OBJECT(qdev)),
> + pci_dev->devfn, errp)) {
> pci_unregister_acpi_index(pci_dev);
> return;
> }
> @@ -2332,6 +2330,11 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp)
> }
> }
>
> + if (!pcie_sriov_check_after_realize(pci_dev, errp)) {
> + pci_qdev_unrealize(DEVICE(pci_dev));
> + return;
> + }
> +
> /*
> * A PCIe Downstream Port that do not have ARI Forwarding enabled must
> * associate only Device 0 with the device attached to the bus
Yes sorry, pls post a fix as a patch.
> ~
>
> Thanks,
>
> /mjt
next prev parent reply other threads:[~2026-10-30 13:12 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 17:13 [PULL 00/78] pci, vhost, virtio, iommu, acpi: features, fixes Michael S. Tsirkin
2026-10-28 17:13 ` [PULL 01/78] libvhost-user: protect against OOB memory table access Michael S. Tsirkin
2026-10-28 17:13 ` [PULL 02/78] vhost-user: fix SET_MEM_TABLE number of regions Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 03/78] hw/virtio/vhost-shadow-virtqueue: fix range boundary in SVQ translation Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 04/78] tests/functional: add test_tap_migration Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 05/78] net/tap: tap_post_load(): poll only on success Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 06/78] hw/net: finish backend initialization earler for local migration Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 07/78] net/tap: move vmstate initialization to new_tap() Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 08/78] net/tap: net_init_tap_one(): fix failure path Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 09/78] Revert 9696846600ca ("multiboot: Prevent loading of x86_64 images") Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 10/78] migration/cpr: forbid saving duplicate CprFds into hash table Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 11/78] tests/unit: add test for duplicate keys in CPR FD table Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 12/78] migration: forbid snapshots in CPR migration modes Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 13/78] migration: forbid snapshots under Xen Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 14/78] tests/qtest/migration: add test for snapshot rejection in CPR modes Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 15/78] vhost-vsock: block CPR migration modes Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 16/78] vhost: add vhost_reset_owner op Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 17/78] vhost-vsock: don't reset connections during CPR Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 18/78] vhost-vsock: fix FD leak in realize() Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 19/78] vhost-vsock: preserve vhost FD during CPR Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 20/78] vhost: factor out vhost_dev_init_backend() Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 21/78] vhost: make vhost_dev_cleanup() safe on a partially initialized device Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 22/78] vhost: add vhost_dev_set_owner() / vhost_dev_reset_owner() helpers Michael S. Tsirkin
2026-10-28 17:14 ` [PULL 23/78] vhost: add vhost_dev_is_initialized() helper Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 24/78] vhost: release ownership in vhost_dev_cleanup() Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 25/78] migration: add MIG_EVENT_INCOMING_FAILED Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 26/78] vhost: release ownership when the incoming migration fails Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 27/78] vhost: release ownership on exit Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 28/78] vhost-vsock: hand off device ownership across CPR Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 29/78] tests/qtest/migration: add vhost-vsock tests for cpr-transfer and cpr-exec Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 30/78] tests/functional: add vhost-vsock CPR test with a live guest Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 31/78] tests/functional: cover a cpr-transfer target going away with vhost-vsock Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 32/78] qapi/virtio: Restore backend features in x-query-virtio-status Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 33/78] qapi/monitor: Handle missing vhost-user protocol features Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 34/78] hw/cxl: destroy primary CCI before re-initialization on reset Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 35/78] hw/cxl: convert cxl-type3 to three-phase reset Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 36/78] hw/cxl: add cxl_destroy_mailbox_t3() as the mailbox teardown counterpart Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 37/78] hw/cxl: discard in-flight sanitize state on mailbox teardown Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 38/78] hw/cxl: clear event logs, scan media and interrupt policy on reset Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 39/78] hw/cxl: clear poison lists and feature transfer state " Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 40/78] pcie_sriov: register user created virtual function before realizing it Michael S. Tsirkin
2026-10-28 17:34 ` Daniel Paziyski
2026-10-30 6:28 ` Michael Tokarev
2026-10-30 13:10 ` Michael S. Tsirkin [this message]
2026-10-28 17:15 ` [PULL 41/78] hw/pci-bridge: Add generic PCIe switch upstream and downstream ports Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 42/78] hw/pci-bridge: Make speed and width for PCIe ports non-experimental Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 43/78] hw/pci-bridge: Default the generic PCIe root port as Gen6 capable Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 44/78] hw/pci: Ensure PCIe link speed/width is consistent between both ends Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 45/78] vdpa-dev: implement guest_notifier_mask/pending Michael S. Tsirkin
2026-10-28 17:15 ` [PULL 46/78] vhost-user: remove shared object entries during cleanup Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 47/78] vhost: fix off-by-one in vhost_svq_next_desc with IN_ORDER Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 48/78] pcie_sriov: fix wrong write width and off-by-one in pf_reset Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 49/78] util/event_notifier: more strict API Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 50/78] virtio-qmp: Fix out-of-bounds vqs index in vhost queue status Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 51/78] contrib/vhost-user-bridge: Use stderr for debug output Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 52/78] tests/functional/x86_64/test_vhost_user_bridge: Eliminate stdbuf usage Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 53/78] pcie_aer: fix pci_set_long overflow into PCI_EXP_LNKCAP Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 54/78] MAINTAINERS: Update Junjie Cao's email address Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 55/78] hw/arm: remove pci-bridge/pci_expander_bridge.h from virt.c Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 56/78] hw/pci-bridge: split CXL PXB into separate file Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 57/78] vhost-user: add missing stub for vhost_user_has_protocol_feature() Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 58/78] vhost: move skip-drain feature check to vhost-user Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 59/78] virtio-snd: don't use virtio_snd_pcm_get_stream() in virtio_snd_post_load() Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 60/78] vhost-user: add dedicated mailing list Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 61/78] amd_iommu: Assign ioapic_as only when interrupt remapping is supported Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 62/78] x86-iommu: Introduce x86_iommu_device_get() for x86-iommu retrieval Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 63/78] amd_iommu: Add support for get_x86_iommu callback Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 64/78] intel_iommu: " Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 65/78] i386/kvm: Use x86_iommu_device_get() for per-device IOMMU lookup Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 66/78] amd_iommu: Introduce root bus Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 67/78] acpi-build: Create PCI topology using amd iommu " Michael S. Tsirkin
2026-10-28 17:16 ` [PULL 68/78] amd_iommu: Allow IOMMU to attachment on non-system (pcie.0) bus Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 69/78] intel_iommu_accel: Guard VTDAccelPASIDCacheEntry definition Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 70/78] backends/iommufd: Introduce iommufd_backend_alloc_faultq Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 71/78] backends/iommufd: Extend iommufd_backend_alloc_hwpt() with fault_id Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 72/78] intel_iommu_accel: Add PRQ injection for passthrough device Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 73/78] intel_iommu_accel: Accept PRQ response " Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 74/78] intel_iommu_accel: Teardown FAULTQ resources in bottom half Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 75/78] hw/virtio/virtio-mem: Fix error message on invalid NUMA node Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 76/78] net/tap: add tap_fd_get_mtu() to query host tap MTU Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 77/78] net: add generic get_mtu NetClientInfo callback Michael S. Tsirkin
2026-10-28 17:17 ` [PULL 78/78] virtio-net: add mtu-from-tap property for automatic MTU detection Michael S. Tsirkin
2026-10-29 14:45 ` [PULL 00/78] pci, vhost, virtio, iommu, acpi: features, fixes Richard Henderson
2026-10-29 18:31 ` Michael S. Tsirkin
2026-10-29 22:07 ` Richard Henderson
2026-10-29 22:44 ` Daniel Paziyski
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=20261030091030-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=danielpaziyski@gmail.com \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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 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.