Re: [PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-21 Thread Paul Mackerras
On Mon, Nov 21, 2011 at 02:22:58PM +0200, Avi Kivity wrote: > On 11/21/2011 01:03 PM, Paul Mackerras wrote: > > OK, so that's a somewhat different mental model than I had in mind. I > > can change the code to do almost everything on a per-page basis at > > fault time on POWER7. There is one thing

Re: [PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-21 Thread Avi Kivity
On 11/21/2011 01:03 PM, Paul Mackerras wrote: > On Sun, Nov 20, 2011 at 02:23:52PM +0200, Avi Kivity wrote: > > > > There is no "the VMA". There could be multiple VMAs, or none (with the > > mmap() coming afterwards). You could do all the checks you want here, > > only to have host userspace rem

Re: [PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-21 Thread Paul Mackerras
On Sun, Nov 20, 2011 at 02:23:52PM +0200, Avi Kivity wrote: > > There is no "the VMA". There could be multiple VMAs, or none (with the > mmap() coming afterwards). You could do all the checks you want here, > only to have host userspace remap it under your feet. This needs to be > done on a per

Re: [PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-20 Thread Avi Kivity
On 11/17/2011 12:52 AM, Paul Mackerras wrote: > From: Benjamin Herrenschmidt > > This adds support for adding PCI device I/O regions to the guest memory > map, and for trapping guest accesses to emulated MMIO regions and > delivering them to qemu for MMIO emulation. To trap guest accesses to > em

[PATCH 01/11] KVM: PPC: Add memory-mapping support for PCI passthrough and emulation

2011-11-16 Thread Paul Mackerras
From: Benjamin Herrenschmidt This adds support for adding PCI device I/O regions to the guest memory map, and for trapping guest accesses to emulated MMIO regions and delivering them to qemu for MMIO emulation. To trap guest accesses to emulated MMIO regions, we reserve key 31 for the hypervisor