|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Does paging_gva_to_gfn() convert to mfn for PV guests?
Thanks Tim. In that case, is there a function or macro that will
translate a guest va from dom0 to mfn in Xen?
I've seen that functions like copy_to_guest will allow Xen to write
into a dom0 guest address, but the way it's it's implemented (kernel
to userspace copy), seems to require that the current address space in
cr3 be the same as the guest process containing that guest address. I
want to be able to copy from Xen to a guest address in dom0 regardless
of what guest address space is currently loaded in cr3. I was hoping
to do the gva --> mfn translation, store the mfn and map that mfn in
to Xen on demand when I wanted to do the copy.
Any ideas?
Thanks,
Mike
On Tue, May 13, 2008 at 12:04 PM, Tim Deegan <Tim.Deegan@xxxxxxxxxx> wrote:
> At 11:23 -0400 on 13 May (1210677791), Mike Sun wrote:
> > Hmm... I'm not sure if I'm understanding clearly what you're saying.
> > If I use this function to translate virtual addresses from dom0 (a PV
> > guest without shadow paging). will I get an mfn or a pfn?
>
> No. :) The code behind that function relies on data structures which are
> only maintained if paging assistance (shadow or HAP) is turned on.
>
>
> > My expectation would be that I get an mfn since PV guests without any
> > sort of shadow paging have virt --> machine translations installed in
> > the page tables and do not actually use the p2m table for translation.
> > Is this correct?
>
> In the case of PV guests with shadow pagetables turned on (typically
> this is only while live migration is in progress), then yes, you should
> get an MFN.
>
> Cheers,
>
>
>
> Tim
>
> --
> Tim Deegan <Tim.Deegan@xxxxxxxxxx>
> Principal Software Engineer, Citrix Systems (R&D) Ltd.
> [Company #02300071, SL9 0DZ, UK.]
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|