Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-29 Thread Gerd Hoffmann
On Di, 2016-06-28 at 15:32 +0200, Laszlo Ersek wrote: > (adding Gerd) > > On 06/28/16 15:14, Ard Biesheuvel wrote: > > > In any case, reconciling software that requires a framebuffer with a > > GPU emulation that does not expose one by design is going to be > > problematic even without this

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Alexander Graf
On 06/28/2016 12:55 PM, Laszlo Ersek wrote: On 06/27/16 12:34, Christoffer Dall wrote: On Mon, Jun 27, 2016 at 11:47:18AM +0200, Ard Biesheuvel wrote: So first of all, let me reiterate that I could only find a single instance in QEMU where a PCI MMIO region is backed by host memory, which is

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Andrew Jones
On Tue, Jun 28, 2016 at 02:25:19PM +0100, Catalin Marinas wrote: > On Tue, Jun 28, 2016 at 03:19:14PM +0200, Ard Biesheuvel wrote: > > On 28 June 2016 at 15:10, Catalin Marinas wrote: > > > On Tue, Jun 28, 2016 at 02:20:43PM +0200, Christoffer Dall wrote: > > >> On Tue,

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Laszlo Ersek
(adding Gerd) On 06/28/16 15:14, Ard Biesheuvel wrote: > In any case, reconciling software that requires a framebuffer with a > GPU emulation that does not expose one by design is going to be > problematic even without this issue. How is this supposed to work on > x86? AFAIK: "virtio-gpu-pci"

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Catalin Marinas
On Tue, Jun 28, 2016 at 03:19:14PM +0200, Ard Biesheuvel wrote: > On 28 June 2016 at 15:10, Catalin Marinas wrote: > > On Tue, Jun 28, 2016 at 02:20:43PM +0200, Christoffer Dall wrote: > >> On Tue, Jun 28, 2016 at 01:06:36PM +0200, Laszlo Ersek wrote: > >> > On 06/28/16

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Ard Biesheuvel
On 28 June 2016 at 15:10, Catalin Marinas wrote: > On Tue, Jun 28, 2016 at 02:20:43PM +0200, Christoffer Dall wrote: >> On Tue, Jun 28, 2016 at 01:06:36PM +0200, Laszlo Ersek wrote: >> > On 06/28/16 12:04, Christoffer Dall wrote: >> > > On Mon, Jun 27, 2016 at 03:57:28PM

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Ard Biesheuvel
On 28 June 2016 at 12:55, Laszlo Ersek wrote: > On 06/27/16 12:34, Christoffer Dall wrote: >> On Mon, Jun 27, 2016 at 11:47:18AM +0200, Ard Biesheuvel wrote: > >>> So first of all, let me reiterate that I could only find a single >>> instance in QEMU where a PCI MMIO region is

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Catalin Marinas
On Tue, Jun 28, 2016 at 02:20:43PM +0200, Christoffer Dall wrote: > On Tue, Jun 28, 2016 at 01:06:36PM +0200, Laszlo Ersek wrote: > > On 06/28/16 12:04, Christoffer Dall wrote: > > > On Mon, Jun 27, 2016 at 03:57:28PM +0200, Ard Biesheuvel wrote: > > >> So if vga-pci.c is the only problematic

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Christoffer Dall
On Tue, Jun 28, 2016 at 01:06:36PM +0200, Laszlo Ersek wrote: > On 06/28/16 12:04, Christoffer Dall wrote: > > On Mon, Jun 27, 2016 at 03:57:28PM +0200, Ard Biesheuvel wrote: > >> On 27 June 2016 at 15:35, Christoffer Dall > >> wrote: > >>> On Mon, Jun 27, 2016 at

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Laszlo Ersek
On 06/28/16 12:04, Christoffer Dall wrote: > On Mon, Jun 27, 2016 at 03:57:28PM +0200, Ard Biesheuvel wrote: >> On 27 June 2016 at 15:35, Christoffer Dall >> wrote: >>> On Mon, Jun 27, 2016 at 02:30:46PM +0200, Ard Biesheuvel wrote: On 27 June 2016 at 12:34,

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Laszlo Ersek
On 06/27/16 16:29, Alexander Graf wrote: > > >> Am 27.06.2016 um 15:57 schrieb Ard Biesheuvel : >> >>> On 27 June 2016 at 15:35, Christoffer Dall >>> wrote: On Mon, Jun 27, 2016 at 02:30:46PM +0200, Ard Biesheuvel wrote: > On 27

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Laszlo Ersek
On 06/27/16 12:34, Christoffer Dall wrote: > On Mon, Jun 27, 2016 at 11:47:18AM +0200, Ard Biesheuvel wrote: >> So first of all, let me reiterate that I could only find a single >> instance in QEMU where a PCI MMIO region is backed by host memory, >> which is vga-pci.c. I wonder of there are any

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Christoffer Dall
On Mon, Jun 27, 2016 at 03:10:20PM +0100, Peter Maydell wrote: > On 27 June 2016 at 14:49, Mark Rutland wrote: > > On Mon, Jun 27, 2016 at 02:15:29PM +0100, Peter Maydell wrote: > >> I get the impression dma-coherent is the right thing to advertise > >> anyway. Do you have

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-28 Thread Christoffer Dall
On Mon, Jun 27, 2016 at 03:57:28PM +0200, Ard Biesheuvel wrote: > On 27 June 2016 at 15:35, Christoffer Dall > wrote: > > On Mon, Jun 27, 2016 at 02:30:46PM +0200, Ard Biesheuvel wrote: > >> On 27 June 2016 at 12:34, Christoffer Dall >

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Alexander Graf
> Am 27.06.2016 um 15:57 schrieb Ard Biesheuvel : > >> On 27 June 2016 at 15:35, Christoffer Dall >> wrote: >>> On Mon, Jun 27, 2016 at 02:30:46PM +0200, Ard Biesheuvel wrote: On 27 June 2016 at 12:34, Christoffer Dall

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Alexander Graf
> Am 27.06.2016 um 12:34 schrieb Christoffer Dall : > >> On Mon, Jun 27, 2016 at 11:47:18AM +0200, Ard Biesheuvel wrote: >>> On 27 June 2016 at 11:16, Christoffer Dall >>> wrote: >>> Hi, >>> >>> I'm going to ask some stupid questions

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Peter Maydell
On 27 June 2016 at 14:49, Mark Rutland wrote: > On Mon, Jun 27, 2016 at 02:15:29PM +0100, Peter Maydell wrote: >> I get the impression dma-coherent is the right thing to advertise >> anyway. Do you have the documentation to hand that specifies what >> "dma-coherent" means?

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Ard Biesheuvel
On 27 June 2016 at 15:35, Christoffer Dall wrote: > On Mon, Jun 27, 2016 at 02:30:46PM +0200, Ard Biesheuvel wrote: >> On 27 June 2016 at 12:34, Christoffer Dall >> wrote: >> > On Mon, Jun 27, 2016 at 11:47:18AM +0200, Ard Biesheuvel

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Mark Rutland
On Mon, Jun 27, 2016 at 02:15:29PM +0100, Peter Maydell wrote: > On 27 June 2016 at 10:47, Ard Biesheuvel wrote: > > As for the USB case, I can't really figure out what is going on here, > > but I am fairly certain it is a different issue. If this is related to > > DMA,

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Christoffer Dall
On Mon, Jun 27, 2016 at 02:30:46PM +0200, Ard Biesheuvel wrote: > On 27 June 2016 at 12:34, Christoffer Dall > wrote: > > On Mon, Jun 27, 2016 at 11:47:18AM +0200, Ard Biesheuvel wrote: > >> On 27 June 2016 at 11:16, Christoffer Dall >

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Peter Maydell
On 27 June 2016 at 10:47, Ard Biesheuvel wrote: > As for the USB case, I can't really figure out what is going on here, > but I am fairly certain it is a different issue. If this is related to > DMA, I wonder if adding the 'dma-coherent' property to the PCIe root >

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Ard Biesheuvel
On 27 June 2016 at 12:34, Christoffer Dall wrote: > On Mon, Jun 27, 2016 at 11:47:18AM +0200, Ard Biesheuvel wrote: >> On 27 June 2016 at 11:16, Christoffer Dall >> wrote: >> > Hi, >> > >> > I'm going to ask some stupid questions here...

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Ard Biesheuvel
On 27 June 2016 at 11:16, Christoffer Dall wrote: > Hi, > > I'm going to ask some stupid questions here... > > On Fri, Jun 24, 2016 at 04:04:45PM +0200, Ard Biesheuvel wrote: >> Hi all, >> >> This old subject came up again in a discussion related to PCIe support >>

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Christoffer Dall
Hi, I'm going to ask some stupid questions here... On Fri, Jun 24, 2016 at 04:04:45PM +0200, Ard Biesheuvel wrote: > Hi all, > > This old subject came up again in a discussion related to PCIe support > for QEMU/KVM under Tianocore. The fact that we need to map PCI MMIO > regions as cacheable is

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Marc Zyngier
On 24/06/16 15:57, Andrew Jones wrote: > > Hi Ard, > > Thanks for bringing this back up again (I think :-) > > On Fri, Jun 24, 2016 at 04:04:45PM +0200, Ard Biesheuvel wrote: >> Hi all, >> >> This old subject came up again in a discussion related to PCIe support >> for QEMU/KVM under Tianocore.

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-27 Thread Marc Zyngier
On 25/06/16 08:19, Alexander Graf wrote: > > >> Am 24.06.2016 um 16:04 schrieb Ard Biesheuvel : >> >> Hi all, >> >> This old subject came up again in a discussion related to PCIe support >> for QEMU/KVM under Tianocore. The fact that we need to map PCI MMIO >> regions

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-25 Thread Alexander Graf
> Am 24.06.2016 um 16:04 schrieb Ard Biesheuvel : > > Hi all, > > This old subject came up again in a discussion related to PCIe support > for QEMU/KVM under Tianocore. The fact that we need to map PCI MMIO > regions as cacheable is preventing us from reusing a

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-25 Thread Alexander Graf
> Am 24.06.2016 um 20:16 schrieb Ard Biesheuvel : > >> On 24 June 2016 at 16:04, Ard Biesheuvel wrote: >> [...] >> Note that this issue not only affects framebuffers on PCI cards, it >> also affects emulated USB host controllers (perhaps

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-24 Thread Ard Biesheuvel
On 24 June 2016 at 16:04, Ard Biesheuvel wrote: [...] > Note that this issue not only affects framebuffers on PCI cards, it > also affects emulated USB host controllers (perhaps Alex can remind us > which one exactly?) Actually, looking at the QEMU source code, I am

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-24 Thread Andrew Jones
Hi Ard, Thanks for bringing this back up again (I think :-) On Fri, Jun 24, 2016 at 04:04:45PM +0200, Ard Biesheuvel wrote: > Hi all, > > This old subject came up again in a discussion related to PCIe support > for QEMU/KVM under Tianocore. The fact that we need to map PCI MMIO > regions as