xref: /linux/Documentation/virt/kvm/review-checklist.rst (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1033741c6SMauro Carvalho Chehab.. SPDX-License-Identifier: GPL-2.0
2033741c6SMauro Carvalho Chehab
3033741c6SMauro Carvalho Chehab================================
4033741c6SMauro Carvalho ChehabReview checklist for kvm patches
5033741c6SMauro Carvalho Chehab================================
6033741c6SMauro Carvalho Chehab
7033741c6SMauro Carvalho Chehab1.  The patch must follow Documentation/process/coding-style.rst and
8033741c6SMauro Carvalho Chehab    Documentation/process/submitting-patches.rst.
9033741c6SMauro Carvalho Chehab
10033741c6SMauro Carvalho Chehab2.  Patches should be against kvm.git master branch.
11033741c6SMauro Carvalho Chehab
12033741c6SMauro Carvalho Chehab3.  If the patch introduces or modifies a new userspace API:
13*3ecad8c2SMauro Carvalho Chehab    - the API must be documented in Documentation/virt/kvm/api.rst
14033741c6SMauro Carvalho Chehab    - the API must be discoverable using KVM_CHECK_EXTENSION
15033741c6SMauro Carvalho Chehab
16033741c6SMauro Carvalho Chehab4.  New state must include support for save/restore.
17033741c6SMauro Carvalho Chehab
18033741c6SMauro Carvalho Chehab5.  New features must default to off (userspace should explicitly request them).
19033741c6SMauro Carvalho Chehab    Performance improvements can and should default to on.
20033741c6SMauro Carvalho Chehab
21033741c6SMauro Carvalho Chehab6.  New cpu features should be exposed via KVM_GET_SUPPORTED_CPUID2
22033741c6SMauro Carvalho Chehab
23033741c6SMauro Carvalho Chehab7.  Emulator changes should be accompanied by unit tests for qemu-kvm.git
24033741c6SMauro Carvalho Chehab    kvm/test directory.
25033741c6SMauro Carvalho Chehab
26033741c6SMauro Carvalho Chehab8.  Changes should be vendor neutral when possible.  Changes to common code
27033741c6SMauro Carvalho Chehab    are better than duplicating changes to vendor code.
28033741c6SMauro Carvalho Chehab
29033741c6SMauro Carvalho Chehab9.  Similarly, prefer changes to arch independent code than to arch dependent
30033741c6SMauro Carvalho Chehab    code.
31033741c6SMauro Carvalho Chehab
32033741c6SMauro Carvalho Chehab10. User/kernel interfaces and guest/host interfaces must be 64-bit clean
33033741c6SMauro Carvalho Chehab    (all variables and sizes naturally aligned on 64-bit; use specific types
34033741c6SMauro Carvalho Chehab    only - u64 rather than ulong).
35033741c6SMauro Carvalho Chehab
36033741c6SMauro Carvalho Chehab11. New guest visible features must either be documented in a hardware manual
37033741c6SMauro Carvalho Chehab    or be accompanied by documentation.
38033741c6SMauro Carvalho Chehab
39033741c6SMauro Carvalho Chehab12. Features must be robust against reset and kexec - for example, shared
40033741c6SMauro Carvalho Chehab    host/guest memory must be unshared to prevent the host from writing to
41033741c6SMauro Carvalho Chehab    guest memory that the guest has not reserved for this purpose.
42