Skip to contentSkip to conversation

debuggers and hap_gva_to_gfn() in guest_walk.c

DISCUSSION Mukesh Rathor 3 participants 3 messages Nov 5, 2008 – Nov 6, 2008

lore
Share & tools
lore
#0 lore raw

Debugger/s would like to keep it's #ifdefs in xen minimal. Following would help...

hap_gva_to_gfn():

+ if (v== current)

       mfn = mfn_x(gfn_to_mfn_current(gpfn, &p2mt));

+ else
+ mfn = mfn_x(gfn_to_mfn_foreign(v->domain, gpfn, &p2mt));

Thanks,
Mukesh

#1 lore raw

This looks like a bug in hap_gva_to_gfn(). It should probably be using gfn_to_mfn() rather than gfn_to_mfn_current(). Tim, can you confirm?

-- Keir

Quoted 21 lines · Mukesh Rathor

Debugger/s would like to keep it's #ifdefs in xen minimal. Following would help...

hap_gva_to_gfn():

(quoted diff) +3 -0
+   if (v== current)
        mfn = mfn_x(gfn_to_mfn_current(gpfn, &p2mt));
+   else
+      mfn = mfn_x(gfn_to_mfn_foreign(v->domain, gpfn, &p2mt));

Thanks,
Mukesh

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
Quoted 2 lines · Keir Fraser

This looks like a bug in hap_gva_to_gfn(). It should probably be using gfn_to_mfn() rather than gfn_to_mfn_current(). Tim, can you confirm?

In the current codebase, it's correct (all callers of paging_gva_to_gfn() call with v == current) but changing it to use gfn_to_mfn() seems more correcter.

Tim.

Quoted 25 lines · Mukesh Rathor
Quoted 22 lines

Debugger/s would like to keep it's #ifdefs in xen minimal. Following would help...

hap_gva_to_gfn():

(quoted diff) +3 -0
+   if (v== current)
        mfn = mfn_x(gfn_to_mfn_current(gpfn, &p2mt));
+   else
+      mfn = mfn_x(gfn_to_mfn_foreign(v->domain, gpfn, &p2mt));

Thanks,
Mukesh

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]