From: Ian Campbell Subject: Re: [RFC PATCH 3/3] Implement 3-level event channel routines. Date: Wed, 9 Jan 2013 10:56:07 +0000 Message-ID: <1357728967.7989.225.camel@zakaz.uk.xensource.com> References: <1356978155-18293-1-git-send-email-wei.liu2@citrix.com> <1356978155-18293-4-git-send-email-wei.liu2@citrix.com> <50E57B1402000078000B2AED@nat28.tlf.novell.com> <1357666393.2743.1.camel@iceland> <50ED3AA802000078000B3F3D@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50ED3AA802000078000B3F3D@nat28.tlf.novell.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: Jan Beulich Cc: "xen-devel@lists.xen.org" , Wei Liu , Wei Liu List-Id: xen-devel@lists.xenproject.org On Wed, 2013-01-09 at 08:38 +0000, Jan Beulich wrote: > >>> On 08.01.13 at 18:33, Wei Liu wrote: > > On Thu, 2013-01-03 at 11:35 +0000, Jan Beulich wrote: > >> >>> On 31.12.12 at 19:22, Wei Liu wrote: > >> > > >> > +static void __unmap_l2_sel(struct vcpu *v) > >> > +{ > >> > + unsigned long mfn; > >> > + > >> > + if ( v->evtchn_pending_sel_l2 != 0 ) > >> > + { > >> > + unmap_domain_page_global(v->evtchn_pending_sel_l2); > >> > + mfn = virt_to_mfn(v->evtchn_pending_sel_l2); > >> > >> virt_to_mfn() is not valid on the output of > >> map_domain_page{,_global}() (same further down). Yes, there is > >> at least one example of this in the existing code, but that's wrong > >> too, and is getting eliminated by the 16Tb patch series I'm in the > >> process of putting together. > >> > > > > So what's the correct way to do this? Do I need to wait for your patch > > series? > > Considering that the old 32-bit case of map_domain_page() > doesn't matter anymore, We still care about it on 32-bit ARM FWIW. (I@m not sure if that invalidates your advice below though) > using domain_page_map_to_mfn() > here would be the way to go (while the 32-bit version of it > didn't allow map_domain_page_global() to be handled through > it, my 64-bit implementation of it will). > > And of course there's the obvious alternative of storing the > MFN rather than re-obtaining it in the teardown path. > > Jan > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel