Skip to contentSkip to conversation

Root filesystem access from Xen Hypervisor

DISCUSSION Tej 3 participants 4 messages Nov 14, 2008 – Nov 15, 2008 2 messages not in the archive

lore
Share & tools
lore

Tej

author
#0 lore raw

Can we Access the root filesystem from Xen Hypervisor Code. e.g creating dir at /proc

Any pointers will be useful.

thanks
-tej

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

If you want to export data out of the hypervisor, the easiest thing to do is set up a shared memory mechanism. Look at xen/common/trace.c and tools/xentrace/xentrace.c for one simple xen-to-userspace example.

Hmm... if you want to reuse as much of the interface as possible, you'll probably need to make a Linux kernel module that implements /proc/gcov-xen. The hypervisor can write usage data to the shared page(s), and the kernel module can read it, interpret it, and make the /proc files based on it.

For a sample of how to use xen-to-kernel shared memory, you can look at xenoprofile; but be warned that it's suffering some bitrot.

Let me know how you fare -- it seems like an interesting project.

-George

Quoted 31 lines · Tej
Quoted 3 lines · George Dunlap

/proc is owned by the Linux Kernel; Xen has no filesystem code in it.

What is it you're trying to do?

i am trying to port the gcov for XEN HYpervisor. I could able to create profiling info but i could not able to populate filesystem for profiling purpose.

Quoted 20 lines

-George

Quoted 15 lines · Tej

Can we Access the root filesystem from Xen Hypervisor Code. e.g creating dir at /proc

Any pointers will be useful.

thanks
-tej

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

author
#4 lore raw
Quoted 9 lines · George Dunlap

If you want to export data out of the hypervisor, the easiest thing to do is set up a shared memory mechanism. Look at xen/common/trace.c and tools/xentrace/xentrace.c for one simple xen-to-userspace example.

Hmm... if you want to reuse as much of the interface as possible, you'll probably need to make a Linux kernel module that implements /proc/gcov-xen. The hypervisor can write usage data to the shared page(s), and the kernel module can read it, interpret it, and make the /proc files based on it.

i am also thinking on same line.

Quoted 3 lines

For a sample of how to use xen-to-kernel shared memory, you can look at xenoprofile; but be warned that it's suffering some bitrot.

thanks for nice pointers

Quoted 2 lines

Let me know how you fare -- it seems like an interesting project.

sure

Quoted 2 lines

-George

thanks
-tej

Quoted 34 lines · Tej
Quoted 31 lines · George Dunlap
Quoted 3 lines

/proc is owned by the Linux Kernel; Xen has no filesystem code in it.

What is it you're trying to do?

i am trying to port the gcov for XEN HYpervisor. I could able to create profiling info but i could not able to populate filesystem for profiling purpose.

Quoted 20 lines

-George

Quoted 15 lines · Tej

Can we Access the root filesystem from Xen Hypervisor Code. e.g creating dir at /proc

Any pointers will be useful.

thanks
-tej

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

#5 lore raw
In reply to Tej

What exactly are you trying to accomplish?

Do you want to access the root filesystem of a domU, or ...?

What sequence of commands would you like to work? ;-)

Cheers,
Mark

Quoted 9 lines · On Friday 14 November 2008 11:45:32 Tej wrote:

Can we Access the root filesystem from Xen Hypervisor Code. e.g creating dir at /proc

Any pointers will be useful.

thanks
-tej