€•f*Œ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/arch/arm64/mops”Œ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/arch/arm64/mops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/it_IT/arch/arm64/mops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/ja_JP/arch/arm64/mops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/ko_KR/arch/arm64/mops”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ#/translations/pt_BR/arch/arm64/mops”Œ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/arch/arm64/mops”Œ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”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ=/var/lib/git/docbuild/linux/Documentation/arch/arm64/mops.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ#Memory copy/set instructions (MOPS)”h]”hŒ#Memory copy/set instructions (MOPS)”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ˜A MOPS memory copy/set operation consists of three consecutive CPY* or SET* instructions: a prologue, main and epilogue (for example: CPYP, CPYM, CPYE).”h]”hŒ˜A MOPS memory copy/set operation consists of three consecutive CPY* or SET* instructions: a prologue, main and epilogue (for example: CPYP, CPYM, CPYE).”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hX‹A main or epilogue instruction can take a MOPS exception for various reasons, for example when a task is migrated to a CPU with a different MOPS implementation, or when the instruction's alignment and size requirements are not met. The software exception handler is then expected to reset the registers and restart execution from the prologue instruction. Normally this is handled by the kernel.”h]”hXA main or epilogue instruction can take a MOPS exception for various reasons, for example when a task is migrated to a CPU with a different MOPS implementation, or when the instruction’s alignment and size requirements are not met. The software exception handler is then expected to reset the registers and restart execution from the prologue instruction. Normally this is handled by the kernel.”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhÞ)”}”(hŒŠFor more details refer to "D1.3.5.7 Memory Copy and Memory Set exceptions" in the Arm Architecture Reference Manual DDI 0487K.a (Arm ARM).”h]”hŒŽFor more details refer to “D1.3.5.7 Memory Copy and Memory Set exceptions†in the Arm Architecture Reference Manual DDI 0487K.a (Arm ARM).”…””}”(hhûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhŒtarget”“”)”}”(hŒ.. _arm64_mops_hyp:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œarm64-mops-hyp”uh1j h´KhhÊh²hh³hÇubhÉ)”}”(hhh]”(hÎ)”}”(hŒHypervisor requirements”h]”hŒHypervisor requirements”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KubhÞ)”}”(hX%A hypervisor running a Linux guest must handle all MOPS exceptions from the guest kernel, as Linux may not be able to handle the exception at all times. For example, a MOPS exception can be taken when the hypervisor migrates a vCPU to another physical CPU with a different MOPS implementation.”h]”hX%A hypervisor running a Linux guest must handle all MOPS exceptions from the guest kernel, as Linux may not be able to handle the exception at all times. For example, a MOPS exception can be taken when the hypervisor migrates a vCPU to another physical CPU with a different MOPS implementation.”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjh²hubhÞ)”}”(hŒ To do this, the hypervisor must:”h]”hŒ To do this, the hypervisor must:”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjh²hubhŒ block_quote”“”)”}”(hX~- Set HCRX_EL2.MCE2 to 1 so that the exception is taken to the hypervisor. - Have an exception handler that implements the algorithm from the Arm ARM rules CNTMJ and MWFQH. - Set the guest's PSTATE.SS to 0 in the exception handler, to handle a potential step of the current instruction. Note: Clearing PSTATE.SS is needed so that a single step exception is taken on the next instruction (the prologue instruction). Otherwise prologue would get silently stepped over and the single step exception taken on the main instruction. Note that if the guest instruction is not being stepped then clearing PSTATE.SS has no effect.”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒISet HCRX_EL2.MCE2 to 1 so that the exception is taken to the hypervisor. ”h]”hÞ)”}”(hŒHSet HCRX_EL2.MCE2 to 1 so that the exception is taken to the hypervisor.”h]”hŒHSet HCRX_EL2.MCE2 to 1 so that the exception is taken to the hypervisor.”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hjQubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjLubjP)”}”(hŒ`Have an exception handler that implements the algorithm from the Arm ARM rules CNTMJ and MWFQH. ”h]”hÞ)”}”(hŒ_Have an exception handler that implements the algorithm from the Arm ARM rules CNTMJ and MWFQH.”h]”hŒ_Have an exception handler that implements the algorithm from the Arm ARM rules CNTMJ and MWFQH.”…””}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K"hjiubah}”(h]”h ]”h"]”h$]”h&]”uh1jOhjLubjP)”}”(hX¿Set the guest's PSTATE.SS to 0 in the exception handler, to handle a potential step of the current instruction. Note: Clearing PSTATE.SS is needed so that a single step exception is taken on the next instruction (the prologue instruction). Otherwise prologue would get silently stepped over and the single step exception taken on the main instruction. Note that if the guest instruction is not being stepped then clearing PSTATE.SS has no effect.”h]”(hÞ)”}”(hŒoSet the guest's PSTATE.SS to 0 in the exception handler, to handle a potential step of the current instruction.”h]”hŒqSet the guest’s PSTATE.SS to 0 in the exception handler, to handle a potential step of the current instruction.”…””}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K%hjubhÞ)”}”(hXNNote: Clearing PSTATE.SS is needed so that a single step exception is taken on the next instruction (the prologue instruction). Otherwise prologue would get silently stepped over and the single step exception taken on the main instruction. Note that if the guest instruction is not being stepped then clearing PSTATE.SS has no effect.”h]”hXNNote: Clearing PSTATE.SS is needed so that a single step exception is taken on the next instruction (the prologue instruction). Otherwise prologue would get silently stepped over and the single step exception taken on the main instruction. Note that if the guest instruction is not being stepped then clearing PSTATE.SS has no effect.”…””}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K(hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jOhjLubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jJh³hÇh´K hjFubah}”(h]”h ]”h"]”h$]”h&]”uh1jDh³hÇh´K hjh²hubeh}”(h]”(Œhypervisor-requirements”jeh ]”h"]”(Œhypervisor requirements”Œarm64_mops_hyp”eh$]”h&]”uh1hÈhhÊh²hh³hÇh´KŒexpect_referenced_by_name”}”j»j sŒexpect_referenced_by_id”}”jj subeh}”(h]”Œ!memory-copy-set-instructions-mops”ah ]”h"]”Œ#memory copy/set instructions (mops)”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jíŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”j]”j asŒnameids”}”(jÇjÄj»jjºj·uŒ nametypes”}”(jljj»ˆjº‰uh}”(jÄhÊjjj·juŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hÞ)”}”(hhh]”hŒ4Hyperlink target "arm64-mops-hyp" is not referenced.”…””}”hjWsbah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhjTubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1jRubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.