[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/19] Revert "virtio-pci: Implement SR-IOV PF"
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL 04/19] Revert "virtio-pci: Implement SR-IOV PF" |
|
Date: |
Thu, 1 Aug 2024 06:35:50 -0400 |
This reverts commit 3f868ffb0bae0c4feafabe34a371cded57fe3806.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/virtio-pci.h | 1 -
hw/virtio/virtio-pci.c | 20 +++++---------------
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h
index 34539f2f67..9e67ba38c7 100644
--- a/include/hw/virtio/virtio-pci.h
+++ b/include/hw/virtio/virtio-pci.h
@@ -152,7 +152,6 @@ struct VirtIOPCIProxy {
uint32_t modern_io_bar_idx;
uint32_t modern_mem_bar_idx;
int config_cap;
- uint16_t last_pcie_cap_offset;
uint32_t flags;
bool disable_modern;
bool ignore_backend_features;
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 0c8fcc5627..9534730bba 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1955,7 +1955,6 @@ static void virtio_pci_device_plugged(DeviceState *d,
Error **errp)
uint8_t *config;
uint32_t size;
VirtIODevice *vdev = virtio_bus_get_device(bus);
- int16_t res;
/*
* Virtio capabilities present without
@@ -2101,14 +2100,6 @@ static void virtio_pci_device_plugged(DeviceState *d,
Error **errp)
pci_register_bar(&proxy->pci_dev, proxy->legacy_io_bar_idx,
PCI_BASE_ADDRESS_SPACE_IO, &proxy->bar);
}
-
- res = pcie_sriov_pf_init_from_user_created_vfs(&proxy->pci_dev,
- proxy->last_pcie_cap_offset,
- errp);
- if (res > 0) {
- proxy->last_pcie_cap_offset += res;
- virtio_add_feature(&vdev->host_features, VIRTIO_F_SR_IOV);
- }
}
static void virtio_pci_device_unplugged(DeviceState *d)
@@ -2196,7 +2187,7 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error
**errp)
if (pcie_port && pci_is_express(pci_dev)) {
int pos;
- proxy->last_pcie_cap_offset = PCI_CONFIG_SPACE_SIZE;
+ uint16_t last_pcie_cap_offset = PCI_CONFIG_SPACE_SIZE;
pos = pcie_endpoint_cap_init(pci_dev, 0);
assert(pos > 0);
@@ -2216,9 +2207,9 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error
**errp)
pci_set_word(pci_dev->config + pos + PCI_PM_PMC, 0x3);
if (proxy->flags & VIRTIO_PCI_FLAG_AER) {
- pcie_aer_init(pci_dev, PCI_ERR_VER, proxy->last_pcie_cap_offset,
+ pcie_aer_init(pci_dev, PCI_ERR_VER, last_pcie_cap_offset,
PCI_ERR_SIZEOF, NULL);
- proxy->last_pcie_cap_offset += PCI_ERR_SIZEOF;
+ last_pcie_cap_offset += PCI_ERR_SIZEOF;
}
if (proxy->flags & VIRTIO_PCI_FLAG_INIT_DEVERR) {
@@ -2243,9 +2234,9 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error
**errp)
}
if (proxy->flags & VIRTIO_PCI_FLAG_ATS) {
- pcie_ats_init(pci_dev, proxy->last_pcie_cap_offset,
+ pcie_ats_init(pci_dev, last_pcie_cap_offset,
proxy->flags & VIRTIO_PCI_FLAG_ATS_PAGE_ALIGNED);
- proxy->last_pcie_cap_offset += PCI_EXT_CAP_ATS_SIZEOF;
+ last_pcie_cap_offset += PCI_EXT_CAP_ATS_SIZEOF;
}
if (proxy->flags & VIRTIO_PCI_FLAG_INIT_FLR) {
@@ -2272,7 +2263,6 @@ static void virtio_pci_exit(PCIDevice *pci_dev)
bool pcie_port = pci_bus_is_express(pci_get_bus(pci_dev)) &&
!pci_bus_is_root(pci_get_bus(pci_dev));
- pcie_sriov_pf_exit(&proxy->pci_dev);
msix_uninit_exclusive_bar(pci_dev);
if (proxy->flags & VIRTIO_PCI_FLAG_AER && pcie_port &&
pci_is_express(pci_dev)) {
--
MST
- [PULL 00/19] virtio,pci,pc: fixes, Michael S. Tsirkin, 2024/08/01
- [PULL 01/19] virtio-rng: block max-bytes=0, Michael S. Tsirkin, 2024/08/01
- [PULL 02/19] Revert "docs: Document composable SR-IOV device", Michael S. Tsirkin, 2024/08/01
- [PULL 03/19] Revert "virtio-net: Implement SR-IOV VF", Michael S. Tsirkin, 2024/08/01
- [PULL 04/19] Revert "virtio-pci: Implement SR-IOV PF",
Michael S. Tsirkin <=
- [PULL 05/19] Revert "pcie_sriov: Allow user to create SR-IOV device", Michael S. Tsirkin, 2024/08/01
- [PULL 06/19] Revert "pcie_sriov: Check PCI Express for SR-IOV PF", Michael S. Tsirkin, 2024/08/01
- [PULL 07/19] Revert "pcie_sriov: Ensure PF and VF are mutually exclusive", Michael S. Tsirkin, 2024/08/01
- [PULL 08/19] Revert "hw/pci: Fix SR-IOV VF number calculation", Michael S. Tsirkin, 2024/08/01
- [PULL 09/19] Revert "pcie_sriov: Register VFs after migration", Michael S. Tsirkin, 2024/08/01
- [PULL 10/19] Revert "pcie_sriov: Remove num_vfs from PCIESriovPF", Michael S. Tsirkin, 2024/08/01
- [PULL 11/19] Revert "pcie_sriov: Release VFs failed to realize", Michael S. Tsirkin, 2024/08/01
- [PULL 12/19] Revert "pcie_sriov: Reuse SR-IOV VF device instances", Michael S. Tsirkin, 2024/08/01
- [PULL 13/19] Revert "pcie_sriov: Ensure VF function number does not overflow", Michael S. Tsirkin, 2024/08/01
- [PULL 14/19] Revert "pcie_sriov: Do not manually unrealize", Michael S. Tsirkin, 2024/08/01