[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Why gpa instead of mfn is directed used in emulated nic
At 10:14 +0800 on 06 Mar (1425633255), openlui wrote: > At 2015-03-05 19:09:41, "Tim Deegan" <tim@xxxxxxx> wrote: > >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. > Thanks for your reply. > > >> 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. > > Could you give some hint about the type of hypercall qemu used to map the > guest's memory? I know that there are some xc_map_foreign_xxx interfaces > in libxc which can do the similar work. However, it seems that these > interfaces should be given MFN instead of GFN/GPA. That's some unfortunate historical APIs/docs. :( The argument is in fact a GFN in all cases, but for PV guests, which were implemented first, that's == MFN. Basically anything in the tools that deals with HVM guest memory should _always_ be working in GFN/GPA. Cheers, Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |