Re: [Xen-devel] [PATCH] x86: adjustments to memory_add()

2015-08-31 Thread Wei Liu
On Fri, Aug 28, 2015 at 07:54:09AM -0600, Jan Beulich wrote: > The function should clean up after a failed map_pages_to_xen(). > > Sharing the M2P table with Dom0 needs to happen before adding > the new pages to the heap. > > Avoid the IOMMU mapping loop whenever possible. > > Drop a redundant s

Re: [Xen-devel] [PATCH] x86: adjustments to memory_add()

2015-08-28 Thread Andrew Cooper
On 28/08/15 15:29, Jan Beulich wrote: On 28.08.15 at 16:11, wrote: >> On 28/08/15 14:54, Jan Beulich wrote: >>> The function should clean up after a failed map_pages_to_xen(). >>> >>> Sharing the M2P table with Dom0 needs to happen before adding >>> the new pages to the heap. >> Why? Does thi

Re: [Xen-devel] [PATCH] x86: adjustments to memory_add()

2015-08-28 Thread Jan Beulich
>>> On 28.08.15 at 16:11, wrote: > On 28/08/15 14:54, Jan Beulich wrote: >> The function should clean up after a failed map_pages_to_xen(). >> >> Sharing the M2P table with Dom0 needs to happen before adding >> the new pages to the heap. > > Why? Does this not create a race where dom0 can observe

Re: [Xen-devel] [PATCH] x86: adjustments to memory_add()

2015-08-28 Thread Andrew Cooper
On 28/08/15 14:54, Jan Beulich wrote: > The function should clean up after a failed map_pages_to_xen(). > > Sharing the M2P table with Dom0 needs to happen before adding > the new pages to the heap. Why? Does this not create a race where dom0 can observe the new mfns before they are ready to use?

[Xen-devel] [PATCH] x86: adjustments to memory_add()

2015-08-28 Thread Jan Beulich
The function should clean up after a failed map_pages_to_xen(). Sharing the M2P table with Dom0 needs to happen before adding the new pages to the heap. Avoid the IOMMU mapping loop whenever possible. Drop a redundant setting of 'ret'. Signed-off-by: Jan Beulich --- a/xen/arch/x86/x86_64/mm.c