<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 15.03.2025 13:59, Michal Wajdeczko
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <pre wrap="" class="moz-quote-pre">On 14.03.2025 23:11, Lis, Tomasz wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">On 14.03.2025 21:46, Michal Wajdeczko wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="" class="moz-quote-pre">On 06.03.2025 23:21, Tomasz Lis wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">During post-migration recovery of a VF, it is necessary to update
GGTT references included in messages which are going to be sent
to GuC. GuC will start consuming messages after VF KMD will inform
it about fixups being done; before that, the VF KMD is expected
to update any H2G messages which are already in send buffer but
were not consumed by GuC.

Only a small subset of messages allowed for VFs have GGTT references
in them. This patch adds the functionality to parse the CTB send
ring buffer and shift addresses contained within.

While fixing the CTB content, ct->lock is not taken. This means
the only barrier taken remains GGTT address lock - which is ok,
because only requests with GGTT addresses matter, but it also means
tail changes can happen during the CTB fixups execution (which may
be ignored as any new messages will not have anything to fix).

The GGTT address locking will be introduced in a future series.

v2: removed storing shift as that's now done in VMA nodes patch;
   macros to inlines; warns to asserts; log messages fixes (Michal)
v3: Removed inline keywords, enums for offsets in CTB messages,
  less error messages, if return unused then made functs void (Michal)
v4: Update the cached head before starting fixups

Signed-off-by: Tomasz Lis<a class="moz-txt-link-rfc2396E" href="mailto:tomasz.lis@intel.com"><tomasz.lis@intel.com></a>
---
  drivers/gpu/drm/xe/abi/guc_actions_abi.h |   7 ++
  drivers/gpu/drm/xe/xe_guc_ct.c           | 147 +++++++++++++++++++++++
  drivers/gpu/drm/xe/xe_guc_ct.h           |   2 +
  drivers/gpu/drm/xe/xe_guc_submit.c       |   4 +
  drivers/gpu/drm/xe/xe_sriov_vf.c         |  18 +++
  5 files changed, 178 insertions(+)

diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/
drm/xe/abi/guc_actions_abi.h
index ec516e838ee8..dde6cb5a6be9 100644
--- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h
+++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h
@@ -160,6 +160,13 @@ enum xe_guc_preempt_options {
      XE_GUC_PREEMPT_OPTION_DROP_SUBMIT_Q = 0x8,
  };
  +enum xe_guc_register_context_multi_lrc_param_offsets {
+    XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_WQ_DESC = 5,
+    XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_WQ_BASE = 7,
+    XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_N_CHILDREN = 10,
+    XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_HWLRCA = 11
+};
+
  enum xe_guc_report_status {
      XE_GUC_REPORT_STATUS_UNKNOWN = 0x0,
      XE_GUC_REPORT_STATUS_ACKED = 0x1,
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/
xe_guc_ct.c
index 72ad576fc18e..6f19bf9565ba 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -84,6 +84,8 @@ struct g2h_fence {
      bool done;
  };
  +#define make_u64(hi, lo) ((u64)((u64)(u32)(hi) << 32 | (u32)(lo)))
+
  static void g2h_fence_init(struct g2h_fence *g2h_fence, u32
*response_buffer)
  {
      g2h_fence->response_buffer = response_buffer;
@@ -1622,6 +1624,151 @@ static void g2h_worker_func(struct
work_struct *w)
      receive_g2h(ct);
  }
  +static u32 ctb_read32(struct xe_device *xe, struct iosys_map *cmds,
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">maybe to make this function more "ctb", pass ctb instead xe?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">You mean `struct xe_guc_ct *ct`?

I don't understand, why would we do this? We don't even need `ct` there.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">if it doesn't need 'ct' then don't use 'ctb' prefix</pre>
    </blockquote>
    ok, will change.<br>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">That would just add another `ct_to_xe(ct)`.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">maybe not another, but just moved, as then the caller doesn't need to
have it

</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">If we're adjusting parameters to what looks nicer rather than what is
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">it's not always just about the look, but it's about proper layering

</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">really necessary, then why `xe_map_memcpy_from` accepts `xe` and not a
`bo`?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">feel free to ask authors, this was introduced (without review) as part
of the initial Xe commit dd08ebf6c352

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+                 u32 head, u32 pos)
+{
+    u32 msg[1];
+
+    xe_map_memcpy_from(xe, msg, cmds, (head + pos) * sizeof(u32),
+               1 * sizeof(u32));
+    return msg[0];
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">and looks almost like our deprecated xe_map_read32 ;)
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">yes, it does look similar. But I assume we don't want to reuse that?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">well, it depends.

since it is already there, IMO we should use it.

OTOH, during some other review it was said that maybe the whole xe_map
layer will go away, so then no need to use it, but equally, no need to
use _any_ of other xe_map wrappers, so need for having a xe is also gone

but as there are no signs that xe_map will be removed, we should
continue to reuse existing code

unless @Lucas has some more recent news</pre>
    </blockquote>
    ok, will use `xe_map_rd()`.<br>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+}
+
+static void ctb_fixup64(struct xe_device *xe, struct iosys_map *cmds,
+                   u32 head, u32 pos, s64 shift)
+{
+    u32 msg[2];
+    u64 offset;
+
+    xe_map_memcpy_from(xe, msg, cmds, (head + pos) * sizeof(u32),
+               2 * sizeof(u32));
+    offset = make_u64(msg[1], msg[0]);
+    offset += shift;
+    msg[0] = lower_32_bits(offset);
+    msg[1] = upper_32_bits(offset);
+    xe_map_memcpy_to(xe, cmds, (head + pos) * sizeof(u32), msg, 2 *
sizeof(u32));
+}
+
+/*
+ * ct_update_addresses_in_message - Shift any GGTT addresses within
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">nit: as this is *not* a real kernel-doc, then maybe drop function name
and keep only description plus params?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">will do, even though I don't know why we break the sibling rules which
could be easily kept.

</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+ * a single message left within CTB from before post-migration
recovery.
+ * @ct: pointer to CT struct of the target GuC
+ * @cmds: iomap buffer containing CT messages
+ * @head: start of the target message within the buffer
+ * @len: length of the target message
+ * @size: size of the commands buffer
+ * @shift: the address shift to be added to each GGTT reference
+ */
+static void ct_update_addresses_in_message(struct xe_guc_ct *ct,
+                       struct iosys_map *cmds, u32 head,
+                       u32 len, u32 size, s64 shift)
+{
+    struct xe_device *xe = ct_to_xe(ct);
+    u32 action, i, n;
+    u32 msg[1];
+
+    xe_map_memcpy_from(xe, msg, cmds, head * sizeof(u32),
+               1 * sizeof(u32));
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">ctb_read32() didn't work here?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">It would. For G2H and H2G messages we always use FIELD_GET on an array,
and field name contains index in that array.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">hmm, not sure if I follow here... what was wrong with:

        msg = ctb_read32(...)
or
        msg = xe_map_read32(...)

you could still use FIELD_GET from the 'msg' var</pre>
    </blockquote>
    <p>As I explained, currently FIELD_GET is consistently called on an
      array. To confirm, use:<br>
    </p>
    <p>```</p>
    <p>$ grep -R  'FIELD_GET[\(]' drivers/gpu/drm/xe/xe_guc_ct.c<br>
    </p>
    <p>```</p>
    <p>You will find either `hxg[0]` or `msg[0]` in all lines.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">So, I consider this way of writing it more standard within Xe, and
therefore easier to understand. Though no strong opinion - let me know
if you want this changed.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">but then you are little inconsistent, you defined new helper but then
decided to access data without it</pre>
    </blockquote>
    <p>The helper was defined on your request:</p>
    <p><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:TrackMoves/>
  <w:TrackFormatting/>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-US</w:LidThemeOther>
  <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:EnableOpenTypeKerning/>
   <w:DontFlipMirrorIndents/>
   <w:OverrideTableStyleHps/>
  </w:Compatibility>
  <w:DoNotOptimizeForBrowser/>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="--"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
  DefSemiHidden="false" DefQFormat="false" DefPriority="99"
  LatentStyleCount="376">
  <w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 5"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 6"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 7"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 8"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index 9"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" Name="toc 9"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Normal Indent"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="footnote text"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="annotation text"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="header"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="footer"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="index heading"/>
  <w:LsdException Locked="false" Priority="35" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="table of figures"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="envelope address"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="envelope return"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="footnote reference"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="annotation reference"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="line number"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="page number"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="endnote reference"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="endnote text"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="table of authorities"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="macro"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="toa heading"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Bullet"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Number"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List 5"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Bullet 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Bullet 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Bullet 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Bullet 5"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Number 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Number 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Number 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Number 5"/>
  <w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Closing"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Signature"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="true"
   UnhideWhenUsed="true" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text Indent"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Continue"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Continue 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Continue 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Continue 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="List Continue 5"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Message Header"/>
  <w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Salutation"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Date"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text First Indent"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text First Indent 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Note Heading"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text Indent 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Body Text Indent 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Block Text"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Hyperlink"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="FollowedHyperlink"/>
  <w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Document Map"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Plain Text"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="E-mail Signature"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Top of Form"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Bottom of Form"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Normal (Web)"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Acronym"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Address"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Cite"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Code"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Definition"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Keyboard"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Preformatted"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Sample"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Typewriter"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="HTML Variable"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Normal Table"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="annotation subject"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="No List"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Outline List 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Outline List 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Outline List 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Simple 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Simple 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Simple 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Classic 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Classic 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Classic 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Classic 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Colorful 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Colorful 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Colorful 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Columns 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Columns 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Columns 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Columns 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Columns 5"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 5"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 6"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 7"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Grid 8"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 4"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 5"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 6"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 7"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table List 8"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table 3D effects 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table 3D effects 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table 3D effects 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Contemporary"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Elegant"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Professional"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Subtle 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Subtle 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Web 1"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Web 2"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Web 3"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Balloon Text"/>
  <w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Table Theme"/>
  <w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" QFormat="true"
   Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" QFormat="true"
   Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" QFormat="true"
   Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" QFormat="true"
   Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" QFormat="true"
   Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" QFormat="true"
   Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" SemiHidden="true"
   UnhideWhenUsed="true" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" SemiHidden="true"
   UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
  <w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
  <w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
  <w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
  <w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
  <w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
  <w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
  <w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
  <w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
  <w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
  <w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
  <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
  <w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
  <w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
  <w:LsdException Locked="false" Priority="46"
   Name="Grid Table 1 Light Accent 1"/>
  <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
  <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
  <w:LsdException Locked="false" Priority="51"
   Name="Grid Table 6 Colorful Accent 1"/>
  <w:LsdException Locked="false" Priority="52"
   Name="Grid Table 7 Colorful Accent 1"/>
  <w:LsdException Locked="false" Priority="46"
   Name="Grid Table 1 Light Accent 2"/>
  <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
  <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
  <w:LsdException Locked="false" Priority="51"
   Name="Grid Table 6 Colorful Accent 2"/>
  <w:LsdException Locked="false" Priority="52"
   Name="Grid Table 7 Colorful Accent 2"/>
  <w:LsdException Locked="false" Priority="46"
   Name="Grid Table 1 Light Accent 3"/>
  <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
  <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
  <w:LsdException Locked="false" Priority="51"
   Name="Grid Table 6 Colorful Accent 3"/>
  <w:LsdException Locked="false" Priority="52"
   Name="Grid Table 7 Colorful Accent 3"/>
  <w:LsdException Locked="false" Priority="46"
   Name="Grid Table 1 Light Accent 4"/>
  <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
  <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
  <w:LsdException Locked="false" Priority="51"
   Name="Grid Table 6 Colorful Accent 4"/>
  <w:LsdException Locked="false" Priority="52"
   Name="Grid Table 7 Colorful Accent 4"/>
  <w:LsdException Locked="false" Priority="46"
   Name="Grid Table 1 Light Accent 5"/>
  <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
  <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
  <w:LsdException Locked="false" Priority="51"
   Name="Grid Table 6 Colorful Accent 5"/>
  <w:LsdException Locked="false" Priority="52"
   Name="Grid Table 7 Colorful Accent 5"/>
  <w:LsdException Locked="false" Priority="46"
   Name="Grid Table 1 Light Accent 6"/>
  <w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
  <w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
  <w:LsdException Locked="false" Priority="51"
   Name="Grid Table 6 Colorful Accent 6"/>
  <w:LsdException Locked="false" Priority="52"
   Name="Grid Table 7 Colorful Accent 6"/>
  <w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
  <w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
  <w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
  <w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
  <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
  <w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
  <w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
  <w:LsdException Locked="false" Priority="46"
   Name="List Table 1 Light Accent 1"/>
  <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
  <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
  <w:LsdException Locked="false" Priority="51"
   Name="List Table 6 Colorful Accent 1"/>
  <w:LsdException Locked="false" Priority="52"
   Name="List Table 7 Colorful Accent 1"/>
  <w:LsdException Locked="false" Priority="46"
   Name="List Table 1 Light Accent 2"/>
  <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
  <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
  <w:LsdException Locked="false" Priority="51"
   Name="List Table 6 Colorful Accent 2"/>
  <w:LsdException Locked="false" Priority="52"
   Name="List Table 7 Colorful Accent 2"/>
  <w:LsdException Locked="false" Priority="46"
   Name="List Table 1 Light Accent 3"/>
  <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
  <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
  <w:LsdException Locked="false" Priority="51"
   Name="List Table 6 Colorful Accent 3"/>
  <w:LsdException Locked="false" Priority="52"
   Name="List Table 7 Colorful Accent 3"/>
  <w:LsdException Locked="false" Priority="46"
   Name="List Table 1 Light Accent 4"/>
  <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
  <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
  <w:LsdException Locked="false" Priority="51"
   Name="List Table 6 Colorful Accent 4"/>
  <w:LsdException Locked="false" Priority="52"
   Name="List Table 7 Colorful Accent 4"/>
  <w:LsdException Locked="false" Priority="46"
   Name="List Table 1 Light Accent 5"/>
  <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
  <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
  <w:LsdException Locked="false" Priority="51"
   Name="List Table 6 Colorful Accent 5"/>
  <w:LsdException Locked="false" Priority="52"
   Name="List Table 7 Colorful Accent 5"/>
  <w:LsdException Locked="false" Priority="46"
   Name="List Table 1 Light Accent 6"/>
  <w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
  <w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
  <w:LsdException Locked="false" Priority="51"
   Name="List Table 6 Colorful Accent 6"/>
  <w:LsdException Locked="false" Priority="52"
   Name="List Table 7 Colorful Accent 6"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Mention"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Smart Hyperlink"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Hashtag"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Unresolved Mention"/>
  <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
   Name="Smart Link"/>
 </w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-priority:99;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;
        mso-ascii-font-family:Aptos;
        mso-ascii-theme-font:minor-latin;
        mso-hansi-font-family:Aptos;
        mso-hansi-theme-font:minor-latin;
        mso-font-kerning:1.0pt;
        mso-ligatures:standardcontextual;}
</style>
<![endif]--> </p>
    <p class="MsoPlainText">> those macros are quite ugly and
      violating many rules maybe they should be converted into inlines?</p>
    <p class="MsoPlainText">I did not intended to have such helper.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+    action = FIELD_GET(GUC_HXG_REQUEST_MSG_0_ACTION, msg[0]);
+    switch (action) {
+    case XE_GUC_ACTION_REGISTER_CONTEXT:
+    case XE_GUC_ACTION_REGISTER_CONTEXT_MULTI_LRC:
+        /* field wq_desc */
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">as we have enums that describe field offsets, we don't need to add those
small now redundant comments
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">will remove.
</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+        ctb_fixup64(xe, cmds, head,
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_WQ_DESC, shift);
+        /* field wq_base */
+        ctb_fixup64(xe, cmds, head,
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_WQ_BASE, shift);
+        if (action == XE_GUC_ACTION_REGISTER_CONTEXT_MULTI_LRC) {
+            /* field number_children */
+            n = ctb_read32(xe, cmds, head,
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_N_CHILDREN);
+            /* field hwlrca and child lrcas */
+            for (i = 0; i < n; i++)
+                ctb_fixup64(xe, cmds, head,
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_HWLRCA + 2 * i, shift);
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">did you run checkpatch.pl ? line is quite long
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">it does complain. Will fix.
</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+        } else {
+            /* field hwlrca */
+            ctb_fixup64(xe, cmds, head, 10, shift);
+        }
+        break;
+    default:
+        break;
+    }
+}
+
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">nit: no short description here ;)
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">why would it need one? sub-function (ct_update_addresses_in_message) has
documentation, caller also has documentation.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">well, it was just inconsistency, in other places you seems to add
documentation even if there is no</pre>
    </blockquote>
    <p>Functions which need documentation are documented. This is not an
      inconsistency, this is</p>
    <p>context based decision which completely aligns with both kernel
      documentation rules and recommendations.</p>
    <p>What is inconsistent is using custom documentation format, not
      defined in any kernel guides.</p>
    <p>If we want a function doc to not be visible by kernel-doc
      parsers, it makes total sense to skip the one</p>
    <p>asterisk to make it treated as an ordinary comment. But following
      that by also changing format of</p>
    <p>the comment into some custom idea, that is questionable and
      inconsistent with existing rules.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+static int ct_update_addresses_in_buffer(struct xe_guc_ct *ct,
+                     struct guc_ctb *h2g,
+                     s64 shift, u32 *mhead, s32 avail)
+{
+    struct xe_device *xe = ct_to_xe(ct);
+    u32 head = *mhead;
+    u32 size = h2g->info.size;
+    u32 msg[1];
+    u32 len;
+
+    /* Read header */
+    xe_map_memcpy_from(xe, msg, &h2g->cmds, sizeof(u32) * head,
+               sizeof(u32));
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">ctb_read32() didn't work here?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">Like before, for consistency. Will change on request.
</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+    len = FIELD_GET(GUC_CTB_MSG_0_NUM_DWORDS, msg[0]) +
GUC_CTB_MSG_MIN_LEN;
+
+    if (unlikely(len > (u32)avail)) {
+        struct xe_gt *gt = ct_to_gt(ct);
</pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">btw, no need to have local var here, since you can do ct_to_gt()
directly in the xe_gt_err() below (it's the only use case)</pre>
    </blockquote>
    will change.<br>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+
+        xe_gt_err(gt, "H2G channel broken on read, avail=%d, len=%d,
fixups skipped\n",
+              avail, len);
+        return 0;
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">in caller we do mark ctb as broken, why are we silent here?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">Incorrect head/tail of a CTB is an issue of completely different caliber
than a message with invalid length.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">not sure if those errors are that different.
see CTB descriptor status codes:

        GUC_CTB_STATUS_OVERFLOW
        GUC_CTB_STATUS_UNDERFLOW

which are used exactly to classify those kind of errors

if we are able to read msg header from the CTB but there is no payload
data on CTB then it's a CTB protocol bug</pre>
    </blockquote>
    <p>We are not in CTB write function, we are fixing the existing CTB
      messages,</p>
    <p>stored there by the CTB write function.</p>
    <p>But this situation should never happen anyway, so I don't have
      any reason to push</p>
    <p>a specific solution. Just write how you want this handled, and I
      will adjust the code.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">The invalid message is actually more likely to be a racing condition
rather than CTB damage.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">racing with what?</pre>
    </blockquote>
    <p>With CTB write function changing the tail, and GuC changing the
      head.</p>
    <p>Both should be normally locked/stalled of course, but there are
      corner cases,</p>
    <p>around migrating again just after vcpu started from previous
      migration.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+    }
+
+    head = (head + 1) % size;
+    ct_update_addresses_in_message(ct, &h2g->cmds, head, len - 1,
size, shift);
+    *mhead = (head + len - 1) % size;
+
+    return avail - len;
+}
+
+/**
+ * xe_guc_ct_fixup_messages_with_ggtt - Fixup any pending H2G CTB
messages by updating
+ * GGTT offsets in their payloads.
+ * @ct: pointer to CT struct of the target GuC
+ * @ggtt_shift: shift to be added to all GGTT addresses within the CTB
+ */
+void xe_guc_ct_fixup_messages_with_ggtt(struct xe_guc_ct *ct, s64
ggtt_shift)
+{
+    struct xe_guc *guc = ct_to_guc(ct);
+    struct xe_gt *gt = guc_to_gt(guc);
+    struct guc_ctb *h2g = &ct->ctbs.h2g;
+    u32 head, tail, size;
+    s32 avail;
+
+    if (unlikely(h2g->info.broken))
+        return;
+
+    h2g->info.head = desc_read(ct_to_xe(ct), h2g, head);
+    head = h2g->info.head;
+    tail = READ_ONCE(h2g->info.tail);
+    size = h2g->info.size;
+
+    xe_gt_assert(gt, head <= size);
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">we shouldn't trust GuC, assert is not enough
goto corrupted; if this happens
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">ok.
</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+
+    if (unlikely(tail >= size))
+        goto corrupted;
+
+    avail = tail - head;
+
+    /* beware of buffer wrap case */
+    if (unlikely(avail < 0))
+        avail += size;
+    xe_gt_dbg(gt, "available %d (%u:%u:%u)\n", avail, head, tail,
size);
+    xe_gt_assert(gt, avail >= 0);
+
+    while (avail > 0)
+        avail = ct_update_addresses_in_buffer(ct, h2g, ggtt_shift,
&head, avail);
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">maybe pass &avail like you did with head?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">do we have a precedence for this approach being preferred?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">I'm not sure what you are looking for..

my point is that it looks inconsistent that one in/out param is passed
by pointer, the other by value and then it's new value is returned</pre>
    </blockquote>
    <p>No, that is one of normal approaches. Inconsistent with what?</p>
    <p>It is actually consistent with how we handle such situation
      currently in xe,</p>
    <p>for example timeout value in `dma_fence_wait_timeout()`.</p>
    <p>That only one value can be returned this way is a fact embedded
      into C calling</p>
    <p>conventions and basic design of C functions, having only one
      value returned by</p>
    <p>a function is consistent with C language specification.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <pre wrap="" class="moz-quote-pre">if you pass both by ptr then you can use return value to indicate some
error condition (which seems to be already there but silenced by
returning 'no-avail')</pre>
    </blockquote>
    <p>If you want the function to also return negative error codes and
      handle them here,</p>
    <p>let me know and I'll do it. This has no impact on the ability of
      returning `avail` value.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+
+    return;
+
+corrupted:
+    xe_gt_err(gt, "Corrupted H2G descriptor head=%u tail=%u size=%u\n",
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">shouldn't we mention that "fixups can't be done" ?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">Makes sense, the messages will be still received by GuC after all. Will
change.
</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+         head, tail, size);
+    h2g->info.broken = true;
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">returning an error code wouldn't really hurt ...
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">Since when do we return error codes which are not going to be used?
Didn't you asked for a change to `void` in previous round of the review?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">if code can fail and caller might make some decision based on the
success/failure then IMO we should return error code

if the code can't fail, then it should be void

but right now I just can't judge which scenarios that you implemented
could fail just because of our coding mistakes, where asserts() would be
sufficient to cover them, vs real scenarios that we should treat as
serious recovery failures</pre>
    </blockquote>
    <p>Ok, so we agree it should be void.<br>
    </p>
    <p>I don't see any scenario where the xe kmd is expected to bail out
      in the middle of fixups procedure.</p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="" class="moz-quote-pre">+    for_each_gt(gt, xe, id) {
+        struct xe_gt_sriov_vf_selfconfig *config = &gt-
</pre>
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">sriov.vf.self_config;
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">+
+        xe_guc_ct_update_addresses(&gt->uc.guc.ct, config->ggtt_shift);
</pre>
        </blockquote>
        <blockquote type="cite">
          <pre wrap="" class="moz-quote-pre">this function returns int, shouldn't we check for errors?
if not then maybe make it void
</pre>
        </blockquote>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+}
+
  static struct xe_guc_ct_snapshot *guc_ct_snapshot_alloc(struct
xe_guc_ct *ct, bool atomic,
                              bool want_ctb)
  {
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.h b/drivers/gpu/drm/xe/
xe_guc_ct.h
index 82c4ae458dda..5649bda82823 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.h
+++ b/drivers/gpu/drm/xe/xe_guc_ct.h
@@ -22,6 +22,8 @@ void xe_guc_ct_snapshot_print(struct
xe_guc_ct_snapshot *snapshot, struct drm_pr
  void xe_guc_ct_snapshot_free(struct xe_guc_ct_snapshot *snapshot);
  void xe_guc_ct_print(struct xe_guc_ct *ct, struct drm_printer *p,
bool want_ctb);
  +void xe_guc_ct_fixup_messages_with_ggtt(struct xe_guc_ct *ct, s64
ggtt_shift);
+
  static inline bool xe_guc_ct_enabled(struct xe_guc_ct *ct)
  {
      return ct->state == XE_GUC_CT_STATE_ENABLED;
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/
xe_guc_submit.c
index b95934055f72..4442fb00d0aa 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -469,12 +469,16 @@ static void __register_mlrc_exec_queue(struct
xe_guc *guc,
      action[len++] = info->context_idx;
      action[len++] = info->engine_class;
      action[len++] = info->engine_submit_mask;
+    xe_gt_assert(guc_to_gt(guc), len ==
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_WQ_DESC);
      action[len++] = info->wq_desc_lo;
      action[len++] = info->wq_desc_hi;
+    xe_gt_assert(guc_to_gt(guc), len ==
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_WQ_BASE);
      action[len++] = info->wq_base_lo;
      action[len++] = info->wq_base_hi;
      action[len++] = info->wq_size;
+    xe_gt_assert(guc_to_gt(guc), len ==
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_N_CHILDREN);
      action[len++] = q->width;
+    xe_gt_assert(guc_to_gt(guc), len ==
XE_GUC_REGISTER_CONTEXT_MULTI_LRC_OFFS_HWLRCA);
      action[len++] = info->hwlrca_lo;
      action[len++] = info->hwlrca_hi;
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">nit: maybe this chunk, together with introduction of above enums, should
be a separate patch?
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">Ok, can do that. It was introduced on your request, after all.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">but I didn't say it has to be all done in single patch

if some changes are logically independent they deserve a separate patch

this is also to help getting reviews sooner as patches will be smaller

[1]
<a class="moz-txt-link-freetext" href="https://docs.kernel.org/process/submitting-patches.html#separate-your-changes">https://docs.kernel.org/process/submitting-patches.html#separate-your-changes</a></pre>
    </blockquote>
    ack.<br>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">  diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/
xe_sriov_vf.c
index 4ee8fc70a744..cd759579b9b4 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
@@ -10,6 +10,7 @@
  #include "xe_gt.h"
  #include "xe_gt_sriov_printk.h"
  #include "xe_gt_sriov_vf.h"
+#include "xe_guc_ct.h"
  #include "xe_pm.h"
  #include "xe_sriov.h"
  #include "xe_sriov_printk.h"
@@ -158,6 +159,20 @@ static int vf_post_migration_requery_guc(struct
xe_device *xe)
      return ret;
  }
  +static void vf_post_migration_fixup_ctb(struct xe_device *xe)
+{
+    struct xe_gt *gt;
+    unsigned int id;
+
+    xe_assert(xe, IS_SRIOV_VF(xe));
+
+    for_each_gt(gt, xe, id) {
+        struct xe_gt_sriov_vf_selfconfig *config = &gt-
</pre>
            <blockquote type="cite">
              <pre wrap="" class="moz-quote-pre">sriov.vf.self_config;
</pre>
            </blockquote>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">instead of open coding just add a helper to query the ggtt_shift

    s64 xe_gt_sriov_vf_ggtt_shift(gt) { }
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">This is already a small function so I can't say I see the point. But
sure, can do that.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">the point is that in the 'xe' level function you are directly accessing
a VF internal field stored deep under 'gt.sriov.vf.self_config' structure</pre>
    </blockquote>
    <p>a static function, starting with `vf_*` and stored within a file
      ending with `_vf`, is a 'xe' level function. Ok.<br>
    </p>
    <p>I will define the helper as requested, and let's just leave it at
      that.<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+
+        xe_guc_ct_fixup_messages_with_ggtt(&gt->uc.guc.ct, config-
</pre>
            <blockquote type="cite">
              <pre wrap="" class="moz-quote-pre">ggtt_shift);
</pre>
            </blockquote>
            <pre wrap="" class="moz-quote-pre">+    }
+}
+
  /*
   * vf_post_migration_imminent - Check if post-restore recovery is
coming.
   * @xe: the &xe_device struct instance
@@ -224,6 +239,9 @@ static void vf_post_migration_recovery(struct
xe_device *xe)
        err = vf_post_migration_fixup_ggtt_nodes(xe);
      /* FIXME: add the recovery steps */
+    if (err != ENODATA)
+        vf_post_migration_fixup_ctb(xe);
+
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">do we need to have for_each_gt inside every step?
maybe the loop should be here?

for_each_tile() {
    shift = vf_reset_ggtt_shift(tile->primary_gt)
    if (shift) {
        vf_fixup_nodes(tile)
        vf_fixup_ctb(tile->primary_gt)
        if (tile->media_gt)
            vf_fixup_ctb(tile->media_gt)
    }
}
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">What is the benefit? Doesn't the current code look cleaner?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">IMO current code access self_config.ggtt_shift from too many places</pre>
    </blockquote>
    <p>Why would that be a problem? Where exactly is a precedence for
      avoiding</p>
    <p>access of such a variable? If we didn't wanted to access it, we
      would make it</p>
    <p>local from the beginning.</p>
    <p>We do have `<span style="white-space: pre-wrap">xe_gt_sriov_vf_ggtt_shift()` now, so we can use that.</span></p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">Isn't it better when all drm_mm nodes are fixed at the point we start
applying fixups to other places?
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">hmm, ok, so do we expect that there could be cross-tile references to
the other tile GGTT? if yes, do we have at least asserts that can
confirm that we are not doing fixups on the tile with un-shifted ggtt nodes?</pre>
    </blockquote>
    <p>We are shifting all the nodes of all tiles at start. Are you
      saying we then should check</p>
    <p>if the nodes were really shifted? Why this specific operation
      requires such strong verification?</p>
    <p>Do we expect iterating through tiles to be an operation which
      changes at runtime?</p>
    <p><br>
    </p>
    <p>The fact that further fixups are preceded by  drm_mm node fixups
      is enforced by code flow.</p>
    <p>If you think there should be additional asserts, please describe
      where and what the condition should be.</p>
    <p>A check whether first balloon ends at config->ggtt_base
      wouldn't make much sense.</p>
    <p>-Tomasz<br>
    </p>
    <blockquote type="cite" cite="mid:bbdffe55-a658-43be-b46a-5f1c9846daeb@intel.com">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">I don't think it's a good idea.

-Tomasz

</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">      vf_post_migration_notify_resfix_done(xe);
      xe_pm_runtime_put(xe);
      drm_notice(&xe->drm, "migration recovery ended\n");
</pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
  </body>
</html>