Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2013-01-07 Thread Konrad Rzeszutek Wilk
t; > linux-kernel@vger.kernel.org > > Subject: RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory > > for map_sg hook > > > > >>> On 20.12.12 at 02:23, "Xu, Dongxiao" wrote: > > > Sorry, maybe I am still not describing

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2013-01-07 Thread Jan Beulich
>>> "Xu, Dongxiao" 01/07/13 8:17 AM >>> > From: Jan Beulich [mailto:jbeul...@suse.com] > >>> On 20.12.12 at 02:23, "Xu, Dongxiao" wrote: >> > Take the libata case as an example, the static DMA buffer locates >> > (dev->link->ap->sector_buf , here we use Data Structure B in the graph) in >> > the

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2013-01-07 Thread Jan Beulich
Xu, Dongxiao dongxiao...@intel.com 01/07/13 8:17 AM From: Jan Beulich [mailto:jbeul...@suse.com] On 20.12.12 at 02:23, Xu, Dongxiao dongxiao...@intel.com wrote: Take the libata case as an example, the static DMA buffer locates (dev-link-ap-sector_buf , here we use Data Structure B in the

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2013-01-07 Thread Konrad Rzeszutek Wilk
: RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook On 20.12.12 at 02:23, Xu, Dongxiao dongxiao...@intel.com wrote: Sorry, maybe I am still not describing this issue clearly. No, at least I understood you the way you re-describe below. Take

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2013-01-06 Thread Xu, Dongxiao
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, December 20, 2012 4:56 PM > To: Xu, Dongxiao > Cc: xen-de...@lists.xen.org; Konrad Rzeszutek Wilk; > linux-kernel@vger.kernel.org > Subject: RE: [Xen-devel] [PATCH] xen/swiotlb: E

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2013-01-06 Thread Xu, Dongxiao
-Original Message- From: Jan Beulich [mailto:jbeul...@suse.com] Sent: Thursday, December 20, 2012 4:56 PM To: Xu, Dongxiao Cc: xen-de...@lists.xen.org; Konrad Rzeszutek Wilk; linux-kernel@vger.kernel.org Subject: RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-20 Thread Jan Beulich
>>> On 20.12.12 at 02:23, "Xu, Dongxiao" wrote: > Sorry, maybe I am still not describing this issue clearly. No, at least I understood you the way you re-describe below. > Take the libata case as an example, the static DMA buffer locates > (dev->link->ap->sector_buf , here we use Data

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-20 Thread Jan Beulich
On 20.12.12 at 02:23, Xu, Dongxiao dongxiao...@intel.com wrote: Sorry, maybe I am still not describing this issue clearly. No, at least I understood you the way you re-describe below. Take the libata case as an example, the static DMA buffer locates (dev-link-ap-sector_buf , here we use

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-19 Thread Xu, Dongxiao
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Thursday, December 20, 2012 4:09 AM > To: Jan Beulich > Cc: Xu, Dongxiao; xen-de...@lists.xen.org; linux-kernel@vger.kernel.org > Subject: Re: [Xen-devel] [PATCH] xen/swiotlb: Exch

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-19 Thread Konrad Rzeszutek Wilk
On Wed, Dec 12, 2012 at 09:38:23AM +, Jan Beulich wrote: > >>> On 12.12.12 at 02:03, "Xu, Dongxiao" wrote: > >> From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > >> On Tue, Dec 11, 2012 at 06:39:35AM +, Xu, Dongxiao wrote: > >> > > From: Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-19 Thread Konrad Rzeszutek Wilk
On Wed, Dec 12, 2012 at 09:38:23AM +, Jan Beulich wrote: On 12.12.12 at 02:03, Xu, Dongxiao dongxiao...@intel.com wrote: From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] On Tue, Dec 11, 2012 at 06:39:35AM +, Xu, Dongxiao wrote: From: Konrad Rzeszutek Wilk

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-19 Thread Xu, Dongxiao
-Original Message- From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] Sent: Thursday, December 20, 2012 4:09 AM To: Jan Beulich Cc: Xu, Dongxiao; xen-de...@lists.xen.org; linux-kernel@vger.kernel.org Subject: Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory

Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-13 Thread Konrad Rzeszutek Wilk
el@vger.kernel.org > > Subject: Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg > > hook > > > > On Tue, Dec 11, 2012 at 06:39:35AM +, Xu, Dongxiao wrote: > > > > -Original Message- > > > > From: Konrad Rzeszutek Wilk [m

Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-13 Thread Konrad Rzeszutek Wilk
: xen-de...@lists.xen.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook On Thu, Dec 06, 2012 at 09:08:42PM +0800, Dongxiao Xu wrote: While mapping sg buffers, checking to cross page DMA buffer is also needed

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-12 Thread Jan Beulich
>>> On 12.12.12 at 02:03, "Xu, Dongxiao" wrote: >> From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] >> On Tue, Dec 11, 2012 at 06:39:35AM +, Xu, Dongxiao wrote: >> > > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] >> > > What if this check was done in the routines

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-12 Thread Jan Beulich
On 12.12.12 at 02:03, Xu, Dongxiao dongxiao...@intel.com wrote: From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] On Tue, Dec 11, 2012 at 06:39:35AM +, Xu, Dongxiao wrote: From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] What if this check was done in the routines

