All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about MMIO Region Alignment for PCI Pass-through
@ 2008-03-05  9:33 Yosuke Iwamatsu
       [not found] ` <9392A06CB0FDC847B3A530B3DC174E7B04D3ED22@mse10be1.mse10.exchange.ms>
  0 siblings, 1 reply; 2+ messages in thread
From: Yosuke Iwamatsu @ 2008-03-05  9:33 UTC (permalink / raw)
  To: xen-devel

Hi there,

I have a question about the mmio region access of PCI pass-trough
devices.

When assigning a PCI device to a guest, pages that contain the device
mmio regions are mapped to the guest. Then the guest can directly issue
mmio instructions. However, there is a problem that, if a single page
has mmio regions of multiple devices, we cannot expose it to the guest.
So we need to align PCI memory regions to page size (4K) in dom0 kernel
and make sure that each page has only one device's mmio region.

I found that this problem was discussed a bit in the following thread.
http://lists.xensource.com/archives/html/xen-devel/2007-10/msg01012.html
(linux-2.6.18-xen.hg: changest 296)
Dom0 parameter "pci-mem-align" seems to help aligning mmio regions.
But, at a quick look, mmio regions appear to be aligned not to PAGE_SIZE
but to PAGE_SIZE-1. I also have a concern that re-mapping all the PCI
resources might do harm to some devices unrelated to PCI pass-through.

Does anyone have an idea about this mmio re-mapping issue ?
(or is anyone already working on this ?)

Regards,
-------------------
Yosuke Iwamatsu
        NEC Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about MMIO Region Alignment for PCI Pass-through
       [not found] ` <9392A06CB0FDC847B3A530B3DC174E7B04D3ED22@mse10be1.mse10.exchange.ms>
@ 2008-03-12 11:48   ` Yosuke Iwamatsu
  0 siblings, 0 replies; 2+ messages in thread
From: Yosuke Iwamatsu @ 2008-03-12 11:48 UTC (permalink / raw)
  To: barak; +Cc: xen-devel

Hi Barak,
Thank you for your reply.

Barak Fargoun wrote:
> Hi!
> 
> I have created the 'pci-mem-align' patch. The version posted before, had
> some bugs. However, I have fixed those issues, and it works fine for me
> now.
What kinds of bugs did you fix?
It would be nice if I could see your new patch.

> BTW, why are you interested in this?
Because I'm recently working a bit on PV PCI passthrough.
I haven't encountered the mmio region conflict yet, but I think it is a
a potential problem for all the passthrough methods
(VT-d/IOMMU, PV driver domain and nativedom).

Regards,
------------------
   Yosuke Iwamatsu

> 
> Barak
> 
> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Yosuke
> Iwamatsu
> Sent: Wednesday, March 05, 2008 11:34 AM
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] Question about MMIO Region Alignment for
> PCIPass-through
> 
> Hi there,
> 
> I have a question about the mmio region access of PCI pass-trough
> devices.
> 
> When assigning a PCI device to a guest, pages that contain the device
> mmio regions are mapped to the guest. Then the guest can directly issue
> mmio instructions. However, there is a problem that, if a single page
> has mmio regions of multiple devices, we cannot expose it to the guest.
> So we need to align PCI memory regions to page size (4K) in dom0 kernel
> and make sure that each page has only one device's mmio region.
> 
> I found that this problem was discussed a bit in the following thread.
> http://lists.xensource.com/archives/html/xen-devel/2007-10/msg01012.html
> (linux-2.6.18-xen.hg: changest 296)
> Dom0 parameter "pci-mem-align" seems to help aligning mmio regions.
> But, at a quick look, mmio regions appear to be aligned not to PAGE_SIZE
> but to PAGE_SIZE-1. I also have a concern that re-mapping all the PCI
> resources might do harm to some devices unrelated to PCI pass-through.
> 
> Does anyone have an idea about this mmio re-mapping issue ?
> (or is anyone already working on this ?)
> 
> Regards,
> -------------------
> Yosuke Iwamatsu
>         NEC Corporation
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-12 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05  9:33 Question about MMIO Region Alignment for PCI Pass-through Yosuke Iwamatsu
     [not found] ` <9392A06CB0FDC847B3A530B3DC174E7B04D3ED22@mse10be1.mse10.exchange.ms>
2008-03-12 11:48   ` Yosuke Iwamatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.