From: "Jan Beulich" Subject: Re: One question about the hypercall to translate gfn to mfn. Date: Tue, 09 Dec 2014 10:38:38 +0000 Message-ID: <5486DF3E020000780004E0CF@mail.emea.novell.com> References: <5486CAAF.9070807@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5486CAAF.9070807@linux.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Zhang Yu Cc: tim@xen.org, kevin.tian@intel.com, Paul.Durrant@citrix.com, keir@xen.org, Xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 09.12.14 at 11:10, wrote: > As you can see, we are pushing our XenGT patches to the upstream. One > feature we need in xen is to translate guests' gfn to mfn in XenGT dom0 > device model. > > Here we may have 2 similar solutions: > 1> Paul told me(and thank you, Paul :)) that there used to be a > hypercall, XENMEM_translate_gpfn_list, which was removed by Keir in > commit 2d2f7977a052e655db6748be5dabf5a58f5c5e32, because there was no > usage at that time. So solution 1 is to revert this commit. However, > since this hypercall was removed ages ago, the reverting met many > conflicts, i.e. the gmfn_to_mfn is no longer used in x86, etc. > > 2> In our project, we defined a new hypercall > XENMEM_get_mfn_from_pfn, which has a similar implementation like the > previous XENMEM_translate_gpfn_list. One of the major differences is > that this newly defined one is only for x86(called in arch_memory_op), > so we do not have to worry about the arm side. > > Does anyone has any suggestions about this? Out of the two 1 seems preferable. But without background (see also Paul's reply) it's hard to tell whether that's what you want/need. Jan