All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Dominic Sweetman <dom@mips.com>
Cc: qemu-devel@nongnu.org, linux-mips@linux-mips.org,
	Jocelyn Mayer <l_indien@magic.fr>,
	Fabrice Bellard <fabrice@bellard.org>
Subject: Re: Qemu for MIPS
Date: Mon, 13 Jun 2005 13:56:10 +0100	[thread overview]
Message-ID: <20050613125610.GB4890@linux-mips.org> (raw)
In-Reply-To: <17069.29065.124810.728626@gargle.gargle.HOWL>

On Mon, Jun 13, 2005 at 12:44:09PM +0100, Dominic Sweetman wrote:

> > Known bugs:
> > 
> >  o ll/sc don't use a ll_bit like the real hardware thus right now any atomic
> >    functions aren't really atomic.
> 
> I suppose you know that the CPUs all implement "break link on
> exception" by zeroing the link bit on an 'eret'?  That doesn't sound
> too hard...

It's not hard to add the llbit indeed - maybe I'm trying to hard to be
obscure use compatible.  Generally Qemu is trading the highest accuracy
of emulation for speed ...

> Arguably, an emulator should not provide the LLaddr register at all.
> It's optional and "only available for debug" - and probably such
> debugging is possible another way in an emulator.  Robust software
> shouldn't depend on assuming the contents make sense.

The only use I've seen for this register is having it being used as a
cp0 scratch register allowing to save the entire 31 GPRs.  Very old
Linux/MIPS used to do that but it doesn't match the reality of MIPS ABIs,
so I gave up on that very soon.  Like 11 years agp :)

> Not quite there yet... but well done, again.

  Ralf

WARNING: multiple messages have this Message-ID (diff)
From: Ralf Baechle <ralf@linux-mips.org>
To: Dominic Sweetman <dom@mips.com>
Cc: linux-mips@linux-mips.org, Jocelyn Mayer <l_indien@magic.fr>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: Qemu for MIPS
Date: Mon, 13 Jun 2005 13:56:10 +0100	[thread overview]
Message-ID: <20050613125610.GB4890@linux-mips.org> (raw)
In-Reply-To: <17069.29065.124810.728626@gargle.gargle.HOWL>

On Mon, Jun 13, 2005 at 12:44:09PM +0100, Dominic Sweetman wrote:

> > Known bugs:
> > 
> >  o ll/sc don't use a ll_bit like the real hardware thus right now any atomic
> >    functions aren't really atomic.
> 
> I suppose you know that the CPUs all implement "break link on
> exception" by zeroing the link bit on an 'eret'?  That doesn't sound
> too hard...

It's not hard to add the llbit indeed - maybe I'm trying to hard to be
obscure use compatible.  Generally Qemu is trading the highest accuracy
of emulation for speed ...

> Arguably, an emulator should not provide the LLaddr register at all.
> It's optional and "only available for debug" - and probably such
> debugging is possible another way in an emulator.  Robust software
> shouldn't depend on assuming the contents make sense.

The only use I've seen for this register is having it being used as a
cp0 scratch register allowing to save the entire 31 GPRs.  Very old
Linux/MIPS used to do that but it doesn't match the reality of MIPS ABIs,
so I gave up on that very soon.  Like 11 years agp :)

> Not quite there yet... but well done, again.

  Ralf

  reply	other threads:[~2005-06-13 12:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-13 10:59 Qemu for MIPS Ralf Baechle
2005-06-13 10:59 ` [Qemu-devel] " Ralf Baechle
2005-06-13 11:44 ` Dominic Sweetman
2005-06-13 11:44   ` [Qemu-devel] " Dominic Sweetman
2005-06-13 12:56   ` Ralf Baechle [this message]
2005-06-13 12:56     ` Ralf Baechle
2005-06-13 11:50 ` [Qemu-devel] " Timo Savola
2005-06-13 12:41   ` Ralf Baechle
2005-06-13 12:47     ` Hetz Ben Hamo
2005-06-13 13:41       ` Ralf Baechle
2005-06-13 13:01   ` Thomas Petazzoni

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=20050613125610.GB4890@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=dom@mips.com \
    --cc=fabrice@bellard.org \
    --cc=l_indien@magic.fr \
    --cc=linux-mips@linux-mips.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.