[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: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 4/4] target/mips: Complete UHI errno list and log unexpected errors |
Date: |
Sun, 4 Jul 2021 20:25:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/4/21 7:23 PM, Peter Maydell wrote:
> 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.
Good catch, thank you!