On 17.04.2024 14:14, Michal Orzel wrote:
> Commit afab29d0882f ("public: s/int/int32_t") replaced int with int32_t
> in XEN_GUEST_HANDLE() in memory.h but there is no guest handle defined
> for it. This results in a build failure. Example on Arm:
> 
> ./include/public/arch-arm.h:205:41: error: unknown type name 
> ‘__guest_handle_64_int32_t’
>   205 | #define __XEN_GUEST_HANDLE(name)        __guest_handle_64_ ## name
>       |                                         ^~~~~~~~~~~~~~~~~~
> ./include/public/arch-arm.h:206:41: note: in expansion of macro 
> ‘__XEN_GUEST_HANDLE’
>   206 | #define XEN_GUEST_HANDLE(name)          __XEN_GUEST_HANDLE(name)
>       |                                         ^~~~~~~~~~~~~~~~~~
> ./include/public/memory.h:277:5: note: in expansion of macro 
> ‘XEN_GUEST_HANDLE’
>   277 |     XEN_GUEST_HANDLE(int32_t) errs;
> 
> Fix it. Also, drop guest handle definition for int given no further use.

Such cannot be done like this. Consumers of the header may have grown their
own uses. The declaration needs to remain active for any consumers
supplying __XEN_INTERFACE_VERSION__ < 0x00041900. Which means you need to
bump __XEN_LATEST_INTERFACE_VERSION__ and wrap the handle type declaration
in #ifdef. Provided the removal of that handle type for newer interface
versions is really warranting all this effort.

Jan

Reply via email to