From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zoltan Kiss Subject: Re: [PATCH] xen/grant-table: Avoid m2p_override during mapping Date: Mon, 13 Jan 2014 16:43:52 +0000 Message-ID: <52D417C8.4090003@citrix.com> References: <1389568525-1948-1-git-send-email-zoltan.kiss@citrix.com> <52D3BD8F.1000707@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W2kcK-0005Ea-Eg for xen-devel@lists.xenproject.org; Mon, 13 Jan 2014 16:44:00 +0000 In-Reply-To: <52D3BD8F.1000707@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= , Konrad Rzeszutek Wilk , Boris Ostrovsky , David Vrabel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Jan Beulich , Ian Campbell , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 13/01/14 10:18, Roger Pau Monn=E9 wrote: >> @@ -958,26 +942,14 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_re= f *unmap_ops, >> set_phys_to_machine(unmap_ops[i].host_addr >> PAGE_SHIFT, >> INVALID_P2M_ENTRY); >> } >> - return ret; >> - } >> - >> - if (!in_interrupt() && paravirt_get_lazy_mode() =3D=3D PARAVIRT_LAZY_N= ONE) { >> - arch_enter_lazy_mmu_mode(); >> - lazy =3D true; >> - } >> - >> - for (i =3D 0; i < count; i++) { >> - ret =3D m2p_remove_override(pages[i], kmap_ops ? >> - &kmap_ops[i] : NULL); >> - if (ret) >> - goto out; >> + } else { >> + for (i =3D 0; i < count; i++) { >> + set_phys_to_machine(page_to_pfn(pages[i]), >> + pages[i]->index); > > You seem to relay on page->index containing the old mfn, but I don't see > it being set on gnttab_map_refs (it's only set on m2p_add_override > AFAICT), maybe I'm missing something? > > Roger. > Indeed, I'll fix that, and I will also cut the function prototype update = out into a separate patch for better readability. Zoli