€•!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”hhhubh)”}”(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”ˆuh1hhhubh)”}”(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”ˆuh1hhhubh)”}”(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”ˆuh1hhhubh)”}”(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”ˆuh1hhhubh)”}”(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”ˆuh1hhhubh)”}”(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”ˆuh1hhhubeh}”(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.”…””}”(hj h²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”…””}”(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Œ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.”…””}”(hj2 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Œ„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.”…””}”(hjJ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KhjF ubah}”(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”…””}”(hjb 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Œ,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).”…””}”(hjz h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Khjv ubah}”(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´K3hj ubhŒ
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 ”…””}”(hjC h²hh³Nh´NubhŒliteral”“”)”}”(hŒ``KVM_CREATE_VM``”h]”hŒ
KVM_CREATE_VM”…””}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jK hjC ubhŒ@
within a single test. They are included in the kernel tree at
”…””}”(hjC h²hh³Nh´NubjL )”}”(hŒ``tools/testing/selftests/kvm``”h]”hŒtools/testing/selftests/kvm”…””}”(hj_ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jK hjC ubhŒ.”…””}”(hjC 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&]”uh1j h³hÇh´K3hj ubj )”}”(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&]”uh1jK hj‡ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j# h³hÇh´K:hjƒ ubj? )”}”(hhh]”hé)”}”(hXL 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]”(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&]”uh1jK hj¡ 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&]”uh1j h³hÇh´K:hj h²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&]”uh1jK hjâ 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&]”uh1j h³hÇh´K@hj h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjù 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 )”}”(hXr New 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)”…””}”(hjA h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j# h³hÇh´KJhj= ubj? )”}”(hhh]”hé)”}”(hXE 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]”(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 ”…””}”(hjR h²hh³Nh´NubjL )”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hjZ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jK hjR ubhŒ~ or selftests;
the latter can be a better choice if the instructions relate to an API
that already has good selftest coverage.”…””}”(hjR h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´KFhjO ubah}”(h]”h ]”h"]”h$]”h&]”uh1j> hj= ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KJhj: ubj )”}”(hX6 New 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é)”}”(hX 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]”(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&]”uh1jK hj“ 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&]”uh1jK hj“ 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´KMhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j> hj~ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j h³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é)”}”(hX 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]”(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&]”uh1jK hjæ 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&]”uh1j h³hÇh´KXhj: h²hubj )”}”(hXk Large 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”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j# h³hÇh´K_hj ubj? )”}”(hhh]”hé)”}”(hXM 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]”(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&]”uh1jK hj' 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> hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j h³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”…””}”(hjW h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j# h³hÇh´KghjS ubj? )”}”(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.”…””}”(hjh h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèh³hÇh´Kbhje ubah}”(h]”h ]”h"]”h$]”h&]”uh1j> hjS ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j h³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é)”}”(hXY 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]”(hXt 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 ”…””}”(hj— h²hh³Nh´NubjL )”}”(hŒ``kvm-unit-tests``”h]”hŒkvm-unit-tests”…””}”(hjŸ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jK hj— 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&]”uh1j h³hÇh´Krhj: h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hjù h²hh³hÇh´Nubhé)”}”(hX Following 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&]”uh1jK hjÉ 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”}”(j j jü jù uŒ nametypes”}”(j ‰jü ‰uh}”(j hÊ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.