xen-devel
Re: [Xen-devel] [Q] mfn_to_gmfn macro, log-dirty bitmap,
Hi,
At 14:40 +0100 on 28 Jun (1277736059), Min Lee wrote:
> Hi, folks.
> I'm running 32bit PV-domu on 64bit xen&dom0 and I'm using
> XEN_DOMCTL_SHADOW_OP_PEEK to get log-dirty bitmap.
> First, I'm assuming this bitmap is indexed by gmfn, right? because we're
> passing p2m->size parameter to xen.
The log-dirty bitmap is indexed by guest _PFN_, even for PV guests.
(see the comment at about line 400 of asm-x86/mm.h for an explanation of
the *fn terminology, and the confusion around "gmfn" in particular).
> Second, I have mfn (not gmfn) which I want to translate to gmfn so that I
> can correctly read corresponding bit in log-dirty bitmap. so I've tried
> mfn_to_gmfn() macro below but it doesn't seem to work. (always mfn==gmfn)
> Maybe because m2p table is not enabled?
The mfn_to_gmfn macro translates to GFNs (for historical reasons, IIRC
to do with earlier shadow pagetable implementations). To inspect the
logdirty bitmap you want to translate to PFNs, so you should call
get_gpfn_from_mfn() directly.
Cheers,
Tim.
> How can I properly do mfn_to_gmfn?
>
> #define mfn_to_gmfn(_d, mfn) \
> ( (paging_mode_translate(_d)) \
> ? get_gpfn_from_mfn(mfn) \
> : (mfn) )
>
>
> Thanks for any help.
> Min
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
--
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
Previous by Date: |
Re: [Xen-devel] [Q] mfn_to_gmfn macro, log-dirty bitmap,, Min Lee |
Next by Date: |
[Xen-devel] Biweekly VMX status report. Xen: #21669 & Xen0: #b29254..., Xu, Jiajun |
Previous by Thread: |
Re: [Xen-devel] [Q] mfn_to_gmfn macro, log-dirty bitmap,, Min Lee |
Next by Thread: |
Re: [Xen-devel] [Q] mfn_to_gmfn macro, log-dirty bitmap,, Min Lee |
Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|