RE: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-11 Thread Xu, Dongxiao
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Wednesday, December 12, 2012 1:07 AM > To: Xu, Dongxiao > Cc: xen-de...@lists.xen.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] xen/swiotlb: Exchange to contiguous memory

Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-11 Thread Konrad Rzeszutek Wilk
el@vger.kernel.org > > Subject: Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg > > hook > > > > On Thu, Dec 06, 2012 at 09:08:42PM +0800, Dongxiao Xu wrote: > > > While mapping sg buffers, checking to cross page DMA buffer is also > >

Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-11 Thread Konrad Rzeszutek Wilk
] xen/swiotlb: Exchange to contiguous memory for map_sg hook On Thu, Dec 06, 2012 at 09:08:42PM +0800, Dongxiao Xu wrote: While mapping sg buffers, checking to cross page DMA buffer is also needed. If the guest DMA buffer crosses page boundary, Xen should exchange contiguous memory

RE: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-11 Thread Xu, Dongxiao
-Original Message- From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] Sent: Wednesday, December 12, 2012 1:07 AM To: Xu, Dongxiao Cc: xen-de...@lists.xen.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

RE: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-10 Thread Xu, Dongxiao
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Friday, December 07, 2012 10:09 PM > To: Xu, Dongxiao > Cc: xen-de...@lists.xen.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH] xen/swiotlb: Exchange to contiguous memory

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-10 Thread Xu, Dongxiao
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, December 06, 2012 9:38 PM > To: Xu, Dongxiao > Cc: xen-de...@lists.xen.org; konrad.w...@oracle.com; > linux-kernel@vger.kernel.org > Subject: Re: [Xen-devel] [PATCH] xen/swiotlb: E

RE: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-10 Thread Xu, Dongxiao
-Original Message- From: Jan Beulich [mailto:jbeul...@suse.com] Sent: Thursday, December 06, 2012 9:38 PM To: Xu, Dongxiao Cc: xen-de...@lists.xen.org; konrad.w...@oracle.com; linux-kernel@vger.kernel.org Subject: Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory

RE: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-10 Thread Xu, Dongxiao
-Original Message- From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] Sent: Friday, December 07, 2012 10:09 PM To: Xu, Dongxiao Cc: xen-de...@lists.xen.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-07 Thread Konrad Rzeszutek Wilk
On Thu, Dec 06, 2012 at 01:37:41PM +, Jan Beulich wrote: > >>> On 06.12.12 at 14:08, Dongxiao Xu wrote: > > While mapping sg buffers, checking to cross page DMA buffer is > > also needed. If the guest DMA buffer crosses page boundary, Xen > > should exchange contiguous memory for it. > > > >

Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-07 Thread Konrad Rzeszutek Wilk
On Thu, Dec 06, 2012 at 09:08:42PM +0800, Dongxiao Xu wrote: > While mapping sg buffers, checking to cross page DMA buffer is > also needed. If the guest DMA buffer crosses page boundary, Xen > should exchange contiguous memory for it. So this is when we cross those 2MB contingous swatch of

Re: [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-07 Thread Konrad Rzeszutek Wilk
On Thu, Dec 06, 2012 at 09:08:42PM +0800, Dongxiao Xu wrote: While mapping sg buffers, checking to cross page DMA buffer is also needed. If the guest DMA buffer crosses page boundary, Xen should exchange contiguous memory for it. So this is when we cross those 2MB contingous swatch of buffers.

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-07 Thread Konrad Rzeszutek Wilk
On Thu, Dec 06, 2012 at 01:37:41PM +, Jan Beulich wrote: On 06.12.12 at 14:08, Dongxiao Xu dongxiao...@intel.com wrote: While mapping sg buffers, checking to cross page DMA buffer is also needed. If the guest DMA buffer crosses page boundary, Xen should exchange contiguous memory for

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-06 Thread Jan Beulich
>>> On 06.12.12 at 14:08, Dongxiao Xu wrote: > While mapping sg buffers, checking to cross page DMA buffer is > also needed. If the guest DMA buffer crosses page boundary, Xen > should exchange contiguous memory for it. > > Besides, it is needed to backup the original page contents > and copy it

[PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-06 Thread Dongxiao Xu
While mapping sg buffers, checking to cross page DMA buffer is also needed. If the guest DMA buffer crosses page boundary, Xen should exchange contiguous memory for it. Besides, it is needed to backup the original page contents and copy it back after memory exchange is done. This fixes issues if

[PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-06 Thread Dongxiao Xu
While mapping sg buffers, checking to cross page DMA buffer is also needed. If the guest DMA buffer crosses page boundary, Xen should exchange contiguous memory for it. Besides, it is needed to backup the original page contents and copy it back after memory exchange is done. This fixes issues if

Re: [Xen-devel] [PATCH] xen/swiotlb: Exchange to contiguous memory for map_sg hook

2012-12-06 Thread Jan Beulich
On 06.12.12 at 14:08, Dongxiao Xu dongxiao...@intel.com wrote: While mapping sg buffers, checking to cross page DMA buffer is also needed. If the guest DMA buffer crosses page boundary, Xen should exchange contiguous memory for it. Besides, it is needed to backup the original page contents