* Use of XEN_GUEST_HANDLE
@ 2008-05-24 15:14 sandesh
2008-05-24 22:10 ` Mark Williamson
0 siblings, 1 reply; 3+ messages in thread
From: sandesh @ 2008-05-24 15:14 UTC (permalink / raw)
To: xen-devel
Hi all,
I have recently started to go through xen source. I want to know the
usage of XEN_GUEST_HANDLE.
I see thats its just a macro which will prefix each data type with
__guest_handle_ . And DEFINE_XEN_GUEST_HANDLE(name) will just typedefs
'__guest_handle_name' to be a pointer to a data type 'name ' .
What is the reason for such abstraction?
And how this XEN_GUEST_HANDLE different from 'guest_xc' field of 'struct
xc_dom_image', which gets initialized with xc_handle.
I have serached the net extensively for answers, but unable to get any. So
any info or pointers would be highly appriciated.
Thanks
-Sandesh
--
View this message in context: http://www.nabble.com/Use-of-XEN_GUEST_HANDLE-tp17357081p17357081.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Use of XEN_GUEST_HANDLE
2008-05-24 15:14 Use of XEN_GUEST_HANDLE sandesh
@ 2008-05-24 22:10 ` Mark Williamson
2008-05-24 22:23 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 3+ messages in thread
From: Mark Williamson @ 2008-05-24 22:10 UTC (permalink / raw)
To: xen-devel; +Cc: sandesh
> I have recently started to go through xen source. I want to know the
> usage of XEN_GUEST_HANDLE.
> I see thats its just a macro which will prefix each data type with
> __guest_handle_ . And DEFINE_XEN_GUEST_HANDLE(name) will just typedefs
> '__guest_handle_name' to be a pointer to a data type 'name ' .
I think this was introduced for use on non-x86 architectures where it wouldn't
necessarily be possible to simply pass a virtual address to a data structure
down to Xen. I'm not clear on the details but you can search for the
discussion on the xen-devel list, it happened quite a long time ago but if
you look for threads mentioning guest handles, Keir Fraser and Hollis
Blanchard that should help you narrow it down ;-)
> What is the reason for such abstraction?
On x86, Xen lives at the top of the process address space, so it's possible to
pass virtual address pointers to structures in the guest's application memory
space (in practice, these are in the address space of the dom0 control
processes) directly down to Xen. On other architectures such as PPC (which
is not supported anymore, anyhow) Xen ran in physical addressing mode and so
couldn't access virtual addresses directly at all.
The guest handle abstraction was put in place to allow PPC (and potentially
other) ports to implement a different way of addressing structures that
assumed less x86-like architecture behaviour.
I'm afraid I'm not familiar with the details, although if you look back in the
hg history to before the PPC port was removed a few weeks ago you might be
able to see some more examples of it being used. The IA64 port may use it
too, I'm not sure...
> And how this XEN_GUEST_HANDLE different from 'guest_xc' field of 'struct
> xc_dom_image', which gets initialized with xc_handle.
That's a completely different thing, actually. The xc_handle is just a file
descriptor pointing to the privcmd interface in dom0. The control tools open
the privcmd virtual file and then they call the integer file descriptor
the "xc handle".
I'm not sure exactly why xc_handle values would be stored in guest_xc rather
than elsewhere. Maybe that's just an easy way of keeping track of things.
> I have serached the net extensively for answers, but unable to get any. So
> any info or pointers would be highly appriciated.
Hope this info helps. Also, since it's now in the mailing list archives I
hope that anybody searching for this in future will find more useful
information :-)
Cheers,
Mark
--
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Use of XEN_GUEST_HANDLE
2008-05-24 22:10 ` Mark Williamson
@ 2008-05-24 22:23 ` Jeremy Fitzhardinge
0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2008-05-24 22:23 UTC (permalink / raw)
To: Mark Williamson; +Cc: xen-devel, sandesh
Mark Williamson wrote:
> The guest handle abstraction was put in place to allow PPC (and potentially
> other) ports to implement a different way of addressing structures that
> assumed less x86-like architecture behaviour.
>
ia64 is a current user of this stuff. They just put it all back into
paravirt-ops...
J
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-24 22:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-24 15:14 Use of XEN_GUEST_HANDLE sandesh
2008-05-24 22:10 ` Mark Williamson
2008-05-24 22:23 ` Jeremy Fitzhardinge
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.