hough I think you can give it a spin with the old ones, if you
need). I'll also take care of submitting PCI ids to be merged into Linux.
In any case, let me know what you think. I hope I didn't forget to Cc someone.
Cheers,
Eduard
Eduard - Gabriel Munteanu (13):
Generic DMA m
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/rtl8139.c | 98 ++---
1 files changed, 52 insertions(+), 46 deletions(-)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index c7c7a3c
airly good approximation.
Note this doesn't handle AHCI emulation yet!
Signed-off-by: Eduard - Gabriel Munteanu
---
dma-helpers.c | 23 ++-
dma.h |4 +++-
hw/ide/ahci.c |3 ++-
hw/ide/internal.h |1 +
hw/ide/macio.c|4 ++--
hw
IOMMUs can now be hooked onto the PCI bus. This makes use of the generic
DMA layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.c |7 +++
hw/pci.h |9 +
hw/pci_internals.h |1 +
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/e1000.c | 27 +++
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index f160bfc..acfd329 100644
--- a/hw/e1000.c
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/ac97.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ac97.c b/hw/ac97.c
index d71072d..bad38fb 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -223,7
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/es1370.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/es1370.c b/hw/es1370.c
index 40cb48c..1645dbd 100644
--- a/hw/es1370.c
+++ b/hw/es1370.c
This introduces replacements for memory access functions like
cpu_physical_memory_read(). The new interface can handle address
translation and access checking through an IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +-
hw/dma_rw.c | 155
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pcnet-pci.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 9415a1e..6c2186e 100644
--- a/hw/pcnet-pci.c
+++ b/hw
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/lsi53c895a.c | 24
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index be4df58..7bfc604 100644
--- a/hw
This introduces emulation for the AMD IOMMU, described in "AMD I/O
Virtualization Technology (IOMMU) Specification".
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +-
hw/amd_iommu.c | 712 +++
hw/pc.c
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/usb-uhci.c | 26 ++
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 346db3e..1661e54 100644
--- a/hw/usb
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/eepro100.c | 95 ++--
1 files changed, 51 insertions(+), 44 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/usb-ohci.c | 46 +++---
1 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index d21c820..9d1cf91
On Wed, Jun 01, 2011 at 07:01:42AM -0700, Richard Henderson wrote:
> On 05/31/2011 06:38 PM, Eduard - Gabriel Munteanu wrote:
> > +static inline void dma_memory_rw(DMADevice *dev,
> > + dma_addr_t addr,
> > +
On Wed, Jun 01, 2011 at 08:09:29AM -0700, Richard Henderson wrote:
> On 06/01/2011 07:52 AM, Eduard - Gabriel Munteanu wrote:
> > The main selling point is there are more chances to screw up if every
> > bus layer implements these manually. And it's really convenient,
> &g
On Thu, Jun 02, 2011 at 09:43:32AM -0700, Richard Henderson wrote:
> On 06/02/2011 08:12 AM, David Gibson wrote:
> > +err = iommu->translate(dev, addr, &paddr, &plen, is_write);
> > +if (err) {
> > +return NULL;
> > +}
> > +
> > +/*
> > + * If this is true, the virtual r
On Thu, Jun 02, 2011 at 12:28:53PM -0700, Richard Henderson wrote:
> On 06/02/2011 10:35 AM, Eduard - Gabriel Munteanu wrote:
> > My latest patches seem to have fixed that:
> >
> > +if (plen < *len) {
> > +*len = plen;
> > +}
> > +
> &g
es will given information about any necessary IOMMU translation.
> >
> > DMA using devices must obtain a DMAContext (or, potentially, contexts)
> > from their bus or platform. For now this patch just converts the PCI
> > wrappers to be implemented in terms of the universal wrap
converts the PCI
> wrappers to be implemented in terms of the universal wrappers,
> converting other drivers can take place over time.
>
> Cc: Michael S. Tsirkin
> Cc: Joerg Rodel
> Cc: Eduard - Gabriel Munteanu
> Cc: Richard Henderson
>
> Signed-off-by: David Gibson
On Mon, Feb 27, 2012 at 12:33:49PM +0200, Michael S. Tsirkin wrote:
> On Mon, Feb 27, 2012 at 11:22:43AM +1100, David Gibson wrote:
> > On Sun, Feb 26, 2012 at 12:04:49PM +0200, Michael S. Tsirkin wrote:
> > > On Fri, Feb 24, 2012 at 02:27:39PM +1100, David Gibson wrote:
[snip]
> > >
> > > I'm a
On Thu, Sep 01, 2011 at 03:00:53PM +1000, David Gibson wrote:
> A while back, Eduard - Gabriel Munteanu send a series of patches
> implementing support for emulating the AMD IOMMU in conjunction with
> qemu emulated PCI devices. A revised patch series added support for
> the Intel
On Fri, Sep 02, 2011 at 11:37:25AM +0300, Avi Kivity wrote:
> On 09/01/2011 07:05 PM, Anthony Liguori wrote:
> >
> > The challenge is what you do about something like ne2k where the core
> > chipset can either be a PCI device or an ISA device. You would have
> > to implement a wrapper around pci
On Thu, Apr 21, 2011 at 05:03:47PM +1000, David Gibson wrote:
> A few months ago, Eduard - Gabriel Munteanu posted a series of patches
> implementing support for emulating the AMD PCI IOMMU
> (http://lists.nongnu.org/archive/html/qemu-devel/2011-01/msg03196.html).
>
> In fa
On Tue, May 10, 2011 at 11:44:26AM +1000, David Gibson wrote:
> On Thu, Apr 21, 2011 at 09:47:31PM +0300, Eduard - Gabriel Munteanu wrote:
> > On Thu, Apr 21, 2011 at 05:03:47PM +1000, David Gibson wrote:
> > > A few months ago, Eduard - Gabriel Munteanu posted a
). Clients (devices) must
provide callbacks for map invalidation in case these maps are
persistent beyond the current I/O context, e.g. AIO DMA transfers.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.c | 191 +++-
hw/pci.h
On Mon, Aug 30, 2010 at 01:08:23AM +0300, Eduard - Gabriel Munteanu wrote:
> PCI devices should access memory through pci_memory_*() instead of
> cpu_physical_memory_*(). This also provides support for translation and
> access checking in case an IOMMU is emulated.
>
> Memory maps
On Mon, Aug 30, 2010 at 12:07:30PM +0900, Isaku Yamahata wrote:
> On Sat, Aug 28, 2010 at 05:54:54PM +0300, Eduard - Gabriel Munteanu wrote:
> > diff --git a/hw/pc.c b/hw/pc.c
> > index a96187f..e2456b0 100644
> > --- a/hw/pc.c
> > +++ b/hw/pc.c
> > @@ -1068,6 +
On Tue, Aug 31, 2010 at 11:29:53PM +0300, Michael S. Tsirkin wrote:
> On Sat, Aug 28, 2010 at 05:54:52PM +0300, Eduard - Gabriel Munteanu wrote:
> > The conversion was done using the GNU 'expand' tool (default settings)
> > to make it obey the QEMU coding style.
>
On Thu, Sep 02, 2010 at 08:28:26AM +0300, Michael S. Tsirkin wrote:
> On Sat, Aug 28, 2010 at 05:54:53PM +0300, Eduard - Gabriel Munteanu wrote:
> > PCI devices should access memory through pci_memory_*() instead of
> > cpu_physical_memory_*(). This also provides support for
On Wed, Sep 01, 2010 at 10:10:30PM +0200, Stefan Weil wrote:
> Please see my comments at the end of this mail.
>
>
> Am 30.08.2010 00:08, schrieb Eduard - Gabriel Munteanu:
> > PCI devices should access memory through pci_memory_*() instead of
> > cpu_physical_memory
On Thu, Sep 02, 2010 at 09:00:46AM +0300, Michael S. Tsirkin wrote:
> On Wed, Sep 01, 2010 at 10:10:30PM +0200, Stefan Weil wrote:
> > >+static inline void pci_memory_read(PCIDevice *dev,
> > >+ pcibus_t addr,
> > >+ uint8_t *buf,
> > >+ pcibus_t len)
> > >+{
> > >+ pci_memory_rw(dev, addr, buf, le
On Thu, Sep 02, 2010 at 08:19:11AM +0300, Michael S. Tsirkin wrote:
> On Sat, Aug 28, 2010 at 05:54:55PM +0300, Eduard - Gabriel Munteanu wrote:
> > Emulated PCI IDE controllers now use the memory access interface. This
> > also allows an emulated IOMMU to translate and
On Thu, Sep 02, 2010 at 12:58:13PM +0300, Michael S. Tsirkin wrote:
> On Thu, Sep 02, 2010 at 12:12:00PM +0300, Eduard - Gabriel Munteanu wrote:
> > On Thu, Sep 02, 2010 at 08:19:11AM +0300, Michael S. Tsirkin wrote:
> > > On Sat, Aug 28, 2010 at 05:54:55PM +0300, Eduard - Gabr
On Thu, Sep 02, 2010 at 06:05:39PM +0200, Stefan Weil wrote:
> Am 02.09.2010 10:51, schrieb Eduard - Gabriel Munteanu:
[snip]
> >> The functions pci_memory_read and pci_memory_write not only read
> >> or write byte data but many different data types which leads to
> &
On Mon, Sep 13, 2010 at 10:01:20PM +0200, Michael S. Tsirkin wrote:
> So I think the following will give the idea of what an API
> might look like that will let us avoid the scary hacks in
> e.g. the ide layer and other generic layers that need to do DMA,
> without either binding us to pci, adding
On Mon, Sep 13, 2010 at 03:45:34PM -0500, Anthony Liguori wrote:
> On 09/13/2010 03:01 PM, Michael S. Tsirkin wrote:
> > So I think the following will give the idea of what an API
> > might look like that will let us avoid the scary hacks in
> > e.g. the ide layer and other generic layers that need
On Thu, Sep 16, 2010 at 11:20:43AM +0200, Michael S. Tsirkin wrote:
> On Thu, Sep 16, 2010 at 10:06:16AM +0300, Eduard - Gabriel Munteanu wrote:
[snip]
>
> No, DMADevice is a device that does DMA.
> So e.g. a PCI device would embed one.
> Remember, traslations are per device, rig
On Tue, May 25, 2010 at 10:39:22AM +0200, Joerg Roedel wrote:
> On Mon, May 24, 2010 at 08:10:16PM +, Blue Swirl wrote:
> > On Mon, May 24, 2010 at 3:40 PM, Joerg Roedel wrote:
> > >> +
> > >> +#define MMIO_SIZE ? ? ? ? ? ? ? 0x2028
> > >
> > > This size should be a power-of-two value. In this
tches soon.
Cheers,
Eduard
Eduard - Gabriel Munteanu (13):
Generic DMA memory access interface
pci: add IOMMU support via the generic DMA layer
AMD IOMMU emulation
ide: use the DMA memory access interface for PCI IDE controllers
rtl8139: use the DMA memory access interface
eepro10
This introduces replacements for memory access functions like
cpu_physical_memory_read(). The new interface can handle address
translation and access checking through an IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +-
hw/dma_rw.c | 124
IOMMUs can now be hooked onto the PCI bus. This makes use of the generic
DMA layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.c |7 +++
hw/pci.h |7 +++
hw/pci_internals.h |1 +
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/hw
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/e1000.c | 26 +++---
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index af101bd..0d71650 100644
--- a/hw/e1000.c
This introduces emulation for the AMD IOMMU, described in "AMD I/O
Virtualization Technology (IOMMU) Specification".
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +-
hw/amd_iommu.c | 694 +++
hw/pc.c
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/ac97.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ac97.c b/hw/ac97.c
index d71072d..383c1b3 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -223,7
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/es1370.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/es1370.c b/hw/es1370.c
index 40cb48c..8b1a405 100644
--- a/hw/es1370.c
+++ b/hw/es1370.c
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/eepro100.c | 97 +---
1 files changed, 57 insertions(+), 40 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/usb-uhci.c | 26 ++
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index b9b822f..01b7f8b 100644
--- a/hw/usb
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/lsi53c895a.c | 24
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 0129ae3..76bd631 100644
--- a/hw
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/usb-ohci.c | 54 +-
1 files changed, 37 insertions(+), 17 deletions(-)
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index 240e840
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/rtl8139.c | 100 +-
1 files changed, 57 insertions(+), 43 deletions(-)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index a22530c
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pcnet-pci.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 339a401..3f55c42 100644
--- a/hw/pcnet-pci.c
+++ b/hw
airly good approximation.
Note this doesn't handle AHCI emulation yet!
Signed-off-by: Eduard - Gabriel Munteanu
---
dma-helpers.c | 23 ++-
dma.h |4 +++-
hw/ide/ahci.c |3 ++-
hw/ide/internal.h |1 +
hw/ide/macio.c|4 ++--
hw
pci_find_capability() looks up a given capability and returns its
offset. This is needed by AMD IOMMU initialization code.
Signed-off-by: Eduard - Gabriel Munteanu
---
src/pci.c | 15 +++
src/pci.h |1 +
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/pci.c
This initializes the AMD IOMMU and creates ACPI tables for it.
Signed-off-by: Eduard - Gabriel Munteanu
---
src/acpi.c | 84
src/config.h |3 ++
src/pci_ids.h |1 +
src/pci_regs.h |1 +
src/pciinit.c | 29
This clarifies the address space layout by commenting on where APIC,
IOAPIC and AMD IOMMU building regions end.
Signed-off-by: Eduard - Gabriel Munteanu
---
src/config.h |9 +
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/config.h b/src/config.h
index 0ba5723
Hi,
Here are the SeaBIOS parts that initialize the AMD IOMMU.
I was told an ack from other QEMU/KVM developers would be nice, so please have
a look.
Thanks,
Eduard
Eduard - Gabriel Munteanu (3):
pci: add pci_find_capability() helper
AMD IOMMU support
Clarify address space layout
On Sun, Feb 06, 2011 at 01:47:57PM +0200, Michael S. Tsirkin wrote:
> On Fri, Feb 04, 2011 at 01:24:14AM +0200, Eduard - Gabriel Munteanu wrote:
Hi,
[snip]
> > +/*
> > + * IVRS (I/O Virtualization Reporting Structure) table.
> > + *
> > + * Describes the AMD IOMM
Hi,
I'm working on implementing AMD IOMMU emulation in QEMU/KVM and I'm also
creating an API for address translation and access checking. Ideally,
this API should work with different kinds of devices and IOMMUs. These
operations would typically require specific device information to figure
out whi
On Mon, Jun 21, 2010 at 03:07:13PM +0100, Paul Brook wrote:
> > So I've been looking for a way to obtain things like a PCIDevice from a
> > more generic structure (say from hw/qdev.h),
>
> If you're having to figure out what kind of a device you have then I think
> you're already doing something
IDE and
RTL8139 working, and Linux boots and works well with the IOMMU enabled.
Cheers,
Eduard
diff --git a/hw/iommu.c b/hw/iommu.c
new file mode 100644
index 000..410c88c
--- /dev/null
+++ b/hw/iommu.c
@@ -0,0 +1,83 @@
+/*
+ * IOMMU layer
+ *
+ * Copyright (c) 2010 Eduard - Ga
On Wed, Jun 30, 2010 at 09:37:31AM +0100, Stefan Hajnoczi wrote:
> On Tue, Jun 29, 2010 at 6:25 PM, Eduard - Gabriel Munteanu
> wrote:
> > On the other hand, we could just leave it alone for now. Changing
> > mappings during DMA is stupid anyway: I don't think the gu
On Fri, Jul 02, 2010 at 09:03:39AM +0100, Stefan Hajnoczi wrote:
> > That's true, but it's fair to be concerned about the guest itself.
> > Imagine it runs some possibly malicious apps which program the hardware
> > to do DMA. That should be safe when a IOMMU is present.
> >
> > But suddenly the gu
On Fri, Jul 02, 2010 at 06:41:55PM +0900, Isaku Yamahata wrote:
> On Fri, Jul 02, 2010 at 09:03:39AM +0100, Stefan Hajnoczi wrote:
> > On Thu, Jul 1, 2010 at 8:30 PM, Eduard - Gabriel Munteanu
> > wrote:
> > > But suddenly the guest OS changes mappings and expects the IOM
good idea
- implementing features not used by Linux (e.g. interrupt remapping)
That being said, any feedback is welcome.
Thanks,
Eduard
P.S.: I'd also like to thank Paul Brook for his help on figuring out
some aspects of the IOMMU layer.
Eduard - Gabriel Munteanu (7):
Gen
Memory accesses must go through the IOMMU layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/ac97.c | 20 +---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/hw/ac97.c b/hw/ac97.c
index 4319bc8..0e30d80 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -15,6 +15,7
Memory accesses must go through the IOMMU layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/ide/core.c | 46 +++---
1 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 0b3b7c2..7f8f7df 100644
--- a
-specific hooks for this
layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |1 +
hw/iommu.c | 82 +
hw/iommu.h | 260 +++
hw/qdev.h |6 ++
4 files changed, 349 insertions(+), 0 deletions
Memory accesses must go through the IOMMU layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.c | 21 +
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 6871728..9c5d706 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -22,6 +22,7
This introduces emulation for the AMD IOMMU, described in "AMD I/O
Virtualization Technology (IOMMU) Specification".
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +
configure | 11 +
hw/amd_iommu
Memory accesses must go through the IOMMU layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/eepro100.c | 141 +
1 files changed, 101 insertions(+), 40 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 97afa2c..74e1d15
Memory accesses must go through the IOMMU layer.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/rtl8139.c | 98 -
1 files changed, 62 insertions(+), 36 deletions(-)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 72e2242..0f78a69 100644
On Wed, Jul 14, 2010 at 10:07:20AM +0400, malc wrote:
> On Wed, 14 Jul 2010, Eduard - Gabriel Munteanu wrote:
>
> > This provides an API for abstracting IOMMU functions. Hardware emulation
> > code can use it to request address translation and access checking. In
> > th
On Wed, Jul 14, 2010 at 04:37:39PM +0900, Isaku Yamahata wrote:
> On Wed, Jul 14, 2010 at 08:45:03AM +0300, Eduard - Gabriel Munteanu wrote:
[snip]
> > PCIDevice *pci_register_device(PCIBus *bus, const char *name,
> > int instance_
On Wed, Jul 14, 2010 at 02:53:03PM +0100, Paul Brook wrote:
> > Memory accesses must go through the IOMMU layer.
>
> No. Devices should not know or care whether an IOMMU is present.
They don't really care. iommu_get() et al. are convenience functions
which can and do return NULL when there's no I
On Wed, Jul 14, 2010 at 09:13:44PM +0100, Paul Brook wrote:
> Well, ok, the function name needs fixing too. However I think the only thing
> missing from the current API is that it does not provide a way to determine
> which device is performing the access.
>
> Depending how the we decide to h
On Thu, Jul 15, 2010 at 07:45:06AM -0500, Anthony Liguori wrote:
>
> No. PCI devices should never call cpu_physical_memory*.
>
> PCI devices should call pci_memory*.
>
> ISA devices should call isa_memory*.
>
> All device memory accesses should go through their respective buses.
> There can
On Thu, Jul 15, 2010 at 10:17:10AM -0700, Chris Wright wrote:
> * Avi Kivity (a...@redhat.com) wrote:
> >
> > For emulated device, it seems like we can ignore ATS completely, no?
>
> Not if you want to emulate an ATS capable device ;)
>
> Eariler upthread I said:
>
> IOW, if qemu ever had a d
). Clients (devices) must
provide callbacks for map invalidation in case these maps are
persistent beyond the current I/O context, e.g. AIO DMA transfers.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.c | 145 +
hw/pci.h
Thanks,
Eduard
Eduard - Gabriel Munteanu (4):
pci: memory access API and IOMMU support
AMD IOMMU emulation
ide: use the PCI memory access interface
rtl8139: use the PCI memory access interface
Makefile.target |2 +
configure | 10 +
dma-helpers.c | 37 +
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/rtl8139.c | 99 -
1 files changed, 56 insertions(+), 43 deletions(-)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 72e2242
airly good approximation.
Signed-off-by: Eduard - Gabriel Munteanu
---
dma-helpers.c | 37 +++--
dma.h | 21 -
hw/ide/core.c | 15 ---
hw/ide/internal.h | 39 +++
hw/ide/
This introduces emulation for the AMD IOMMU, described in "AMD I/O
Virtualization Technology (IOMMU) Specification".
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +
configure | 10 +
hw/amd_iommu
On Thu, Aug 05, 2010 at 09:23:30PM +, Blue Swirl wrote:
> On Wed, Aug 4, 2010 at 10:32 PM, Eduard - Gabriel Munteanu
[snip]
> > @@ -58,6 +58,10 @@ struct PCIBus {
> > ?? ?? ?? ??Keep a count of the number of devices with raised IRQs. ??*/
> > ?? ?? int nirq;
>
On Thu, Aug 05, 2010 at 09:31:58PM +, Blue Swirl wrote:
> On Wed, Aug 4, 2010 at 10:32 PM, Eduard - Gabriel Munteanu
> wrote:
[snip]
> > diff --git a/Makefile.target b/Makefile.target
> > index 70a9c1b..86226a0 100644
> > --- a/Makefile.target
> > +++ b/Makefi
pci_bios_alloc() can be used to allocate space in the PCI region for
other purposes. This is needed by the AMD IOMMU support code.
Signed-off-by: Eduard - Gabriel Munteanu
---
src/pciinit.c | 17 +
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/pciinit.c b
This initializes the AMD IOMMU and creates ACPI tables for it.
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile |2 +-
src/acpi.c | 79
src/iommu.c| 64 +
src/iommu.h
). Clients (devices) must
provide callbacks for map invalidation in case these maps are
persistent beyond the current I/O context, e.g. AIO DMA transfers.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.c | 197 -
hw/pci.h
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/ac97.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ac97.c b/hw/ac97.c
index 4319bc8..9ee4894 100644
--- a/hw/ac97.c
+++ b/hw/ac97.c
@@ -223,7
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/rtl8139.c | 99 -
1 files changed, 56 insertions(+), 43 deletions(-)
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 72e2242
This helper function allows map invalidation code to determine which
maps must be invalidated.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.h | 10 ++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/pci.h b/hw/pci.h
index 4bd8a1a..5a6cdb5 100644
--- a/hw
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/eepro100.c | 78 ++---
1 files changed, 41 insertions(+), 37 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index
lways enabled (no more configure options)
- cleaned up code, I now use typedefs as suggested
- event logging cleanups
BTW, the change to pci_regs.h is properly aligned but the original file contains
tabs.
Cheers,
Eduard
Eduard - Gabriel Munteanu (7):
pci: add range_covers_
This introduces emulation for the AMD IOMMU, described in "AMD I/O
Virtualization Technology (IOMMU) Specification".
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +
hw/amd_iommu.c | 688 +++
hw/pc.c
airly good approximation.
Signed-off-by: Eduard - Gabriel Munteanu
---
dma-helpers.c | 46 +-
dma.h | 21 -
hw/ide/core.c | 15 ---
hw/ide/internal.h | 39 ++
t out myself") malc's ACK to the ac97 patch.
Nothing changed since his last review.
Please have a look and merge if you like it.
Thanks,
Eduard
Eduard - Gabriel Munteanu (7):
pci: expand tabs to spaces in pci_regs.h
pci: memory access API and IOMMU support
AMD IOMMU emul
). Clients (devices) must
provide callbacks for map invalidation in case these maps are
persistent beyond the current I/O context, e.g. AIO DMA transfers.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/pci.c | 185 +++-
hw/pci.h
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
---
hw/eepro100.c | 86 ++--
1 files changed, 46 insertions(+), 40 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu
Acked-by: malc
---
hw/ac97.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ac97.c b/hw/ac97.c
index d71072d..bad38fb 100644
--- a/hw/ac97.c
+++ b/hw/ac97
This introduces emulation for the AMD IOMMU, described in "AMD I/O
Virtualization Technology (IOMMU) Specification".
Signed-off-by: Eduard - Gabriel Munteanu
---
Makefile.target |2 +-
hw/amd_iommu.c | 663 +++
hw/pc.c
1 - 100 of 117 matches
Mail list logo