[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] target/mips: Complete UHI errno list and log unexpected
From: |
Peter Maydell |
Subject: |
Re: [PATCH 4/4] target/mips: Complete UHI errno list and log unexpected errors |
Date: |
Sun, 4 Jul 2021 18:23:31 +0100 |
On Sun, 4 Jul 2021 at 18:07, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> The spec only defines a set of host errno to translate to guest.
> Complete the current errno set, and log unexpected errno (they
> are currently replaced by EINVAL, which is dubious, but we don't
> modify this).
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
This commit adds the definition of the guest EINVAL:
> + uhi_errno_insert(EINVAL, 22);
> @@ -126,6 +162,8 @@ static int errno_mips(int host_errno)
> NULL, &uhi_errno)) {
> return GPOINTER_TO_INT(uhi_errno);
> }
> + qemu_log("semihosting: Illegal UHI errno: %d\n", host_errno);
> +
> return EINVAL; /* Not reachable per the specification */
> }
...but it leaves the default case returning the host EINVAL.
thanks
-- PMM