On 02/12/2022 10:55, Edwin Török wrote:
> Not to be confused which hvm_get_param, which also exists and has a
> different, more error-prone interface.
>
> This one always returns a 64-bit value, and that is retained in the
> OCaml binding as well, returning 'int64' (and not int, or nativeint
> which might have a different size).
>
> The integer here is unsigned in the C API, however OCaml only has signed 
> integers.
>
> No bits are lost, it is just a matter of interpretation when printing
> and for certain arithmetic operations, however in the cases where the
> MSB is set it is very likely that the value is an address and no
> arithmetic should be performed on the OCaml side on it.
> (this is not a new problem with this binding, but worth mentioning given
> the difference in types)
>
> Signed-off-by: Edwin Török <[email protected]>

Reviewed-by: Andrew Cooper <[email protected]>

Reply via email to