Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-02 Thread Eduard - Gabriel Munteanu
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 > >> a lot of type casts in your

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-02 Thread Stefan Weil
Am 02.09.2010 10:51, schrieb Eduard - Gabriel Munteanu: 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_*() instea

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-02 Thread Anthony Liguori
On 09/02/2010 04:08 AM, Eduard - Gabriel Munteanu wrote: 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

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-02 Thread Eduard - Gabriel Munteanu
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

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-02 Thread Eduard - Gabriel Munteanu
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_*(). This also provides suppo

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-01 Thread Michael S. Tsirkin
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, len, 0); > >+} > >+ > >+static inline void pci_memory_write(PCIDevice *dev, > >+ pci

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-01 Thread Stefan Weil
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_*(). This also provides support for translation and access checking in case an IOMMU is emulated. Memor

[Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-08-29 Thread Eduard - Gabriel Munteanu
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 are treated as remote IOTLBs (that is, translation caches belonging to the IOMMU-aware device itself)

[Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-08-28 Thread Eduard - Gabriel Munteanu
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 are treated as remote IOTLBs (that is, translation caches belonging to the IOMMU-aware device itself)

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-08-17 Thread Isaku Yamahata
Added Cc: m...@redhat.com This patch doesn't apply to MST's pci tree. git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git pci Because Michael is the pci maintainer, please rebase to the tree and resend it? On Sun, Aug 15, 2010 at 10:27:17PM +0300, Eduard - Gabriel Munteanu wrote: > PCI dev

[Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-08-15 Thread Eduard - Gabriel Munteanu
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 are treated as remote IOTLBs (that is, translation caches belonging to the IOMMU-aware device itself)