€•ZAŒ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/virt/acrn/io-request”Œ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/virt/acrn/io-request”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/it_IT/virt/acrn/io-request”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ja_JP/virt/acrn/io-request”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ko_KR/virt/acrn/io-request”Œ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/virt/acrn/io-request”Œ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/virt/acrn/io-request”Œ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³ŒB/var/lib/git/docbuild/linux/Documentation/virt/acrn/io-request.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒI/O request handling”h]”hŒI/O request handling”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hX An I/O request of a User VM, which is constructed by the hypervisor, is distributed by the ACRN Hypervisor Service Module to an I/O client corresponding to the address range of the I/O request. Details of I/O request handling are described in the following sections.”h]”hX An I/O request of a User VM, which is constructed by the hypervisor, is distributed by the ACRN Hypervisor Service Module to an I/O client corresponding to the address range of the I/O request. Details of I/O request handling are described in the following sections.”…”�”}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ1. I/O request”h]”hŒ1. I/O request”…”�”}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhíh²hh³hÇh´K ubhÞ)�”}”(hXKFor each User VM, there is a shared 4-KByte memory region used for I/O requests communication between the hypervisor and Service VM. An I/O request is a 256-byte structure buffer, which is 'struct acrn_io_request', that is filled by an I/O handler of the hypervisor when a trapped I/O access happens in a User VM. ACRN userspace in the Service VM first allocates a 4-KByte page and passes the GPA (Guest Physical Address) of the buffer to the hypervisor. The buffer is used as an array of 16 I/O request slots with each I/O request slot being 256 bytes. This array is indexed by vCPU ID.”h]”hXOFor each User VM, there is a shared 4-KByte memory region used for I/O requests communication between the hypervisor and Service VM. An I/O request is a 256-byte structure buffer, which is ‘struct acrn_io_request’, that is filled by an I/O handler of the hypervisor when a trapped I/O access happens in a User VM. ACRN userspace in the Service VM first allocates a 4-KByte page and passes the GPA (Guest Physical Address) of the buffer to the hypervisor. The buffer is used as an array of 16 I/O request slots with each I/O request slot being 256 bytes. This array is indexed by vCPU ID.”…”�”}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhíh²hubeh}”(h]”Œ i-o-request”ah ]”h"]”Œ1. i/o request”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ2. I/O clients”h]”hŒ2. I/O clients”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KubhÞ)�”}”(hX‹An I/O client is responsible for handling User VM I/O requests whose accessed GPA falls in a certain range. Multiple I/O clients can be associated with each User VM. There is a special client associated with each User VM, called the default client, that handles all I/O requests that do not fit into the range of any other clients. The ACRN userspace acts as the default client for each User VM.”h]”hX‹An I/O client is responsible for handling User VM I/O requests whose accessed GPA falls in a certain range. Multiple I/O clients can be associated with each User VM. There is a special client associated with each User VM, called the default client, that handles all I/O requests that do not fit into the range of any other clients. The ACRN userspace acts as the default client for each User VM.”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjh²hubhÞ)�”}”(hŒkBelow illustration shows the relationship between I/O requests shared buffer, I/O requests and I/O clients.”h]”hŒkBelow illustration shows the relationship between I/O requests shared buffer, I/O requests and I/O clients.”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K!hjh²hubhŒ literal_block”“”)�”}”(hX +------------------------------------------------------+ | Service VM | |+--------------------------------------------------+ | || +----------------------------------------+ | | || | shared page ACRN userspace | | | || | +-----------------+ +------------+ | | | || +----+->| acrn_io_request |<-+ default | | | | || | | | +-----------------+ | I/O client | | | | || | | | | ... | +------------+ | | | || | | | +-----------------+ | | | || | +-|--------------------------------------+ | | ||---|----|-----------------------------------------| | || | | kernel | | || | | +----------------------+ | | || | | | +-------------+ HSM | | | || | +--------------+ | | | | || | | | I/O clients | | | | || | | | | | | | || | | +-------------+ | | | || | +----------------------+ | | |+---|----------------------------------------------+ | +----|-------------------------------------------------+ | +----|-------------------------------------------------+ | +-+-----------+ | | | I/O handler | ACRN Hypervisor | | +-------------+ | +------------------------------------------------------+”h]”hX +------------------------------------------------------+ | Service VM | |+--------------------------------------------------+ | || +----------------------------------------+ | | || | shared page ACRN userspace | | | || | +-----------------+ +------------+ | | | || +----+->| acrn_io_request |<-+ default | | | | || | | | +-----------------+ | I/O client | | | | || | | | | ... | +------------+ | | | || | | | +-----------------+ | | | || | +-|--------------------------------------+ | | ||---|----|-----------------------------------------| | || | | kernel | | || | | +----------------------+ | | || | | | +-------------+ HSM | | | || | +--------------+ | | | | || | | | I/O clients | | | | || | | | | | | | || | | +-------------+ | | | || | +----------------------+ | | |+---|----------------------------------------------+ | +----|-------------------------------------------------+ | +----|-------------------------------------------------+ | +-+-----------+ | | | I/O handler | ACRN Hypervisor | | +-------------+ | +------------------------------------------------------+”…”�”}”hjCsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jAh³hÇh´K&hjh²hubeh}”(h]”Œ i-o-clients”ah ]”h"]”Œ2. i/o clients”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ3. I/O request state transition”h]”hŒ3. I/O request state transition”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjYh²hh³hÇh´KDubhÞ)�”}”(hŒ PENDING -> PROCESSING -> COMPLETE -> FREE -> ...”h]”hŒ8FREE -> PENDING -> PROCESSING -> COMPLETE -> FREE -> ...”…”�”}”hjxsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jAh³hÇh´KJhjYh²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ$FREE: this I/O request slot is empty”h]”hÞ)�”}”(hj�h]”hŒ$FREE: this I/O request slot is empty”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KLhj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjˆh²hh³hÇh´NubjŒ)�”}”(hŒ4PENDING: a valid I/O request is pending in this slot”h]”hÞ)�”}”(hj¦h]”hŒ4PENDING: a valid I/O request is pending in this slot”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KMhj¤ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjˆh²hh³hÇh´NubjŒ)�”}”(hŒ.PROCESSING: the I/O request is being processed”h]”hÞ)�”}”(hj½h]”hŒ.PROCESSING: the I/O request is being processed”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KNhj»ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjˆh²hh³hÇh´NubjŒ)�”}”(hŒ-COMPLETE: the I/O request has been processed ”h]”hÞ)�”}”(hŒ,COMPLETE: the I/O request has been processed”h]”hŒ,COMPLETE: the I/O request has been processed”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KOhjÒubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjˆh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j†h³hÇh´KLhjYh²hubhÞ)�”}”(hŒƒAn I/O request in COMPLETE or FREE state is owned by the hypervisor. HSM and ACRN userspace are in charge of processing the others.”h]”hŒƒAn I/O request in COMPLETE or FREE state is owned by the hypervisor. HSM and ACRN userspace are in charge of processing the others.”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KQhjYh²hubeh}”(h]”Œi-o-request-state-transition”ah ]”h"]”Œ3. i/o request state transition”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KDubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ"4. Processing flow of I/O requests”h]”hŒ"4. Processing flow of I/O requests”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KUubhŒenumerated_list”“”)�”}”(hhh]”(jŒ)�”}”(hŒ}The I/O handler of the hypervisor will fill an I/O request with PENDING state when a trapped I/O access happens in a User VM.”h]”hÞ)�”}”(hŒ}The I/O handler of the hypervisor will fill an I/O request with PENDING state when a trapped I/O access happens in a User VM.”h]”hŒ}The I/O handler of the hypervisor will fill an I/O request with PENDING state when a trapped I/O access happens in a User VM.”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KWhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjh²hh³hÇh´NubjŒ)�”}”(hŒUThe hypervisor makes an upcall, which is a notification interrupt, to the Service VM.”h]”hÞ)�”}”(hŒUThe hypervisor makes an upcall, which is a notification interrupt, to the Service VM.”h]”hŒUThe hypervisor makes an upcall, which is a notification interrupt, to the Service VM.”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KYhj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjh²hh³hÇh´NubjŒ)�”}”(hŒ?The upcall handler schedules a worker to dispatch I/O requests.”h]”hÞ)�”}”(hjPh]”hŒ?The upcall handler schedules a worker to dispatch I/O requests.”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K[hjNubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjh²hh³hÇh´NubjŒ)�”}”(hŒÙThe worker looks for the PENDING I/O requests, assigns them to different registered clients based on the address of the I/O accesses, updates their state to PROCESSING, and notifies the corresponding client to handle.”h]”hÞ)�”}”(hŒÙThe worker looks for the PENDING I/O requests, assigns them to different registered clients based on the address of the I/O accesses, updates their state to PROCESSING, and notifies the corresponding client to handle.”h]”hŒÙThe worker looks for the PENDING I/O requests, assigns them to different registered clients based on the address of the I/O accesses, updates their state to PROCESSING, and notifies the corresponding client to handle.”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K\hjeubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjh²hh³hÇh´NubjŒ)�”}”(hŒ6The notified client handles the assigned I/O requests.”h]”hÞ)�”}”(hjh]”hŒ6The notified client handles the assigned I/O requests.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K_hj}ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjh²hh³hÇh´NubjŒ)�”}”(hŒmThe HSM updates I/O requests states to COMPLETE and notifies the hypervisor of the completion via hypercalls.”h]”hÞ)�”}”(hŒmThe HSM updates I/O requests states to COMPLETE and notifies the hypervisor of the completion via hypercalls.”h]”hŒmThe HSM updates I/O requests states to COMPLETE and notifies the hypervisor of the completion via hypercalls.”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K`hj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1j‹hjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œ loweralpha”Œprefix”hŒsuffix”Œ.”uh1jhjh²hh³hÇh´KWubeh}”(h]”Œprocessing-flow-of-i-o-requests”ah ]”h"]”Œ"4. processing flow of i/o requests”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KUubeh}”(h]”Œi-o-request-handling”ah ]”h"]”Œi/o request handling”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”}”Œnameids”}”(jÄjÁjjjVjSjjj¼j¹uŒ nametypes”}”(jĉj‰jV‰j‰j¼‰uh}”(jÁhÊjhíjSjjjYj¹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”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.