Ksphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/virt/kvm/arm/pvtimemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/virt/kvm/arm/pvtimemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/virt/kvm/arm/pvtimemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/virt/kvm/arm/pvtimemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/virt/kvm/arm/pvtimemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/virt/kvm/arm/pvtimemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/virt/kvm/arm/pvtime.rsthKubhsection)}(hhh](htitle)}(h&Paravirtualized time support for arm64h]h&Paravirtualized time support for arm64}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hcArm specification DEN0057/A defines a standard for paravirtualised time support for AArch64 guests:h]hcArm specification DEN0057/A defines a standard for paravirtualised time support for AArch64 guests:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h(https://developer.arm.com/docs/den0057/ah]h reference)}(hhh]h(https://developer.arm.com/docs/den0057/a}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurihuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hKVM/arm64 implements the stolen time part of this specification by providing some hypervisor service calls to support a paravirtualized guest obtaining a view of the amount of time stolen from its execution.h]hKVM/arm64 implements the stolen time part of this specification by providing some hypervisor service calls to support a paravirtualized guest obtaining a view of the amount of time stolen from its execution.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(h0Two new SMCCC compatible hypercalls are defined:h]h0Two new SMCCC compatible hypercalls are defined:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh bullet_list)}(hhh](h list_item)}(hPV_TIME_FEATURES: 0xC5000020h]h)}(hjh]hPV_TIME_FEATURES: 0xC5000020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hPV_TIME_ST: 0xC5000021 h]h)}(hPV_TIME_ST: 0xC5000021h]hPV_TIME_ST: 0xC5000021}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj-ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKhhhhubh)}(hThese are only available in the SMC64/HVC64 calling convention as paravirtualized time is not available to 32 bit Arm guests. The existence of the PV_TIME_FEATURES hypercall should be probed using the SMCCC 1.1 ARCH_FEATURES mechanism before calling it.h]hThese are only available in the SMC64/HVC64 calling convention as paravirtualized time is not available to 32 bit Arm guests. The existence of the PV_TIME_FEATURES hypercall should be probed using the SMCCC 1.1 ARCH_FEATURES mechanism before calling it.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hPV_TIME_FEATURESh]hPV_TIME_FEATURES}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh block_quote)}(hX============= ======== ================================================= Function ID: (uint32) 0xC5000020 PV_call_id: (uint32) The function to query for support. Currently only PV_TIME_ST is supported. Return value: (int64) NOT_SUPPORTED (-1) or SUCCESS (0) if the relevant PV-time feature is supported by the hypervisor. ============= ======== ================================================= h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jyhjvubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jyhjvubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthK1uh1jyhjvubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h Function ID:h]h Function ID:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h(uint32)h]h(uint32)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h 0xC5000020h]h 0xC5000020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h PV_call_id:h]h PV_call_id:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h(uint32)h]h(uint32)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hJThe function to query for support. Currently only PV_TIME_ST is supported.h]hJThe function to query for support. Currently only PV_TIME_ST is supported.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Return value:h]h Return value:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh]h)}(h(int64)h]h(int64)}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjXubah}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh]h)}(haNOT_SUPPORTED (-1) or SUCCESS (0) if the relevant PV-time feature is supported by the hypervisor.h]haNOT_SUPPORTED (-1) or SUCCESS (0) if the relevant PV-time feature is supported by the hypervisor.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjoubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]colsKuh1jthjqubah}(h]h ]h"]h$]h&]uh1johjkubah}(h]h ]h"]h$]h&]uh1jihhhKhhhhubh)}(h PV_TIME_STh]h PV_TIME_ST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hhhhubjj)}(hXY============= ======== ============================================== Function ID: (uint32) 0xC5000021 Return value: (int64) IPA of the stolen time data structure for this VCPU. On failure: NOT_SUPPORTED (-1) ============= ======== ============================================== h]jp)}(hhh]ju)}(hhh](jz)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jyhjubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jyhjubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthK.uh1jyhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h Function ID:h]h Function ID:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h(uint32)h]h(uint32)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h 0xC5000021h]h 0xC5000021}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h Return value:h]h Return value:}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hj/ubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(h(int64)h]h(int64)}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjFubah}(h]h ]h"]h$]h&]uh1jhj,ubj)}(hhh]h)}(hSIPA of the stolen time data structure for this VCPU. On failure: NOT_SUPPORTED (-1)h]hSIPA of the stolen time data structure for this VCPU. On failure: NOT_SUPPORTED (-1)}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hj]ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jthjubah}(h]h ]h"]h$]h&]uh1johjubah}(h]h ]h"]h$]h&]uh1jihhhK%hhhhubh)}(hXThe IPA returned by PV_TIME_ST should be mapped by the guest as normal memory with inner and outer write back caching attributes, in the inner shareable domain. A total of 16 bytes from the IPA returned are guaranteed to be meaningfully filled by the hypervisor (see structure below).h]hXThe IPA returned by PV_TIME_ST should be mapped by the guest as normal memory with inner and outer write back caching attributes, in the inner shareable domain. A total of 16 bytes from the IPA returned are guaranteed to be meaningfully filled by the hypervisor (see structure below).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hhhhubh)}(h6PV_TIME_ST returns the structure for the calling VCPU.h]h6PV_TIME_ST returns the structure for the calling VCPU.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hhhhubh)}(hhh](h)}(h Stolen Timeh]h Stolen Time}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK4ubh)}(hCThe structure pointed to by the PV_TIME_ST hypercall is as follows:h]hCThe structure pointed to by the PV_TIME_ST hypercall is as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjhhubjp)}(hhh]ju)}(hhh](jz)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jyhjubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jyhjubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jyhjubjz)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jyhjubhthead)}(hhh]j)}(hhh](j)}(hhh]h)}(hFieldh]hField}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Byte Lengthh]h Byte Length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Byte Offseth]h Byte Offset}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hj2ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjIubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRevisionh]hRevision}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjrubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hhh]h)}(h4h]h4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hhh]h)}(h0h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hhh]h)}(hMust be 0 for version 1.0h]hMust be 0 for version 1.0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjlubj)}(hhh](j)}(hhh]h)}(h Attributesh]h Attributes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]h4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Must be 0h]h Must be 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjlubj)}(hhh](j)}(hhh]h)}(h Stolen timeh]h Stolen time}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hj:ubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h8h]h8}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjQubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(hjVh]h8}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjhubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h~Stolen time in unsigned nanoseconds indicating how much time this VCPU thread was involuntarily not running on a physical CPU.h]h~Stolen time in unsigned nanoseconds indicating how much time this VCPU thread was involuntarily not running on a physical CPU.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hj~ubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jthjubah}(h]h ]h"]h$]h&]uh1johjhhhhhNubh)}(h5All values in the structure are stored little-endian.h]h5All values in the structure are stored little-endian.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjhhubh)}(hXThe structure will be updated by the hypervisor prior to scheduling a VCPU. It will be present within a reserved region of the normal memory given to the guest. The guest should not attempt to write into this memory. There is a structure per VCPU of the guest.h]hXThe structure will be updated by the hypervisor prior to scheduling a VCPU. It will be present within a reserved region of the normal memory given to the guest. The guest should not attempt to write into this memory. There is a structure per VCPU of the guest.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjhhubh)}(hIt is advisable that one or more 64k pages are set aside for the purpose of these structures and not used for other purposes, this enables the guest to map the region using 64k pages and avoids conflicting attributes with other memory.h]hIt is advisable that one or more 64k pages are set aside for the purpose of these structures and not used for other purposes, this enables the guest to map the region using 64k pages and avoids conflicting attributes with other memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjhhubh)}(hkFor the user space interface see :ref:`Documentation/virt/kvm/devices/vcpu.rst `.h](h!For the user space interface see }(hjhhhNhNubh)}(hI:ref:`Documentation/virt/kvm/devices/vcpu.rst `h]hinline)}(hjh]h'Documentation/virt/kvm/devices/vcpu.rst}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocvirt/kvm/arm/pvtime refdomainjreftyperef refexplicitrefwarn reftargetkvm_arm_vcpu_pvtime_ctrluh1hhhhKQhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKQhjhhubeh}(h] stolen-timeah ]h"] stolen timeah$]h&]uh1hhhhhhhhK4ubeh}(h]¶virtualized-time-support-for-arm64ah ]h"]¶virtualized time support for arm64ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjAerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjju nametypes}(jjuh}(jhjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.