On 6/20/2025 3:05 AM, Loktionov, Aleksandr wrote:
>
>
>> -----Original Message-----
>> From: Intel-wired-lan <[email protected]> On Behalf
>> Of Jacob Keller
>> Sent: Thursday, June 19, 2025 12:25 AM
>> To: Intel Wired LAN <[email protected]>
>> Cc: Keller, Jacob E <[email protected]>;
>> [email protected]; Chittim, Madhu <[email protected]>; Cao,
>> Yahui <[email protected]>; Nguyen, Anthony L
>> <[email protected]>; Kitszel, Przemyslaw
>> <[email protected]>
>> Subject: [Intel-wired-lan] [PATCH iwl-next 2/8] ice: add functions to
>> get and set Tx queue context
>>
>> The live migration driver will need to save and restore the Tx queue
>> context state from the hardware registers. This state contains both
>> static fields which do not change during Tx traffic as well as dynamic
>> fields which may change during Tx traffic.
>>
>> Unlike the Rx context, the Tx queue context is accessed indirectly
>> from GLCOMM_QTX_CNTX_CTL and GLCOMM_QTX_CNTX_DATA registers. These
>> registers are shared by multiple PFs on the same PCIe card. Multiple
>> PFs cannot safely access the registers simultaneously, and there is no
>> hardware semaphore or logic to control access. To handle this,
>> introduce the txq_ctx_lock to the ice_adapter structure. This is
>> similar to the ptp_gltsyn_time_lock. All PFs on the same adapter share
>> this structure, and use it to serialize access to the registers to
>> prevent error.
> Is the solution compatible if different PF ports are passed through to
> different VMs?
>
No, but no software solution here would be. This should work if you pass
both PFs to the same VM, but without some sort of cross-host connection
you would not be able to handle this in software.
I think everything related to ice_adapter pretty much requires that you
assign all PFs to the same VM.
We do not have a hardware solution here so this is the best we can do
right now.