From: "Michael S. Tsirkin" <mst@redhat.com>
To: Venu Busireddy <venu.busireddy@oracle.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>,
virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org
Subject: [virtio-dev] Re: [PATCH v3 2/5] virtio_net: Add support for "Data Path Switching" during Live Migration.
Date: Wed, 9 Jan 2019 10:56:11 -0500 [thread overview]
Message-ID: <20190109105223-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1546900184-27403-3-git-send-email-venu.busireddy@oracle.com>
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
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2019-01-09 15:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 22:29 [virtio-dev] [PATCH v3 0/5] Support for datapath switching during live migration Venu Busireddy
2019-01-07 22:29 ` [virtio-dev] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit Venu Busireddy
[not found] ` <6f5632f5-1469-7000-9b92-ef2564a63f63@oracle.com>
2019-01-08 17:25 ` [virtio-dev] Re: [Qemu-devel] " Venu Busireddy
[not found] ` <41b85d40-0711-a0f3-6b45-bacd20644186@oracle.com>
2019-01-09 0:18 ` Samudrala, Sridhar
[not found] ` <17db1d06-f703-6ac6-57c7-0002eaf64a71@oracle.com>
2019-01-09 4:17 ` Michael S. Tsirkin
2019-01-07 22:29 ` [virtio-dev] [PATCH v3 2/5] virtio_net: Add support for "Data Path Switching" during Live Migration Venu Busireddy
2019-01-09 13:39 ` Cornelia Huck
2019-01-09 15:56 ` Michael S. Tsirkin [this message]
2019-01-11 2:09 ` [virtio-dev] Re: [Qemu-devel] " si-wei liu
2019-01-11 3:20 ` Michael S. Tsirkin
2019-01-11 7:09 ` si-wei liu
2019-01-07 22:29 ` [virtio-dev] [PATCH v3 3/5] virtio_net: Add a query command for FAILOVER_STANDBY_CHANGED event Venu Busireddy
2019-01-08 0:10 ` [virtio-dev] " Michael S. Tsirkin
2019-01-07 22:29 ` [virtio-dev] [PATCH v3 4/5] vfio-pci: Add FAILOVER_PRIMARY_CHANGED event to shorten downtime during failover Venu Busireddy
[not found] ` <20190107161717.4648aba2@x1.home>
2019-01-07 23:22 ` [virtio-dev] Re: [Qemu-devel] " Michael S. Tsirkin
[not found] ` <20190107164115.6daffe19@x1.home>
2019-01-08 0:12 ` Michael S. Tsirkin
[not found] ` <20190107172415.2f723149@x1.home>
2019-01-08 0:43 ` Michael S. Tsirkin
2019-01-08 1:13 ` si-wei liu
2019-01-07 22:29 ` [virtio-dev] [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 23:32 ` [virtio-dev] Re: [PATCH v3 0/5] Support for datapath switching during live migration Michael S. Tsirkin
2019-01-08 1:45 ` si-wei liu
2019-01-08 2:25 ` Michael S. Tsirkin
2019-01-09 4:55 ` si-wei liu
2019-01-09 13:39 ` Michael S. Tsirkin
2019-01-11 6:57 ` si-wei liu
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=20190109105223-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=marcel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=venu.busireddy@oracle.com \
--cc=virtio-dev@lists.oasis-open.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox