qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target/mips: Disable R5900 support


From: Fredrik Noring
Subject: Re: [Qemu-devel] [PATCH] target/mips: Disable R5900 support
Date: Wed, 14 Nov 2018 16:30:46 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

Hi Philippe,

On Tue, Nov 13, 2018 at 11:51:54PM +0100, Philippe Mathieu-Daudé wrote:
> On Tue, Nov 13, 2018 at 8:29 PM Philippe Mathieu-Daudé
> <address@hidden> wrote:
> > On Tue, Nov 13, 2018 at 8:08 PM Aleksandar Markovic
> > <address@hidden> wrote:
> > >
> > > From: Aleksandar Markovic <address@hidden>
> > >
> > > Disable R5900 support. There are some outstanding issues related
> > > to ABI support and emulation accuracy, that were not understood
> > > well during review process. Disable to avoid backward compatibility
> > > issues.
> 
> If the issues you mentioned are "the R5900 tcg opcodes are not
> implemented correctly", then this patch is OK, because no cpu can use
> the R5900 opcodes.

The issue is that the Linux kernel emulates certain opcodes (e.g. LL, SC,
RDHWR, DMULT, etc.) by psABI requirements. This is a common requirement
for many other MIPS implementations, not only the R5900. It is trivial to
do this with QEMU user mode, but evidently for whatever reason Aleksandar
does not permit this emulation.

> At some point while reading your reviews, I understood the R5900
> patches introduced incorrect behaviors for the non-R5900 cpus. In this
> case this patch wouldn't suffice.

No, that was never the case and I'm not aware of any such problems.
However, there is a refactoring series, and we have observed preexisting
bugs in the MIPS emulation, unrelated to the R5900. The opcode decoder
could also be improved, such as in asserting reserved instructions in
more cases where opcodes are invalid, etc.

> Hoping I misinterpreted your reviews, then this patch is OK.
> With one of the suggested comments:
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> 
> Then we will fix this for the 4.0 release.

What exactly needs to be fixed regarding the psABI? The relevant opcodes
would need to stay, and not be prohibited and removed as Aleksandar has
suggested, since such opcode removal breaks the psABI requirements.

Finally, as Maciej explained in some detail, the document that Aleksandar
just recently requested is known to not exist, for any MIPS implementation,
so we are not going to make any progress on that either.

Fredrik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]