xen/public: add comments regarding interface version bumps
PATCH 1/1 xen/public: add comments regarding interface version bumps
domctl.h and sysctl.h have an interface version, which needs to be bumped in case of incompatible modifications of the interface.
In order to avoid misunderstandings, add a comment to both headers specifying in which cases a bump is needed.
--- xen/include/public/domctl.h | 10 ++++++++++ xen/include/public/sysctl.h | 10 ++++++++++ 2 files changed, 20 insertions(+)
xen/include/public/domctl.h +10 -0
@@ -21,6 +21,16 @@#include "hvm/save.h" #include "memory.h" +/* +* The interface version needs to be incremented by 1 in case the interface +* is modified in an incompatible way AND if the version hasn't been +* incremented in the current development cycle already. +* Pure additions (e.g. new sub-commands) or compatible interface changes +* (e.g. adding semantics to 0-checked input fields or data to zeroed output +* fields) don't require a change of the version. +* +* Last version bump: Xen 4.19 +*/ #define XEN_DOMCTL_INTERFACE_VERSION 0x00000017/*
xen/include/public/sysctl.h +10 -0
@@ -18,6 +18,16 @@#include "domctl.h" #include "physdev.h" +/* +* The interface version needs to be incremented by 1 in case the interface +* is modified in an incompatible way AND if the version hasn't been +* incremented in the current development cycle already. +* Pure additions (e.g. new sub-commands) or compatible interface changes +* (e.g. adding semantics to 0-checked input fields or data to zeroed output +* fields) don't require a change of the version. +* +* Last version bump: Xen 4.17 +*/ #define XEN_SYSCTL_INTERFACE_VERSION 0x00000015/*
Signature · 1 line
2.43.0
Quoted 7 lines · Juergen Gross
domctl.handsysctl.hhave an interface version, which needs to be bumped in case of incompatible modifications of the interface.In order to avoid misunderstandings, add a comment to both headers specifying in which cases a bump is needed.
Signed-off-by Juergen Gross <[email protected]>
Hi Juergen,
Quoted 2 lines · Juergen Gross
domctl.handsysctl.hhave an interface version, which needs to be bumped in case of incompatible modifications of the interface.
What about vm_event.h?
Quoted 5 lines
In order to avoid misunderstandings, add a comment to both headers specifying in which cases a bump is needed.
Signed-off-by Juergen Gross <[email protected]>
Regardless my question above:
Cheers,
Signature · 1 line
Julien Grall
Quoted 7 lines · Julien Grall
Hi Juergen,
Quoted 2 lines · Juergen Gross
domctl.handsysctl.hhave an interface version, which needs to be bumped in case of incompatible modifications of the interface.What about
vm_event.h?
Indeed.
There seem to be others missing, too. Here a git grep output of possible candidates (including domctl.h, sysctl.h and vm_event.h):
arch-x86/xen-mca.h:#define XEN_MCA_INTERFACE_VERSION 0x01ecc003 domctl.h:#define XEN_DOMCTL_INTERFACE_VERSION 0x00000017 hvm/hvm_op.h:#define HVMOP_ALTP2M_INTERFACE_VERSION 0x00000001 platform.h:#define XENPF_INTERFACE_VERSION 0x03000001 sysctl.h:#define XEN_SYSCTL_INTERFACE_VERSION 0x00000015 vm_event.h:#define VM_EVENT_INTERFACE_VERSION 0x00000007 xsm/flask_op.h:#define XEN_FLASK_INTERFACE_VERSION 1
I can add another patch for the missing ones (or 1 patch for each?)
Quoted 10 lines
Quoted 6 lines
In order to avoid misunderstandings, add a comment to both headers specifying in which cases a bump is needed.
Signed-off-by Juergen Gross <[email protected]>Regardless my question above:
Acked-by Julien Grall <[email protected]>
Thanks,
Juergen
Quoted 20 lines · Jürgen Groß
Quoted 5 lines · Julien Grall
Quoted 2 lines · Juergen Gross
domctl.handsysctl.hhave an interface version, which needs to be bumped in case of incompatible modifications of the interface.What about
vm_event.h?Indeed.
There seem to be others missing, too. Here a git grep output of possible candidates (including
domctl.h,sysctl.handvm_event.h):arch-x86/xen-mca.h:#define
XEN_MCA_INTERFACE_VERSION0x01ecc003domctl.h:#defineXEN_DOMCTL_INTERFACE_VERSION0x00000017hvm/hvm_op.h:#defineHVMOP_ALTP2M_INTERFACE_VERSION0x00000001platform.h:#defineXENPF_INTERFACE_VERSION0x03000001sysctl.h:#defineXEN_SYSCTL_INTERFACE_VERSION0x00000015vm_event.h:#defineVM_EVENT_INTERFACE_VERSION0x00000007xsm/flask_op.h:#defineXEN_FLASK_INTERFACE_VERSION1
Quoted 1 line
I can add another patch for the missing ones (or 1 patch for each?)
Please don't. The situation is different there. Sysctl and domctl are unstable interfaces, hence to change them in incompatible ways a bump is all that's needed (in addition). That's quite different from cases where the interface itself is stable. The only possible exception to this is vm_event.h, which offers solely tools-only interfaces. I'm not sure though whether "just" bumping the interface version there is enough for an incompatible change to occur. Tamas?
Jan