Skip to contentSkip to conversation

Question: How to write a file in domain 0?

DISCUSSION Zhao Lin 3 participants 5 messages Jun 30, 2009 – Jul 12, 2009

lore
Share & tools
lore

Zhao Lin

author
#0 lore raw

hey all,

a complete newbie here..I'm trying to implement a hypercall that takes a string argument and then appends the string to a selected file stored in domain0's hard disk.

I browsed through the source code but couldn't figure out a way to do this. I'm thinking that I might need to get a reference to domain 0's kernel and then ask the kernel to call printk() with the provided string. Not sure if this is correct since I don't even know how domain 0 as well as other domains is referenced by the hypervisor..

How should I approach this? I'm desperately trying to learn here..

Hope this mailing list is the correct place to post my question..Open to any suggestion. Thanks,

author
#2 lore raw

thanks for reply.. but i think i might need to pass the data to domain0 through shared memory and then called corresponding functions in domain0 kernel to finish the task.

Quoted 6 lines · Samuel Thibault

Hello,

You may want to have a look at fsfront/fsback.

Samuel

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

#3 lore raw

I think the actual read/write operations are done in the /tapdisk /process in Dom0.

- Hui

Quoted 18 lines · Zhao Lin

thanks for reply.. but i think i might need to pass the data to domain0 through shared memory and then called corresponding functions in domain0 kernel to finish the task.

On Sat, Jul 11, 2009 at 11:36 PM, Samuel Thibault <[email protected] <mailto:[email protected]>> wrote:

Hello,

You may want to have a look at fsfront/fsback.

Samuel

------------------------------------------------------------------------

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

#4 lore raw
In reply to Zhao Lin
Quoted 3 lines · Zhao Lin, le Sun 12 Jul 2009 08:23:47 -0400, a écrit :

thanks for reply.. but i think i might need to pass the data to domain0 through shared memory and then called corresponding functions in domain0 kernel to finish the task.

That's precisely what fsback/fsfront does.

Samuel