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 absolu


From: Paul Brook
Subject: Re: [Qemu-devel] [5849] Change MMIO callbacks to use offsets, not absolute addresses.
Date: Tue, 24 Feb 2009 00:30:29 +0000
User-agent: KMail/1.9.9

> Sparc devices are passed in their physical addresses.  They are
> currently hard wired
> because there is no proper bus/slot layer and only on-broad devices are
> implemented
> anyway.  However each system may have the same hardware located at
> different locations
> so this may not be typical QEMU behavior. Real hardware deals with real
> addresses.

Oh real hardware address decoding is typically implemented as chip selects in 
the host bridge, routing tables in the switch fabric, and/or having 
individual devices do address decoding and claiming transactions on a shared 
bus. Modelling full per-device address decoding simply isn't feasible, we 
have to use additional knowledge (e.g. PCI BARs or fixed address fanges) to 
perform that decoding at a higher level.

> An IOMMU is irrelevant because the IOMMU emulation will take care of the
> virtual to physical translation.

Not really. An IOMMU exists as part of a bus bridge, and translates between 
different physical addresses on different busses. Virtual addresses (at least 
in any conventional sense) are an entirely separate layer that exists only 
within the CPU. Admittedly most IOMMU only act on device->CPU transactions, 
with CPU->device accesses using a static mapping.

I'm pretty sure that the address reported by the CPU fault registers is the 
CPU bus address. With an IOMMU this is likely to be different to the address 
seen by the peripheral.

Paul






reply via email to

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