xen/public: add missing Xenstore commands to xs_wire.h
PATCH 1/1 xen/public: add missing Xenstore commands to xs_wire.h
The GET_FEATURE, SET_FEATURE, GET_QUOTA and SET_QUOTA Xenstore commands are defined in docs/misc/xenstore.txt, but they are missing in xs_wire.h.
Add the missing commands to xs_wire.h
--- xen/include/public/io/xs_wire.h | 4 ++++ 1 file changed, 4 insertions(+)
xen/include/public/io/xs_wire.h +4 -0
@@ -35,6 +35,10 @@ enum xsd_sockmsg_type/* XS_RESTRICT has been removed */ XS_RESET_WATCHES =XS_SET_TARGET +2 ,XS_DIRECTORY_PART , +XS_GET_FEATURE , +XS_SET_FEATURE , +XS_GET_QUOTA , +XS_SET_QUOTA , XS_TYPE_COUNT, /* Number of valid types. */
Signature · 1 line
2.43.0
Quoted 16 lines · Juergen Gross
The
GET_FEATURE,SET_FEATURE,GET_QUOTAandSET_QUOTAXenstore commands are defined indocs/misc/xenstore.txt, but they are missing inxs_wire.h.Add the missing commands to
xs_wire.hSigned-off-by Juergen Gross <[email protected]>--- xen/include/public/io/xs_wire.h | 4 ++++ 1 file changed, 4 insertions(+)xen/include/public/io/xs_wire.h +0
-0
xen/include/public/io/xs_wire.h enum xsd_sockmsg_type · line 43
Quoted 9 lines
xen/include/public/io/xs_wire.h +4
-0@@ -35,6 +35,10 @@ enum xsd_sockmsg_type/* XS_RESTRICT has been removed */ XS_RESET_WATCHES =XS_SET_TARGET +2 ,XS_DIRECTORY_PART , +XS_GET_FEATURE , +XS_SET_FEATURE , +XS_GET_QUOTA , +XS_SET_QUOTA , XS_TYPE_COUNT, /* Number of valid types. */
This is effectively extending the ABI with request types that are recognized by neither cxenstored nor oxenstored. The assumption therefore appears to be that no client would have used those types / numbers either.
docs/misc/xenstore.txt doesn't spell out what the encoding of the commands is in the (binary) representation.
At the same time the effect of this change is a growth of cxenstored's wire_funcs[] array, adding four nil entries. Luckily the code accessing the array looks to be prepared for such. (Still I wonder whether the array wouldn't better be extended right away, by adding just the strings while leaving the handler function pointers at NULL.)
Provided all of the above is correct,
Jan
Quoted 25 lines · Jan Beulich
Quoted 24 lines · Juergen Gross
The
GET_FEATURE,SET_FEATURE,GET_QUOTAandSET_QUOTAXenstore commands are defined indocs/misc/xenstore.txt, but they are missing inxs_wire.h.Add the missing commands to
xs_wire.hSigned-off-by Juergen Gross <[email protected]>--- xen/include/public/io/xs_wire.h | 4 ++++ 1 file changed, 4 insertions(+)xen/include/public/io/xs_wire.h +4
-0@@ -35,6 +35,10 @@ enum xsd_sockmsg_type/* XS_RESTRICT has been removed */ XS_RESET_WATCHES =XS_SET_TARGET +2 ,XS_DIRECTORY_PART , +XS_GET_FEATURE , +XS_SET_FEATURE , +XS_GET_QUOTA , + XS_SET_QUOTA,
Quoted 5 lines
xen/include/public/io/xs_wire.h enum xsd_sockmsg_type · line 43
Quoted 1 line
xen/include/public/io/xs_wire.h +0
-0XS_TYPE_COUNT, /* Number of valid types. */This is effectively extending the ABI with request types that are recognized by neither cxenstored nor oxenstored. The assumption therefore appears to be that no client would have used those types / numbers either.
Yes, same as e.g. with new hypercall numbers or hypercall sub-options.
A Xenstore implementation not knowing about those new commands would reject them (this is the reason why we don't need a feature bit for new commands, again same as for new hypercalls).
Quoted 2 lines
docs/misc/xenstore.txtdoesn't spell out what the encoding of the commands is in the (binary) representation.
Indeed. I'll spawn another patch fixing that.
Quoted 3 lines
At the same time the effect of this change is a growth of cxenstored's wire_funcs[] array, adding four nil entries. Luckily the code accessing the array looks to be prepared for such. (Still I wonder whether the array
This isn't pure luck. It was done on purpose. Please note that the array is sparse already, as XS_RESTRICT has been removed in the past (this is even visible in the context above).
Quoted 2 lines
wouldn't better be extended right away, by adding just the strings while leaving the handler function pointers at NULL.)
No, I don't think so. This should be done when implementing the new commands.
Quoted 2 lines
Provided all of the above is correct,
Reviewed-by Jan Beulich <[email protected]>
Thanks,
Juergen