On Sat, 26 Mar 2022, Elliott Mitchell wrote:
> The hypercalls implementation for Linux and FreeBSD have two key headers,
> hypercall.h and hypervisor.h.  I'm curious why the implementations for
> x86 and ARM* are so distinct.
> 
> I found it fairly straightforward to implement ARM* versions of the x86
> _hypercall#() macros.  Once that is done, most of the wrappers in the x86
> hypercall.h can be moved to a shared hypervisor.h header.
> 
> Why does Xen/ARM on Linux still have hypercall.S when merging the
> headers should reduce maintainance?
> 
> Was GCC extended inline assembly language for ARM* thought too awful?
> 
> I'm also curious why these headers are part of the Linux kernel, instead
> of being maintained by the Xen Project?

I would have to dig through ancient archives to give you a full answer
but the reason was that the asm inline on ARM didn't provide enough
guarantees on ordering and registers it would use and clobber.

Reply via email to