On Wed, Jun 16, 2021 at 06:04:02PM +0200, Jan Beulich wrote: > All, > > several years back do_memory_op() in libxc was changed to have "long" > return type. This is because some of the sub-ops return potentially > large values as the hypercall return value (i.e. not in an argument > structure field). This change, however, didn't have the intended > effect from all I can tell, which apparently manifests in the present > two remaining ovmf failures in the staging osstest flights. Anthony > tells me that ovmf as of not very long ago puts the shared info page > at a really high address, thus making the p2m of the guest very large. > Its size gets returned by XENMEM_maximum_gpfn, as function return > value. > > Since hypercalls from the tool stack are based on ioctl(), and since > ioctl() has a return type of "int", I'm afraid there's no way we can > deal with this by adjusting function return types in the libraries. > Instead we appear to need either a new privcmd ioctl or new XENMEM_* > subops (for those cases where potentially large values get returned).
AFAICT NetBSD and FreeBSD are not affected by this issue as the hypercall return value is propagated to the caller using a long field in the ioctl structure payload for hypercalls. osdep_hypercall however should be fixed in libs/call in order to return a long instead of an int, and wrappers around it should also be adjusted. Roger.