All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] pci: disable migration of p2p bridge
Date: Wed, 22 Dec 2010 08:27:17 +0200	[thread overview]
Message-ID: <20101222062716.GC7814@redhat.com> (raw)
In-Reply-To: <ad4668c6482905c5c0f3c73bfbd9d58d449be04b.1292987590.git.yamahata@valinux.co.jp>

On Wed, Dec 22, 2010 at 12:13:43PM +0900, Isaku Yamahata wrote:
> Right now pcibus_get_dev_path() isn't migration save because
> bus number/secondary bus number are set by guest OS.
> So it can't be used reliably for qemu internal id.
> 
> For 0.14 release, disable p2p bridge migration at the moment.
> Once pcibus_get_dev_path() is fixed, this patch should be reverted.
> It will be addressed for 0.15 release.
> 
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>


Hmm, haven't looked into this deeply - can we do this in one place
when the bridge is created?

> ---
>  hw/apb_pci.c            |    9 +++++++++
>  hw/dec_pci.c            |    6 ++++++
>  hw/ioh3420.c            |    4 ++++
>  hw/xio3130_downstream.c |    4 ++++
>  hw/xio3130_upstream.c   |    4 ++++
>  5 files changed, 27 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/apb_pci.c b/hw/apb_pci.c
> index 84e9af7..c456d8d 100644
> --- a/hw/apb_pci.c
> +++ b/hw/apb_pci.c
> @@ -368,6 +368,11 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base,
>      qdev_init_nofail(&pci_dev->qdev);
>      *bus2 = pci_bridge_get_sec_bus(br);
>  
> +    /* TODO: p2p bridge migration. pcibus_get_dev_path() isn't migration-safe.
> +       remove this once p2p bridge migration is supported */
> +    register_device_unmigratable(&pci_dev->qdev, "pbm-bridge", &pci_dev->qdev);
> +
> +
>      pci_dev = pci_create_multifunction(d->bus, PCI_DEVFN(1, 1), true,
>                                     "pbm-bridge");
>      br = DO_UPCAST(PCIBridge, dev, pci_dev);
> @@ -376,6 +381,10 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base,
>      qdev_init_nofail(&pci_dev->qdev);
>      *bus3 = pci_bridge_get_sec_bus(br);
>  
> +    /* TODO: p2p bridge migration. pcibus_get_dev_path() isn't migration-safe.
> +       remove this once p2p bridge migration is supported */
> +    register_device_unmigratable(&pci_dev->qdev, "pbm-bridge", &pci_dev->qdev);
> +
>      return d->bus;
>  }
>  
> diff --git a/hw/dec_pci.c b/hw/dec_pci.c
> index bf88f2a..3710984 100644
> --- a/hw/dec_pci.c
> +++ b/hw/dec_pci.c
> @@ -86,6 +86,12 @@ PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn)
>      br = DO_UPCAST(PCIBridge, dev, dev);
>      pci_bridge_map_irq(br, "DEC 21154 PCI-PCI bridge", dec_map_irq);
>      qdev_init_nofail(&dev->qdev);
> +
> +    /* TODO: p2p bridge migration. pcibus_get_dev_path() isn't migration-safe.
> +       remove this once p2p bridge migration is supported */
> +    register_device_unmigratable(&dev->qdev, "dec-21154-p2p-bridge",
> +                                 &dev->qdev);
> +
>      return pci_bridge_get_sec_bus(br);
>  }
>  
> diff --git a/hw/ioh3420.c b/hw/ioh3420.c
> index 95adf09..b1a5c96 100644
> --- a/hw/ioh3420.c
> +++ b/hw/ioh3420.c
> @@ -188,6 +188,10 @@ PCIESlot *ioh3420_init(PCIBus *bus, int devfn, bool multifunction,
>      qdev_prop_set_uint16(qdev, "slot", slot);
>      qdev_init_nofail(qdev);
>  
> +    /* TODO: p2p bridge migration. pcibus_get_dev_path() isn't migration-safe.
> +       remove this once p2p bridge migration is supported */
> +    register_device_unmigratable(qdev, "ioh3420", qdev);
> +
>      return DO_UPCAST(PCIESlot, port, DO_UPCAST(PCIEPort, br, br));
>  }
>  
> diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c
> index 1a2d258..83394ab 100644
> --- a/hw/xio3130_downstream.c
> +++ b/hw/xio3130_downstream.c
> @@ -153,6 +153,10 @@ PCIESlot *xio3130_downstream_init(PCIBus *bus, int devfn, bool multifunction,
>      qdev_prop_set_uint16(qdev, "slot", slot);
>      qdev_init_nofail(qdev);
>  
> +    /* TODO: p2p bridge migration. pcibus_get_dev_path() isn't migration-safe.
> +       remove this once p2p bridge migration is supported */
> +    register_device_unmigratable(qdev, "x3130-downstream", qdev);
> +
>      return DO_UPCAST(PCIESlot, port, DO_UPCAST(PCIEPort, br, br));
>  }
>  
> diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c
> index 387bf6c..cbd126a 100644
> --- a/hw/xio3130_upstream.c
> +++ b/hw/xio3130_upstream.c
> @@ -134,6 +134,10 @@ PCIEPort *xio3130_upstream_init(PCIBus *bus, int devfn, bool multifunction,
>      qdev_prop_set_uint8(qdev, "port", port);
>      qdev_init_nofail(qdev);
>  
> +    /* TODO: p2p bridge migration. pcibus_get_dev_path() isn't migration-safe.
> +       remove this once p2p bridge migration is supported */
> +    register_device_unmigratable(qdev, "x3130-upstream", qdev);
> +
>      return DO_UPCAST(PCIEPort, br, br);
>  }
>  
> -- 
> 1.7.1.1

  reply	other threads:[~2010-12-22  6:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  3:13 [Qemu-devel] [PATCH] pci: disable migration of p2p bridge Isaku Yamahata
2010-12-22  6:27 ` Michael S. Tsirkin [this message]
2010-12-22  8:00   ` [Qemu-devel] " Isaku Yamahata
2010-12-22 10:54     ` Michael S. Tsirkin

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=20101222062716.GC7814@redhat.com \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yamahata@valinux.co.jp \
    /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.