€•!kŒ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/kvm/review-checklist”Œ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/kvm/review-checklist”Œ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/kvm/review-checklist”Œ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/kvm/review-checklist”Œ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/kvm/review-checklist”Œ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/kvm/review-checklist”Œ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/kvm/review-checklist”Œ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³ŒG/var/lib/git/docbuild/linux/Documentation/virt/kvm/review-checklist.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ Review checklist for kvm patches”h]”hŒ Review checklist for kvm patches”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒenumerated_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒoThe patch must follow Documentation/process/coding-style.rst and Documentation/process/submitting-patches.rst. ”h]”hŒ paragraph”“”)”}”(hŒnThe patch must follow Documentation/process/coding-style.rst and Documentation/process/submitting-patches.rst.”h]”hŒnThe patch must follow Documentation/process/coding-style.rst and Documentation/process/submitting-patches.rst.”…””}”(hhêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Khhäubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒ;Patches should be against kvm.git master or next branches. ”h]”hé)”}”(hŒ:Patches should be against kvm.git master or next branches.”h]”hŒ:Patches should be against kvm.git master or next branches.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K hhþubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒ±If the patch introduces or modifies a new userspace API: - the API must be documented in Documentation/virt/kvm/api.rst - the API must be discoverable using KVM_CHECK_EXTENSION ”h]”hé)”}”(hŒ°If the patch introduces or modifies a new userspace API: - the API must be documented in Documentation/virt/kvm/api.rst - the API must be discoverable using KVM_CHECK_EXTENSION”h]”hŒ°If the patch introduces or modifies a new userspace API: - the API must be documented in Documentation/virt/kvm/api.rst - the API must be discoverable using KVM_CHECK_EXTENSION”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒ1New state must include support for save/restore. ”h]”hé)”}”(hŒ0New state must include support for save/restore.”h]”hŒ0New state must include support for save/restore.”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Khj.ubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒ„New features must default to off (userspace should explicitly request them). Performance improvements can and should default to on. ”h]”hé)”}”(hŒƒNew features must default to off (userspace should explicitly request them). Performance improvements can and should default to on.”h]”hŒƒNew features must default to off (userspace should explicitly request them). Performance improvements can and should default to on.”…””}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KhjFubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒmNew cpu features should be exposed via KVM_GET_SUPPORTED_CPUID2, or its equivalent for non-x86 architectures ”h]”hé)”}”(hŒlNew cpu features should be exposed via KVM_GET_SUPPORTED_CPUID2, or its equivalent for non-x86 architectures”h]”hŒlNew cpu features should be exposed via KVM_GET_SUPPORTED_CPUID2, or its equivalent for non-x86 architectures”…””}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Khj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒ,The feature should be testable (see below). ”h]”hé)”}”(hŒ+The feature should be testable (see below).”h]”hŒ+The feature should be testable (see below).”…””}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Khjvubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒ|Changes should be vendor neutral when possible. Changes to common code are better than duplicating changes to vendor code. ”h]”hé)”}”(hŒ{Changes should be vendor neutral when possible. Changes to common code are better than duplicating changes to vendor code.”h]”hŒ{Changes should be vendor neutral when possible. Changes to common code are better than duplicating changes to vendor code.”…””}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KhjŽubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒPSimilarly, prefer changes to arch independent code than to arch dependent code. ”h]”hé)”}”(hŒOSimilarly, prefer changes to arch independent code than to arch dependent code.”h]”hŒOSimilarly, prefer changes to arch independent code than to arch dependent code.”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Khj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒ®User/kernel interfaces and guest/host interfaces must be 64-bit clean (all variables and sizes naturally aligned on 64-bit; use specific types only - u64 rather than ulong). ”h]”hé)”}”(hŒ­User/kernel interfaces and guest/host interfaces must be 64-bit clean (all variables and sizes naturally aligned on 64-bit; use specific types only - u64 rather than ulong).”h]”hŒ­User/kernel interfaces and guest/host interfaces must be 64-bit clean (all variables and sizes naturally aligned on 64-bit; use specific types only - u64 rather than ulong).”…””}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K hj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubhã)”}”(hŒnNew guest visible features must either be documented in a hardware manual or be accompanied by documentation. ”h]”hé)”}”(hŒmNew guest visible features must either be documented in a hardware manual or be accompanied by documentation.”h]”hŒmNew guest visible features must either be documented in a hardware manual or be accompanied by documentation.”…””}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K$hjÖubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhßh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1hÝhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒTesting of KVM code”h]”hŒTesting of KVM code”…””}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjùh²hh³hÇh´K(ubhé)”}”(hŒÇAll features contributed to KVM, and in many cases bugfixes too, should be accompanied by some kind of tests and/or enablement in open source guests and VMMs. KVM is covered by multiple test suites:”h]”hŒÇAll features contributed to KVM, and in many cases bugfixes too, should be accompanied by some kind of tests and/or enablement in open source guests and VMMs. KVM is covered by multiple test suites:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K*hjùh²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hX8*Selftests* These are low level tests that allow granular testing of kernel APIs. This includes API failure scenarios, invoking APIs after specific guest instructions, and testing multiple calls to ``KVM_CREATE_VM`` within a single test. They are included in the kernel tree at ``tools/testing/selftests/kvm``. ”h]”(hŒterm”“”)”}”(hŒ *Selftests*”h]”hŒemphasis”“”)”}”(hj'h]”hŒ Selftests”…””}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j)hj%ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´K3hjubhŒ definition”“”)”}”(hhh]”hé)”}”(hX+These are low level tests that allow granular testing of kernel APIs. This includes API failure scenarios, invoking APIs after specific guest instructions, and testing multiple calls to ``KVM_CREATE_VM`` within a single test. They are included in the kernel tree at ``tools/testing/selftests/kvm``.”h]”(hŒºThese are low level tests that allow granular testing of kernel APIs. This includes API failure scenarios, invoking APIs after specific guest instructions, and testing multiple calls to ”…””}”(hjCh²hh³Nh´NubhŒliteral”“”)”}”(hŒ``KVM_CREATE_VM``”h]”hŒ KVM_CREATE_VM”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhjCubhŒ@ within a single test. They are included in the kernel tree at ”…””}”(hjCh²hh³Nh´NubjL)”}”(hŒ``tools/testing/selftests/kvm``”h]”hŒtools/testing/selftests/kvm”…””}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhjCubhŒ.”…””}”(hjCh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K/hj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K3hjubj)”}”(hX```kvm-unit-tests`` A collection of small guests that test CPU and emulated device features from a guest's perspective. They run under QEMU or ``kvmtool``, and are generally not KVM-specific: they can be run with any accelerator that QEMU support or even on bare metal, making it possible to compare behavior across hypervisors and processor families. ”h]”(j$)”}”(hŒ``kvm-unit-tests``”h]”jL)”}”(hj‰h]”hŒkvm-unit-tests”…””}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´K:hjƒubj?)”}”(hhh]”hé)”}”(hXLA collection of small guests that test CPU and emulated device features from a guest's perspective. They run under QEMU or ``kvmtool``, and are generally not KVM-specific: they can be run with any accelerator that QEMU support or even on bare metal, making it possible to compare behavior across hypervisors and processor families.”h]”(hŒ~A collection of small guests that test CPU and emulated device features from a guest’s perspective. They run under QEMU or ”…””}”(hj¡h²hh³Nh´NubjL)”}”(hŒ ``kvmtool``”h]”hŒkvmtool”…””}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhj¡ubhŒÅ, and are generally not KVM-specific: they can be run with any accelerator that QEMU support or even on bare metal, making it possible to compare behavior across hypervisors and processor families.”…””}”(hj¡h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K6hjžubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjƒubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K:hjh²hubj)”}”(hŒúFunctional test suites Various sets of functional tests exist, such as QEMU's ``tests/functional`` suite and `avocado-vt `__. These typically involve running a full operating system in a virtual machine. ”h]”(j$)”}”(hŒFunctional test suites”h]”hŒFunctional test suites”…””}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´K@hjÍubj?)”}”(hhh]”hé)”}”(hŒâVarious sets of functional tests exist, such as QEMU's ``tests/functional`` suite and `avocado-vt `__. These typically involve running a full operating system in a virtual machine.”h]”(hŒ9Various sets of functional tests exist, such as QEMU’s ”…””}”(hjâh²hh³Nh´NubjL)”}”(hŒ``tests/functional``”h]”hŒtests/functional”…””}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhjâubhŒ suite and ”…””}”(hjâh²hh³Nh´NubhŒ reference”“”)”}”(hŒ=`avocado-vt `__”h]”hŒ avocado-vt”…””}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ avocado-vt”Œrefuri”Œ,https://avocado-vt.readthedocs.io/en/latest/”uh1jühjâubhŒO. These typically involve running a full operating system in a virtual machine.”…””}”(hjâh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K=hjßubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjÍubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K@hjh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjùh²hh³hÇh´Nubhé)”}”(hŒsThe best testing approach depends on the feature's complexity and operation. Here are some examples and guidelines:”h]”hŒuThe best testing approach depends on the feature’s complexity and operation. Here are some examples and guidelines:”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KBhjùh²hubj)”}”(hhh]”(j)”}”(hXrNew instructions (no new registers or APIs) The corresponding CPU features (if applicable) should be made available in QEMU. If the instructions require emulation support or other code in KVM, it is worth adding coverage to ``kvm-unit-tests`` or selftests; the latter can be a better choice if the instructions relate to an API that already has good selftest coverage. ”h]”(j$)”}”(hŒ+New instructions (no new registers or APIs)”h]”hŒ+New instructions (no new registers or APIs)”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´KJhj=ubj?)”}”(hhh]”hé)”}”(hXEThe corresponding CPU features (if applicable) should be made available in QEMU. If the instructions require emulation support or other code in KVM, it is worth adding coverage to ``kvm-unit-tests`` or selftests; the latter can be a better choice if the instructions relate to an API that already has good selftest coverage.”h]”(hŒµThe corresponding CPU features (if applicable) should be made available in QEMU. If the instructions require emulation support or other code in KVM, it is worth adding coverage to ”…””}”(hjRh²hh³Nh´NubjL)”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhjRubhŒ~ or selftests; the latter can be a better choice if the instructions relate to an API that already has good selftest coverage.”…””}”(hjRh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KFhjOubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj=ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KJhj:ubj)”}”(hX6New hardware features (new registers, no new APIs) These should be tested via ``kvm-unit-tests``; this more or less implies supporting them in QEMU and/or ``kvmtool``. In some cases selftests can be used instead, similar to the previous case, or specifically to test corner cases in guest state save/restore. ”h]”(j$)”}”(hŒ2New hardware features (new registers, no new APIs)”h]”hŒ2New hardware features (new registers, no new APIs)”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´KPhj~ubj?)”}”(hhh]”hé)”}”(hXThese should be tested via ``kvm-unit-tests``; this more or less implies supporting them in QEMU and/or ``kvmtool``. In some cases selftests can be used instead, similar to the previous case, or specifically to test corner cases in guest state save/restore.”h]”(hŒThese should be tested via ”…””}”(hj“h²hh³Nh´NubjL)”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhj“ubhŒ;; this more or less implies supporting them in QEMU and/or ”…””}”(hj“h²hh³Nh´NubjL)”}”(hŒ ``kvmtool``”h]”hŒkvmtool”…””}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhj“ubhŒ. In some cases selftests can be used instead, similar to the previous case, or specifically to test corner cases in guest state save/restore.”…””}”(hj“h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KMhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj~ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KPhj:h²hubj)”}”(hXµBug fixes and performance improvements These usually do not introduce new APIs, but it's worth sharing any benchmarks and tests that will validate your contribution, ideally in the form of regression tests. Tests and benchmarks can be included in either ``kvm-unit-tests`` or selftests, depending on the specifics of your change. Selftests are especially useful for regression tests because they are included directly in Linux's tree. ”h]”(j$)”}”(hŒ&Bug fixes and performance improvements”h]”hŒ&Bug fixes and performance improvements”…””}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´KXhjÑubj?)”}”(hhh]”hé)”}”(hXThese usually do not introduce new APIs, but it's worth sharing any benchmarks and tests that will validate your contribution, ideally in the form of regression tests. Tests and benchmarks can be included in either ``kvm-unit-tests`` or selftests, depending on the specifics of your change. Selftests are especially useful for regression tests because they are included directly in Linux's tree.”h]”(hŒÚThese usually do not introduce new APIs, but it’s worth sharing any benchmarks and tests that will validate your contribution, ideally in the form of regression tests. Tests and benchmarks can be included in either ”…””}”(hjæh²hh³Nh´NubjL)”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhjæubhŒ¥ or selftests, depending on the specifics of your change. Selftests are especially useful for regression tests because they are included directly in Linux’s tree.”…””}”(hjæh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KShjãubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjÑubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KXhj:h²hubj)”}”(hXkLarge scale internal changes While it's difficult to provide a single policy, you should ensure that the changed code is covered by either ``kvm-unit-tests`` or selftests. In some cases the affected code is run for any guests and functional tests suffice. Explain your testing process in the cover letter, as that can help identify gaps in existing test suites. ”h]”(j$)”}”(hŒLarge scale internal changes”h]”hŒLarge scale internal changes”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´K_hjubj?)”}”(hhh]”hé)”}”(hXMWhile it's difficult to provide a single policy, you should ensure that the changed code is covered by either ``kvm-unit-tests`` or selftests. In some cases the affected code is run for any guests and functional tests suffice. Explain your testing process in the cover letter, as that can help identify gaps in existing test suites.”h]”(hŒpWhile it’s difficult to provide a single policy, you should ensure that the changed code is covered by either ”…””}”(hj'h²hh³Nh´NubjL)”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhj'ubhŒÍ or selftests. In some cases the affected code is run for any guests and functional tests suffice. Explain your testing process in the cover letter, as that can help identify gaps in existing test suites.”…””}”(hj'h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´K[hj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K_hj:h²hubj)”}”(hXµNew APIs It is important to demonstrate your use case. This can be as simple as explaining that the feature is already in use on bare metal, or it can be a proof-of-concept implementation in userspace. The latter need not be open source, though that is of course preferable for easier testing. Selftests should test corner cases of the APIs, and should also cover basic host and guest operation if no open source VMM uses the feature. ”h]”(j$)”}”(hŒNew APIs”h]”hŒNew APIs”…””}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´KghjSubj?)”}”(hhh]”hé)”}”(hX«It is important to demonstrate your use case. This can be as simple as explaining that the feature is already in use on bare metal, or it can be a proof-of-concept implementation in userspace. The latter need not be open source, though that is of course preferable for easier testing. Selftests should test corner cases of the APIs, and should also cover basic host and guest operation if no open source VMM uses the feature.”h]”hX«It is important to demonstrate your use case. This can be as simple as explaining that the feature is already in use on bare metal, or it can be a proof-of-concept implementation in userspace. The latter need not be open source, though that is of course preferable for easier testing. Selftests should test corner cases of the APIs, and should also cover basic host and guest operation if no open source VMM uses the feature.”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Kbhjeubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjSubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Kghj:h²hubj)”}”(hX‹Bigger features, usually spanning host and guest These should be supported by Linux guests, with limited exceptions for Hyper-V features that are testable on Windows guests. It is strongly suggested that the feature be usable with an open source host VMM, such as at least one of QEMU or crosvm, and guest firmware. Selftests should test at least API error cases. Guest operation can be covered by either selftests of ``kvm-unit-tests`` (this is especially important for paravirtualized and Windows-only features). Strong selftest coverage can also be a replacement for implementation in an open source VMM, but this is generally not recommended. ”h]”(j$)”}”(hŒ0Bigger features, usually spanning host and guest”h]”hŒ0Bigger features, usually spanning host and guest”…””}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j#h³hÇh´Krhj‚ubj?)”}”(hhh]”hé)”}”(hXYThese should be supported by Linux guests, with limited exceptions for Hyper-V features that are testable on Windows guests. It is strongly suggested that the feature be usable with an open source host VMM, such as at least one of QEMU or crosvm, and guest firmware. Selftests should test at least API error cases. Guest operation can be covered by either selftests of ``kvm-unit-tests`` (this is especially important for paravirtualized and Windows-only features). Strong selftest coverage can also be a replacement for implementation in an open source VMM, but this is generally not recommended.”h]”(hXtThese should be supported by Linux guests, with limited exceptions for Hyper-V features that are testable on Windows guests. It is strongly suggested that the feature be usable with an open source host VMM, such as at least one of QEMU or crosvm, and guest firmware. Selftests should test at least API error cases. Guest operation can be covered by either selftests of ”…””}”(hj—h²hh³Nh´NubjL)”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhj—ubhŒÓ (this is especially important for paravirtualized and Windows-only features). Strong selftest coverage can also be a replacement for implementation in an open source VMM, but this is generally not recommended.”…””}”(hj—h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Kjhj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj‚ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Krhj:h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjùh²hh³hÇh´Nubhé)”}”(hXFollowing the above suggestions for testing in selftests and ``kvm-unit-tests`` will make it easier for the maintainers to review and accept your code. In fact, even before you contribute your changes upstream it will make it easier for you to develop for KVM.”h]”(hŒ=Following the above suggestions for testing in selftests and ”…””}”(hjÉh²hh³Nh´NubjL)”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jKhjÉubhŒ¶ will make it easier for the maintainers to review and accept your code. In fact, even before you contribute your changes upstream it will make it easier for you to develop for KVM.”…””}”(hjÉh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Kthjùh²hubhé)”}”(hŒ…Of course, the KVM maintainers reserve the right to require more tests, though they may also waive the requirement from time to time.”h]”hŒ…Of course, the KVM maintainers reserve the right to require more tests, though they may also waive the requirement from time to time.”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Kyhjùh²hubeh}”(h]”Œtesting-of-kvm-code”ah ]”h"]”Œtesting of kvm code”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K(ubeh}”(h]”Œ review-checklist-for-kvm-patches”ah ]”h"]”Œ review checklist for kvm patches”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”}”(jjjüjùuŒ nametypes”}”(j‰jü‰uh}”(jhÊjùjùuŒ 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.