qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Zak <richard.j.zak@gmail.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 1/2] Fix for Haiku
Date: Sun, 4 Jul 2021 12:39:51 -0400	[thread overview]
Message-ID: <CAOakUfNZ5K-tVNQZZZWQ2U7-fbw_4TnFSfKXXV2nRpTGVC-LLA@mail.gmail.com> (raw)
In-Reply-To: <0a17d006-b1ef-ab1e-8616-50e29681f998@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4650 bytes --]

Regarding upside down text, where did that occur? I certainly didn't do
that intentionally. Maybe an encoding error somewhere?

I'll work on incorporating the changes in the patch file. I'll make another
post where the other configure changes are in place, without the target
exclude list.

În dum., 4 iul. 2021 la 12:23, Thomas Huth <thuth@redhat.com> a scris:

>
> Meta comment: Please avoid
> ƃuıʇsod uʍop ǝpısdn
> ... it makes threads much harder to read.
>
> On 04/07/2021 16.20, Richard Zak wrote:
> > Exactly. One of the developers on the Haiku forum shared with me the
> patch
> > that Haiku uses for qemu, and it has a few lines concerning error codes.
> > I'll look into this.
> >
> https://github.com/haikuports/haikuports/blob/14c2cab5428145b93232cb69683a67bbe68a9f06/app-emulation/qemu/patches/qemu-3.1.1.1.patchset
>
> So something like the change in target/xtensa/xtensa-semi.c is the right
> way
> to go - using a switch-case statement looks like the right fix instead of
> disabling the targets in the configure script.
>
> > This is a stopper for the configure script changes?
>
> Well, if anyhow possible, we should avoid hacks like disabling a target in
> the configure script. Since this problem seems to be understood, you
> should
> aim for the right fix instead.
>
>   Thomas
>
> > În dum., 4 iul. 2021 la 05:30, Philippe Mathieu-Daudé <f4bug@amsat.org
> > <mailto:f4bug@amsat.org>> a scris:
> >
> >     On 7/4/21 11:27 AM, Philippe Mathieu-Daudé wrote:
> >      > On 7/4/21 11:03 AM, Philippe Mathieu-Daudé wrote:
> >      >> On 7/4/21 12:06 AM, Richard Zak wrote:
> >      >>> For MIPS (all sub-targets, 64-bit and EL) & xtensa(eb), the
> compiler
> >      >>> complains about running out of memory. Best I can see, that's
> not what
> >      >>> actually happens, but that's the error message. I was going to
> >      >>> investigate this later, but this was the error which was
> causing the
> >      >>> test with the Haiku VM with that corresponding make target. My
> >     desktop &
> >      >>> laptop have 64 GB, and I'm pretty sure it didn't get to that
> point.
> >      >>>
> >      >>>
> >      >
> >
>  /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld:
> >      >>> final link failed: memory exhausted
> >      >
> >      >> See how Haiku handles POSIX errno:
> >      >>
> >      >>
> >
> https://github.com/haiku/haiku/blob/master/headers/os/support/Errors.h
> >     <
> https://github.com/haiku/haiku/blob/master/headers/os/support/Errors.h>
> >      >>
> >      >> #define B_GENERAL_ERROR_BASE   INT_MIN
> >      >>
> >      >> #define B_POSIX_ERROR_BASE     (B_GENERAL_ERROR_BASE + 0x7000)
> >      >>
> >      >> #define B_POSIX_ENOMEM  B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 0)
> >      >> #define E2BIG           B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 1)
> >      >> #define ECHILD          B_TO_POSIX_ERROR(B_POSIX_ERROR_BASE + 2)
> >      >> ...
> >      >>
> >      >
> >      > Same problem with Xtensa:
> >      >
> >      > static uint32_t errno_h2g(int host_errno)
> >      > {
> >      >     static const uint32_t guest_errno[] = {
> >      >         [EPERM]         = TARGET_EPERM,
> >      >         [ENOENT]        = TARGET_ENOENT,
> >      >         [ESRCH]         = TARGET_ESRCH,
> >      >         [EINTR]         = TARGET_EINTR,
> >      >         [EIO]           = TARGET_EIO,
> >      >         [ENXIO]         = TARGET_ENXIO,
> >      >         [E2BIG]         = TARGET_E2BIG,
> >      >         [ENOEXEC]       = TARGET_ENOEXEC,
> >      > ...
> >
> >     Annoyingly enough this is also how linux-user/syscall.c does
> >     (thinking about code re-use):
> >
> >     /*
> >       * This list is the union of errno values overridden in
> asm-<arch>/errno.h
> >       * minus the errnos that are not actually generic to all archs.
> >       */
> >     static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = {
> >          [EAGAIN]            = TARGET_EAGAIN,
> >          [EIDRM]             = TARGET_EIDRM,
> >          [ECHRNG]            = TARGET_ECHRNG,
> >          [EL2NSYNC]          = TARGET_EL2NSYNC,
> >          [EL3HLT]            = TARGET_EL3HLT,
> >          [EL3RST]            = TARGET_EL3RST,
> >     ...
> >
> >
> >
> > --
> > Regards,
> >
> > Richard J. Zak
> > Professional Genius
> > PGP Key: https://keybase.io/rjzak/key.asc <
> https://keybase.io/rjzak/key.asc>
>
>

-- 
Regards,

Richard J. Zak
Professional Genius
PGP Key: https://keybase.io/rjzak/key.asc

[-- Attachment #2: Type: text/html, Size: 6919 bytes --]

  reply	other threads:[~2021-07-04 16:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-03 21:10 [PATCH 1/2] Fix for Haiku Richard Zak
2021-07-03 21:39 ` Peter Maydell
2021-07-03 22:06   ` Richard Zak
2021-07-04  9:03     ` Philippe Mathieu-Daudé
2021-07-04  9:27       ` Philippe Mathieu-Daudé
2021-07-04  9:30         ` Philippe Mathieu-Daudé
2021-07-04 14:20           ` Richard Zak
2021-07-04 16:16             ` Thomas Huth
2021-07-04 16:39               ` Richard Zak [this message]
2021-07-04 16:51                 ` Thomas Huth
2021-07-04 16:58                   ` Richard Zak
2021-07-04 18:34                     ` Thomas Huth
2021-07-04  7:29 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOakUfNZ5K-tVNQZZZWQ2U7-fbw_4TnFSfKXXV2nRpTGVC-LLA@mail.gmail.com \
    --to=richard.j.zak@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).