€•7Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ%/translations/zh_CN/gpu/xe/xe_migrate”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/zh_TW/gpu/xe/xe_migrate”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/it_IT/gpu/xe/xe_migrate”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ja_JP/gpu/xe/xe_migrate”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ko_KR/gpu/xe/xe_migrate”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/sp_SP/gpu/xe/xe_migrate”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ*SPDX-License-Identifier: (GPL-2.0+ OR MIT)”h]”hŒ*SPDX-License-Identifier: (GPL-2.0+ OR MIT)”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒ?/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ Migrate Layer”h]”hŒ Migrate Layer”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hŒØThe XE migrate layer is used generate jobs which can copy memory (eviction), clear memory, or program tables (binds). This layer exists in every GT, has a migrate engine, and uses a special VM for all generated jobs.”h]”hŒØThe XE migrate layer is used generate jobs which can copy memory (eviction), clear memory, or program tables (binds). This layer exists in every GT, has a migrate engine, and uses a special VM for all generated jobs.”…””}”(hhËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K hh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒSpecial VM details”h]”hŒSpecial VM details”…””}”(hhÝhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhÚhŸNh NubhÊ)”}”(hŒêThe special VM is configured with a page structure where we can dynamically map BOs which need to be copied and cleared, dynamically map other VM's page table BOs for updates, and identity map the entire device's VRAM with 1 GB pages.”h]”hŒîThe special VM is configured with a page structure where we can dynamically map BOs which need to be copied and cleared, dynamically map other VM’s page table BOs for updates, and identity map the entire device’s VRAM with 1 GB pages.”…””}”(hhëhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h KhhÚubhÊ)”}”(hXECurrently the page structure consists of 32 physical pages with 16 being reserved for BO mapping during copies and clear, 1 reserved for kernel binds, several pages are needed to setup the identity mappings (exact number based on how many bits of address space the device has), and the rest are reserved user bind operations.”h]”hXECurrently the page structure consists of 32 physical pages with 16 being reserved for BO mapping during copies and clear, 1 reserved for kernel binds, several pages are needed to setup the identity mappings (exact number based on how many bits of address space the device has), and the rest are reserved user bind operations.”…””}”(hhúhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h KhhÚubhÊ)”}”(hŒTODO: Diagram of layout”h]”hŒTODO: Diagram of layout”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h KhhÚubeh}”(h]”Œspecial-vm-details”ah ]”h"]”Œspecial vm details”ah$]”h&]”uh1h´hh¶hžhhŸNh Nubhµ)”}”(hhh]”(hº)”}”(hŒ Bind jobs”h]”hŒ Bind jobs”…””}”(hj#hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj hŸNh NubhÊ)”}”(hŒ·A bind job consist of two batches and runs either on the migrate engine (kernel binds) or the bind engine passed in (user binds). In both cases the VM of the engine is the migrate VM.”h]”hŒ·A bind job consist of two batches and runs either on the migrate engine (kernel binds) or the bind engine passed in (user binds). In both cases the VM of the engine is the migrate VM.”…””}”(hj1hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K!hj ubhÊ)”}”(hXoThe first batch is used to update the migration VM page structure to point to the bind VM page table BOs which need to be updated. A physical page is required for this. If it is a user bind, the page is allocated from pool of pages reserved user bind operations with drm_suballoc managing this pool. If it is a kernel bind, the page reserved for kernel binds is used.”h]”hXoThe first batch is used to update the migration VM page structure to point to the bind VM page table BOs which need to be updated. A physical page is required for this. If it is a user bind, the page is allocated from pool of pages reserved user bind operations with drm_suballoc managing this pool. If it is a kernel bind, the page reserved for kernel binds is used.”…””}”(hj@hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K%hj ubhÊ)”}”(hŒ¢The first batch is only required for devices without VRAM as when the device has VRAM the bind VM page table BOs are in VRAM and the identity mapping can be used.”h]”hŒ¢The first batch is only required for devices without VRAM as when the device has VRAM the bind VM page table BOs are in VRAM and the identity mapping can be used.”…””}”(hjOhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K+hj ubhÊ)”}”(hŒÆThe second batch is used to program page table updated in the bind VM. Why not just one batch? Well the TLBs need to be invalidated between these two batches and that only can be done from the ring.”h]”hŒÆThe second batch is used to program page table updated in the bind VM. Why not just one batch? Well the TLBs need to be invalidated between these two batches and that only can be done from the ring.”…””}”(hj^hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K/hj ubhÊ)”}”(hŒÙWhen the bind job complete, the page allocated is returned the pool of pages reserved for user bind operations if a user bind. No need do this for kernel binds as the reserved kernel page is serially used by each job.”h]”hŒÙWhen the bind job complete, the page allocated is returned the pool of pages reserved for user bind operations if a user bind. No need do this for kernel binds as the reserved kernel page is serially used by each job.”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K3hj ubeh}”(h]”Œ bind-jobs”ah ]”h"]”Œ bind jobs”ah$]”h&]”uh1h´hh¶hžhhŸNh Nubhµ)”}”(hhh]”(hº)”}”(hŒCopy / clear jobs”h]”hŒCopy / clear jobs”…””}”(hj‡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj„hŸNh NubhÊ)”}”(hŒJA copy or clear job consist of two batches and runs on the migrate engine.”h]”hŒJA copy or clear job consist of two batches and runs on the migrate engine.”…””}”(hj•hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K:hj„ubhÊ)”}”(hXyLike binds, the first batch is used update the migration VM page structure. In copy jobs, we need to map the source and destination of the BO into page the structure. In clear jobs, we just need to add 1 mapping of BO into the page structure. We use the 16 reserved pages in migration VM for mappings, this gives us a maximum copy size of 16 MB and maximum clear size of 32 MB.”h]”hXyLike binds, the first batch is used update the migration VM page structure. In copy jobs, we need to map the source and destination of the BO into page the structure. In clear jobs, we just need to add 1 mapping of BO into the page structure. We use the 16 reserved pages in migration VM for mappings, this gives us a maximum copy size of 16 MB and maximum clear size of 32 MB.”…””}”(hj¤hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸŒd/var/lib/git/docbuild/linux/Documentation/gpu/xe/xe_migrate:7: ./drivers/gpu/drm/xe/xe_migrate_doc.h”h K