All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [PATCH v2 0/3] Fix broken PCIe device after migration
Date: Tue, 1 Mar 2022 10:20:32 -0500	[thread overview]
Message-ID: <20220301102014-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220301151200.3507298-1-imammedo@redhat.com>

On Tue, Mar 01, 2022 at 10:11:57AM -0500, Igor Mammedov wrote:
> Changelog:
>    v2:
>      * instead of disabling power control on slot and letting ACPI
>        PCI hotplug  module in guest to deal with it, set
>        PCI_EXP_SLTCTL_PWR_ON on PCIe slot from acpi_pcihp_device_plug_cb()
>        when a device plugged into it.
> 
> Currently ACPI PCI hotplug is enabled by default for Q35 machine
> type and overrides native PCIe hotplug. It works as expected when
> a PCIe device is hotplugged into slot, however the device becomes
> in-operational after migration. Which is caused by BARs being
> disabled on target due to powered off status of the slot.
> 
> Proposed fix turns on power on PCIe slot when a device is
> hotplugged into it, then that state is migrated and device
> stays powred on after migration. 


Looks good for 1-2. Some questions on 3.
Thanks!

> Tested with (seabios: FC34, Win2012; ovmf: RHEL8)
> 
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2053584
> CC: mst@redhat.com
> CC: kraxel@redhat.com
> 
> Ref to v1:
>  https://lore.kernel.org/all/20220225100127.78974d71@redhat.com/T/
> Gitlab link:
>  https://gitlab.com/imammedo/qemu/-/tree/pcie_poweroff_acpi_regression_rhbz2053584_V2
> 
> Igor Mammedov (3):
>   pci: expose TYPE_XIO3130_DOWNSTREAM name
>   acpi: pcihp: pcie: set power on cap on parent slot
>   q35: compat: keep hotplugged PCIe device broken after migration for
>     6.2 and older machine types
> 
>  include/hw/acpi/pcihp.h                    |  1 +
>  include/hw/pci-bridge/xio3130_downstream.h | 15 +++++++++++++++
>  include/hw/pci/pcie.h                      |  1 +
>  hw/acpi/ich9.c                             | 20 ++++++++++++++++++++
>  hw/acpi/pcihp.c                            | 15 ++++++++++++++-
>  hw/core/machine.c                          |  4 +++-
>  hw/pci-bridge/xio3130_downstream.c         |  3 ++-
>  hw/pci/pcie.c                              | 11 +++++++++++
>  8 files changed, 67 insertions(+), 3 deletions(-)
>  create mode 100644 include/hw/pci-bridge/xio3130_downstream.h
> 
> -- 
> 2.31.1



      parent reply	other threads:[~2022-03-01 15:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01 15:11 [PATCH v2 0/3] Fix broken PCIe device after migration Igor Mammedov
2022-03-01 15:11 ` [PATCH v2 1/3] pci: expose TYPE_XIO3130_DOWNSTREAM name Igor Mammedov
2022-03-01 15:11 ` [PATCH v2 2/3] acpi: pcihp: pcie: set power on cap on parent slot Igor Mammedov
2022-03-01 15:12 ` [PATCH v2 3/3] q35: compat: keep hotplugged PCIe device broken after migration for 6.2 and older machine types Igor Mammedov
2022-03-01 15:20   ` Michael S. Tsirkin
2022-03-02  7:51     ` Igor Mammedov
2022-03-01 15:20 ` Michael S. Tsirkin [this message]

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=20220301102014-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@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.