qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Robert Reif <reif@earthlink.net>
Subject: Re: [Qemu-devel] [5849] Change MMIO callbacks to use offsets, 	not absolute addresses.
Date: Mon, 23 Feb 2009 17:04:28 +0000	[thread overview]
Message-ID: <200902231704.28500.paul@codesourcery.com> (raw)
In-Reply-To: <49A2D23F.4020007@earthlink.net>

On Monday 23 February 2009, Robert Reif wrote:
> Paul Brook wrote:
> > Should be fixed now.
>
> Not really.  This fixes that specific case but it doesn't fix the
> general case where a hardware device needs to call do_unassigned_access
> because the hardware device still only has the offset.

qemu has precisely zero devices that do this.

Also note that the current do_unaligned_access is bogus. You can't raise 
synchronous exceptions from IO handlers. MMU exceptions have special handling 
to make sure CPU state is consistent, and trap instructions explicitly 
synchronise virtual CPU state before raising the exception.

> You could store the physical base in each hardware device and recreate
> the physical address but that requires changing all hardware devices
> that need to do that.  Why should the hardware drivers go through the
> trouble to recreate a physical address when just a few instructions
> before then the physical address was known but irreversibly destroyed
> when it was converted to an offset.

Part of the reason for making this change is that it's a first step towards 
making devices bus agnostic. If you have an IOMMU then the address the device 
sees is different to the address the CPU sees. The most effective way to 
avoid problems with this to have the device not know/care.

Paul

  reply	other threads:[~2009-02-23 17:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-01 18:59 [Qemu-devel] [5849] Change MMIO callbacks to use offsets, not absolute addresses Paul Brook
2009-02-23 12:18 ` Robert Reif
2009-02-23 12:36   ` Paul Brook
2009-02-23 12:42     ` Robert Reif
2009-02-23 13:16       ` Paul Brook
2009-02-23 16:43         ` Robert Reif
2009-02-23 17:04           ` Paul Brook [this message]
2009-02-24  0:08             ` Robert Reif
2009-02-24  0:30               ` Paul Brook
2009-02-24  1:05                 ` Robert Reif
2009-02-24  1:12                   ` Paul Brook
2009-02-24  1:27                     ` Robert Reif
2009-02-24  1:50                       ` Paul Brook
2009-02-24 21:04                         ` Blue Swirl
2009-02-24 22:28                           ` Paul Brook
2009-02-25 19:54                             ` Blue Swirl
2009-02-26 15:19                               ` Paul Brook

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=200902231704.28500.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=reif@earthlink.net \
    /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).