Re: [PATCH Linux v6 16/16] xen/privcmd: Add new ABI to allow copying foreign memory

Frediano Ziglio <[email protected]> Mon, 3 Aug 2026 15:23:33 +0100
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <CAHt6W4dMZtyvMuAfFVG36z53b=a5m6P5gQ4HONGO3WzOBUJ-qw@mail.gmail.com>
On Mon, 3 Aug 2026 at 15:05, Juergen Gross <[email protected]> wrote:
>
> On 19.06.26 15:05, Frediano Ziglio wrote:
> > This new ABI allows to copy foreign domain memory to/from a buffer.
> > This avoids having to map/copy/unmap foreign memory which is
> > expensive.
> > This operation is done particularly when migrating VMs.
> >
> > Signed-off-by: Frediano Ziglio <[email protected]>
>
> While doing a test build I got the following build failures for 32-bit arm:
>
>    CC      arch/arm/xen/enlighten.o
> In file included from /home/gross/korg/src/arch/arm/include/asm/xen/interface.h:1,
>                   from /home/gross/korg/src/include/xen/interface/xen.h:13,
>                   from /home/gross/korg/src/include/xen/xen.h:52,
>                   from /home/gross/korg/src/arch/arm/xen/enlighten.c:2:
> /home/gross/korg/src/include/xen/arm/interface.h:22:35: error: unknown type name
> '__guest_handle_uint8_t'
>     22 | #define GUEST_HANDLE(name)        __guest_handle_ ## name
>        |                                   ^~~~~~~~~~~~~~~
> /home/gross/korg/src/include/xen/interface/memory.h:361:5: note: in expansion of
> macro 'GUEST_HANDLE'
>    361 |     GUEST_HANDLE(uint8_t) buffer;
>        |     ^~~~~~~~~~~~
> make[5]: *** [/home/gross/korg/src/scripts/Makefile.build:289:
> arch/arm/xen/enlighten.o] Error 1
> make[4]: *** [/home/gross/korg/src/scripts/Makefile.build:549: arch/arm/xen] Error 2
> make[3]: *** [/home/gross/korg/src/scripts/Makefile.build:549: arch/arm] Error 2
>
>
> Please fix those.
>
>
> Juergen

Mumble...

I suppose this would fix it

diff --git a/include/xen/arm/interface.h b/include/xen/arm/interface.h
index c3eada2642aa..7e79853b188d 100644
--- a/include/xen/arm/interface.h
+++ b/include/xen/arm/interface.h
@@ -53,6 +53,7 @@ DEFINE_GUEST_HANDLE(int);
 DEFINE_GUEST_HANDLE(void);
 DEFINE_GUEST_HANDLE(uint64_t);
 DEFINE_GUEST_HANDLE(uint32_t);
+DEFINE_GUEST_HANDLE(uint8_t);
 DEFINE_GUEST_HANDLE(xen_pfn_t);
 DEFINE_GUEST_HANDLE(xen_ulong_t);

Frediano