€•‹)Œ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Œ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”uh1hõ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.”…””}”(hjhž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:”…””}”(hj"hž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.”…””}”(hjAhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hj=ubah}”(h]”h ]”h"]”h$]”h&]”uh1j;hj8ubj<)”}”(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.”…””}”(hjYhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K"hjUubah}”(h]”h ]”h"]”h$]”h&]”uh1j;hj8ubj<)”}”(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.”…””}”(hjqhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K%hjmubhÊ)”}”(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.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K(hjmubeh}”(h]”h ]”h"]”h$]”h&]”uh1j;hj8ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j6hŸh³h K hj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hŸ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§h÷sŒexpect_referenced_by_id”}”jh÷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]”h÷asŒnameids”}”(j³j°j§jj¦j£uŒ nametypes”}”(j³‰j§ˆ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.”…””}”hjCsbah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhj@ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1j>ubaŒ transformer”NŒ include_log”]”Œ decoration”Nhžhub.