qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [5849] Change MMIO callbacks to use offsets, not absol


From: Paul Brook
Subject: Re: [Qemu-devel] [5849] Change MMIO callbacks to use offsets, not absolute addresses.
Date: Mon, 23 Feb 2009 17:04:28 +0000
User-agent: KMail/1.9.9

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 via email to

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