All of lore.kernel.org
 help / color / mirror / Atom feed
* debuggers and hap_gva_to_gfn() in guest_walk.c
@ 2008-11-05 21:44 Mukesh Rathor
  2008-11-05 21:56 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Mukesh Rathor @ 2008-11-05 21:44 UTC (permalink / raw)
  To: xen-devel


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: debuggers and hap_gva_to_gfn() in guest_walk.c
  2008-11-05 21:44 debuggers and hap_gva_to_gfn() in guest_walk.c Mukesh Rathor
@ 2008-11-05 21:56 ` Keir Fraser
  2008-11-06 10:51   ` Tim Deegan
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2008-11-05 21:56 UTC (permalink / raw)
  To: mukesh.rathor, xen-devel; +Cc: Tim Deegan

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

On 5/11/08 21:44, "Mukesh Rathor" <mukesh.rathor@oracle.com> wrote:

> 
> 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
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: debuggers and hap_gva_to_gfn() in guest_walk.c
  2008-11-05 21:56 ` Keir Fraser
@ 2008-11-06 10:51   ` Tim Deegan
  0 siblings, 0 replies; 3+ messages in thread
From: Tim Deegan @ 2008-11-06 10:51 UTC (permalink / raw)
  To: Keir Fraser; +Cc: mukesh.rathor, xen-devel

At 21:56 +0000 on 05 Nov (1225922197), Keir Fraser wrote:
> 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.

> On 5/11/08 21:44, "Mukesh Rathor" <mukesh.rathor@oracle.com> wrote:
> 
> > 
> > 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
> > 
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> 
> 

-- 
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-06 10:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-05 21:44 debuggers and hap_gva_to_gfn() in guest_walk.c Mukesh Rathor
2008-11-05 21:56 ` Keir Fraser
2008-11-06 10:51   ` Tim Deegan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.