[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/5] virtio_net: Add support for "Data Path S
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/5] virtio_net: Add support for "Data Path Switching" during Live Migration. |
Date: |
Wed, 9 Jan 2019 10:56:11 -0500 |
On Mon, Jan 07, 2019 at 05:29:41PM -0500, Venu Busireddy wrote:
> diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
> index 80d42e1..2a3ffd3 100644
> --- a/hw/acpi/pcihp.c
> +++ b/hw/acpi/pcihp.c
> @@ -176,6 +176,25 @@ static void acpi_pcihp_eject_slot(AcpiPciHpState *s,
> unsigned bsel, unsigned slo
> }
> }
>
> +static void acpi_pcihp_cleanup_failover_primary(AcpiPciHpState *s, int bsel)
> +{
> + BusChild *kid, *next;
> + PCIBus *bus = acpi_pcihp_find_hotplug_bus(s, bsel);
> +
> + if (!bus) {
> + return;
> + }
> + QTAILQ_FOREACH_SAFE(kid, &bus->qbus.children, sibling, next) {
> + DeviceState *qdev = kid->child;
> + PCIDevice *pdev = PCI_DEVICE(qdev);
> + int slot = PCI_SLOT(pdev->devfn);
> +
> + if (pdev->failover_primary) {
> + s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);
> + }
> + }
> +}
> +
> static void acpi_pcihp_update_hotplug_bus(AcpiPciHpState *s, int bsel)
> {
> BusChild *kid, *next;
So the result here will be that device will be deleted completely,
and will not reappear after guest reboot.
I don't think this is what we wanted.
I think we wanted a special state that will hide device from guest until
guest acks the failover bit.
> @@ -207,6 +226,14 @@ static void acpi_pcihp_update(AcpiPciHpState *s)
> int i;
>
> for (i = 0; i < ACPI_PCIHP_MAX_HOTPLUG_BUS; ++i) {
> + /*
> + * Set the acpi_pcihp_pci_status[].down bits of all the
> + * failover_primary devices so that the devices are ejected
> + * from the guest. We can't use the qdev_unplug() as well as the
> + * hotplug_handler to unplug the devices, because the guest may
> + * not be in a state to cooperate.
> + */
> + acpi_pcihp_cleanup_failover_primary(s, i);
> acpi_pcihp_update_hotplug_bus(s, i);
> }
> }
I really don't want acpi to know anything about failover.
All that needs to happen is sending a device delete request
to guest. Should work with any hotplug removal:
pci standard,acpi, etc.
--
MST
- Re: [Qemu-devel] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit., (continued)
- Re: [Qemu-devel] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit., Venu Busireddy, 2019/01/08
- Re: [Qemu-devel] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit., Dongli Zhang, 2019/01/08
- Re: [Qemu-devel] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit., Samudrala, Sridhar, 2019/01/08
- Re: [Qemu-devel] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit., Dongli Zhang, 2019/01/08
- Re: [Qemu-devel] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit., Michael S. Tsirkin, 2019/01/08
[Qemu-devel] [PATCH v3 5/5] pci: query command extension to check the bus master enabling status of the failover-primary device, Venu Busireddy, 2019/01/07
[Qemu-devel] [PATCH v3 3/5] virtio_net: Add a query command for FAILOVER_STANDBY_CHANGED event., Venu Busireddy, 2019/01/07
[Qemu-devel] [PATCH v3 2/5] virtio_net: Add support for "Data Path Switching" during Live Migration., Venu Busireddy, 2019/01/07
[Qemu-devel] [PATCH v3 4/5] vfio-pci: Add FAILOVER_PRIMARY_CHANGED event to shorten downtime during failover, Venu Busireddy, 2019/01/07