From: Jacob Keller <jacob.e.keller@intel.com>
To: <intel-wired-lan@osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 08/12] ice: Save and load RX Queue head
Date: Thu, 18 Jan 2024 14:17:17 -0800 [thread overview]
Message-ID: <31a0c669-e5a7-4313-a414-f35d5efe49cb@intel.com> (raw)
In-Reply-To: <BN9PR11MB5276771D5FB2D3CDAC3A70348C8AA@BN9PR11MB5276.namprd11.prod.outlook.com>
On 12/7/2023 6:53 PM, Tian, Kevin wrote:
>> From: Jason Gunthorpe <jgg@nvidia.com>
>> Sent: Thursday, December 7, 2023 10:46 PM
>>
>> On Thu, Dec 07, 2023 at 07:55:17AM +0000, Tian, Kevin wrote:
>>>> From: Cao, Yahui <yahui.cao@intel.com>
>>>> Sent: Tuesday, November 21, 2023 10:51 AM
>>>>
>>>> +
>>>> + /* Once RX Queue is enabled, network traffic may come in at
>>>> any
>>>> + * time. As a result, RX Queue head needs to be loaded
>>>> before
>>>> + * RX Queue is enabled.
>>>> + * For simplicity and integration, overwrite RX head just after
>>>> + * RX ring context is configured.
>>>> + */
>>>> + if (msg_slot->opcode == VIRTCHNL_OP_CONFIG_VSI_QUEUES)
>>>> {
>>>> + ret = ice_migration_load_rx_head(vf, devstate);
>>>> + if (ret) {
>>>> + dev_err(dev, "VF %d failed to load rx head\n",
>>>> + vf->vf_id);
>>>> + goto out_clear_replay;
>>>> + }
>>>> + }
>>>> +
>>>
>>> Don't we have the same problem here as for TX head restore that the
>>> vfio migration protocol doesn't carry a way to tell whether the IOAS
>>> associated with the device has been restored then allowing RX DMA
>>> at this point might cause device error?
>>
>> Does this trigger a DMA?
>
> looks yes from the comment
>
>>
>>> @Jason, is it a common gap applying to all devices which include a
>>> receiving path from link? How is it handled in mlx migration
>>> driver?
>>
>> There should be no DMA until the device is placed in RUNNING. All
>> devices may instantly trigger DMA once placed in RUNNING.
>>
>> The VMM must ensure the entire environment is ready to go before
>> putting anything in RUNNING, including having setup the IOMMU.
>>
>
> ah, yes. that is the right behavior.
>
> so if there is no other way to block DMA before RUNNING is reached,
> here the RX queue should be left disabled until when transitioning
> to RUNNING.
>
> Yahui, can you double check?
I think this will require us to ensure that the Rx queue restoration
happens later. I'm looking at refactoring the approach to use an
internal representation of VF state instead of a series of virtchnl
messages, and this should allow us to avoid enabling the Rx queue until
after we're ready for DMA.
next prev parent reply other threads:[~2024-01-18 22:17 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 2:50 [Intel-wired-lan] [PATCH iwl-next v4 00/12] Add E800 live migration driver Yahui Cao
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 01/12] ice: Add function to get RX queue context Yahui Cao
2023-12-08 22:01 ` Brett Creeley
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 02/12] ice: Add function to get and set TX " Yahui Cao
2023-12-08 22:14 ` Brett Creeley
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 03/12] ice: Introduce VF state ICE_VF_STATE_REPLAYING_VC for migration Yahui Cao
2023-12-08 22:28 ` Brett Creeley
2024-02-12 23:07 ` Jacob Keller
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 04/12] ice: Add fundamental migration init and exit function Yahui Cao
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 05/12] ice: Log virtual channel messages in PF Yahui Cao
2023-11-29 17:12 ` Simon Horman
2023-12-01 8:27 ` Cao, Yahui
2023-12-07 7:33 ` Tian, Kevin
2023-12-08 1:53 ` Brett Creeley
2024-01-18 22:14 ` Jacob Keller
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 06/12] ice: Add device state save/load function for migration Yahui Cao
2023-12-07 7:39 ` Tian, Kevin
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 07/12] ice: Fix VSI id in virtual channel message " Yahui Cao
2023-12-07 7:42 ` Tian, Kevin
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 08/12] ice: Save and load RX Queue head Yahui Cao
2023-12-07 7:55 ` Tian, Kevin
2023-12-07 14:46 ` Jason Gunthorpe
2023-12-08 2:53 ` Tian, Kevin
2024-01-18 22:17 ` Jacob Keller [this message]
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 09/12] ice: Save and load TX " Yahui Cao
2023-12-07 8:22 ` Tian, Kevin
2023-12-07 14:48 ` Jason Gunthorpe
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 10/12] ice: Add device suspend function for migration Yahui Cao
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 11/12] ice: Save and load mmio registers Yahui Cao
2023-11-21 2:51 ` [Intel-wired-lan] [PATCH iwl-next v4 12/12] vfio/ice: Implement vfio_pci driver for E800 devices Yahui Cao
2023-12-07 22:43 ` Alex Williamson
2023-12-08 3:42 ` Tian, Kevin
2023-12-08 3:42 ` Tian, Kevin
2023-12-04 11:18 ` [Intel-wired-lan] [PATCH iwl-next v4 00/12] Add E800 live migration driver Cao, Yahui
2024-01-18 22:09 ` Jacob Keller
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=31a0c669-e5a7-4313-a414-f35d5efe49cb@intel.com \
--to=jacob.e.keller@intel.com \
--cc=intel-wired-lan@osuosl.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