From: Tim Deegan Subject: Re: Why gpa instead of mfn is directed used in emulated nic Date: Thu, 5 Mar 2015 12:09:41 +0100 Message-ID: <20150305110941.GB85606@deinos.phlegethon.org> References: <43fac069.5158.14be7daf917.Coremail.openlui@126.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <43fac069.5158.14be7daf917.Coremail.openlui@126.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: openlui Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Hi, At 10:54 +0800 on 05 Mar (1425549262), openlui wrote: > 2. From the trace info and qemu-dm's log, it seems that it is "GPA" > (Guest Physical Address) instead of "MFN" in the IOREQ's data field > received by qemu-dm: Yes. > I think qemu-dm/rtl8139 should read/write data from "MFN" address in > host memory instaed of GPA, and I find that there isn't hypercall > from dom0 to "translate" the gpa to mfn in subsequent xentrace > info. Is my understanding is wrong? I would really appreciate your > help. The hypercall that qemu uses to map the guest's memory for reading and writing also takes a GFN/GPA. So Qemu doesn't need to know what the actual MFN is -- it just does all its operations in GPAs and Xen takes care of the translations. Cheers, Tim.