All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	"Liu, Yi L" <yi.l.liu@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"Burra, Phani R" <phani.r.burra@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next V2 10/15] ice: save and restore TX queue head
Date: Mon, 17 Jul 2023 17:43:34 -0400	[thread overview]
Message-ID: <ZLW2BgWI+yx7qKaf@x1n> (raw)
In-Reply-To: <ZKwpm1k+1hjN7oyE@nvidia.com>

On Mon, Jul 10, 2023 at 12:54:03PM -0300, Jason Gunthorpe wrote:
> On Tue, Jul 04, 2023 at 01:59:49PM -0400, Peter Xu wrote:
> 
> > > This sounds counter-intuitive even for emulated devices. vIOMMU is
> > > involved only when the device wants to access guest memory. But
> > > by definition the RESUMING path should just restore the device to
> > > the point where it is stopped. Why would such restore create a
> > > dependency on vIOMMU state?
> > 
> > For why QEMU migrates vIOMMU earlier than PCI generic devices, I can try to
> > repeat here: IIRC it's because some device needs dma translations during
> > post_load(), I forgot which device and why, but it can make some sense to
> > me if recovering states of the pci device may need help from a translation.
> 
> Well, it has nothing to do with VFIO given the timeframe, and if
> internal qemu devices are doing weird things like this it also
> suggests they have problems with P2P as well.
> 
> The VFIO definition we have is that a device may not do any DMA while in
> resuming/resuming_p2p, it is only allowed to initiate DMA once it
> fully reaches running.
> 
> Obviously we have to setup the vIOMMU before going to running.
> 
> The internal qemu devices must follow this definition as well or they
> are not P2P compatible.
> 
> About the only exception I could think is if some internal devices was
> caching translations for some purpose, but it really should setup that
> caching at entry to running..

Yes it's something like that which is a pure translation request, rather
than doing a real DMA, as far as I remember.  It does sound fine to
postpone that into a vm state change handler to me, but worth checking when
someone really works on it, and also whether it's feasible - e.g. hopefully
only a few devices need to work that around.

It may boil down to why we need to avoid migrating vIOMMU before other
devices (which I am still unsure about..), and which way is easier.

Thanks,

-- 
Peter Xu

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-07-17 22:22 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-21  9:10 [Intel-wired-lan] [PATCH iwl-next V2 00/15] Add E800 live migration driver Lingyu Liu
2023-06-21  9:10 ` [Intel-wired-lan] [PATCH iwl-next V2 01/15] ice: Fix missing legacy 32byte RXDID in the supported bitmap Lingyu Liu
2023-06-21  9:10 ` [Intel-wired-lan] [PATCH iwl-next V2 02/15] ice: add function to get rxq context Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 03/15] ice: check VF migration status before sending messages to VF Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 04/15] ice: add migration init field and helper functions Lingyu Liu
2023-06-21 13:35   ` Jason Gunthorpe
2023-06-27  7:50     ` Cao, Yahui
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 05/15] ice: save VF messages as device state Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 06/15] ice: save and restore " Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 07/15] ice: do not notify VF link state during migration Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 08/15] ice: change VSI id in virtual channel message after migration Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 09/15] ice: save and restore RX queue head Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 10/15] ice: save and restore TX " Lingyu Liu
2023-06-21 14:37   ` Jason Gunthorpe
2023-06-27  6:55     ` Tian, Kevin
2023-06-27  6:55       ` Tian, Kevin
2023-07-03  5:27       ` Cao, Yahui
2023-07-03  5:27         ` Cao, Yahui
2023-07-03 21:03         ` Jason Gunthorpe
2023-07-03 21:03           ` Jason Gunthorpe
2023-07-04  7:35           ` Tian, Kevin
2023-07-04  7:35             ` Tian, Kevin
2023-06-28  8:11     ` Liu, Yi L
2023-06-28 12:39       ` Jason Gunthorpe
2023-07-03 12:54         ` Liu, Yi L
2023-07-04  7:38           ` Tian, Kevin
2023-07-04 17:59             ` Peter Xu
2023-07-10 15:54               ` Jason Gunthorpe
2023-07-17 21:43                 ` Peter Xu [this message]
2023-07-18 15:38                   ` Jason Gunthorpe
2023-07-18 17:36                     ` Peter Xu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 11/15] ice: stop device before saving device states Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 12/15] ice: mask VF advanced capabilities if live migration is activated Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 13/15] vfio/ice: implement vfio_pci driver for E800 devices Lingyu Liu
2023-06-21 14:23   ` Jason Gunthorpe
2023-06-27  9:00     ` Liu, Lingyu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 14/15] vfio: Expose vfio_device_has_container() Lingyu Liu
2023-06-21  9:11 ` [Intel-wired-lan] [PATCH iwl-next V2 15/15] vfio/ice: support iommufd vfio compat mode Lingyu Liu
2023-06-21 14:40   ` Jason Gunthorpe
2023-06-27  8:09     ` Cao, Yahui

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=ZLW2BgWI+yx7qKaf@x1n \
    --to=peterx@redhat.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=phani.r.burra@intel.com \
    --cc=yi.l.liu@intel.com \
    /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.