Skip to contentSkip to conversation

What's allocated on head 1M region of domU?

DISCUSSION Ryo Kanbayashi 2 participants 4 messages Dec 1, 2007 – Dec 3, 2007

lore
Share & tools
lore
#0 lore raw

Hi all.

I'm now try to read and write puseud physical memory of domU from Dom0 with xenaccess(this is using libxc). #http://xenaccess.sourceforge.net/

With xenaccess, I'm succeeded read and writing almost of the memory. But It fail when I try to access head 1M region and some bit regions. To be precise, xc_map_foreign_range() of libxc returns error code. ** <javascript:goWordLink("to")>

What's allocated on head 1M region of domU?
#and , Can I get a document about memory allocation of dom0 and DomU somewhere?

regards.

****************************************
HPCS lab
4th grade student of Colledge of Information Science, University of Tsukuba

Ryo Kanbayashi

#1 lore raw
Quoted 3 lines

I'm now try to read and write puseud physical memory of domU from Dom0 with xenaccess(this is using libxc). #http://xenaccess.sourceforge.net/

Ah, cool. I'd not heard much about XenAccess for a while, but I see they're still progressing nicely - cool.

Quoted 4 lines

With xenaccess, I'm succeeded read and writing almost of the memory. But It fail when I try to access head 1M region and some bit regions. To be precise, xc_map_foreign_range() of libxc returns error code. ** <javascript:goWordLink("to")>

What error code do you get? Are you trying to map the first meg all at once and it's failing, or does it fail if you map any page in the first meg? What exactly is the call that's failing?

I guess if you were trying to map the guest's shared_info page then you might be disallowed...?

Quoted 3 lines

What's allocated on head 1M region of domU?
#and , Can I get a document about memory allocation of dom0 and DomU somewhere?

See the comments starting around line 476 of xen/include/public/xen.h, which describes the start of day memory layout and defines some of the structures involved. This will not be the same once the guest is up and running because the guest will allocate its own full pagetables and make its own decisions about where it wants to put stuff. However, it'll at least give you some clues about how the guest is built initially... I hope this helps you some.

Cheers,
Mark

Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!
#2 lore raw
Quoted 9 lines · Mark Williamson
Quoted 4 lines

I'm now try to read and write puseud physical memory of domU from Dom0 with xenaccess(this is using libxc). #http://xenaccess.sourceforge.net/

Ah, cool. I'd not heard much about XenAccess for a while, but I see they're still progressing nicely - cool.

:-)

Quoted 6 lines
Quoted 5 lines

With xenaccess, I'm succeeded read and writing almost of the memory. But It fail when I try to access head 1M region and some bit regions. To be precise, xc_map_foreign_range() of libxc returns error code. ** <javascript:goWordLink("to")>

Quoted 8 lines

What error code do you get? Are you trying to map the first meg all at once and it's failing, or does it fail if you map any page in the first meg? What exactly is the call that's failing?

I guess if you were trying to map the guest's shared_info page then you might be disallowed...?

I try to map no all at once.
I've figured out that top xen kernel is sitting on top 1M region :-|

thanks Mark.

Quoted 5 lines
Quoted 4 lines

What's allocated on head 1M region of domU?
#and , Can I get a document about memory allocation of dom0 and DomU somewhere?

Quoted 8 lines

See the comments starting around line 476 of xen/include/public/xen.h, which describes the start of day memory layout and defines some of the structures involved. This will not be the same once the guest is up and running because the guest will allocate its own full pagetables and make its own decisions about where it wants to put stuff. However, it'll at least give you some clues about how the guest is built initially... I hope this helps you some.

I read the parts you suggested to me.
It helps me great :-)

regards.

****************************************
HPCS lab
4th grade student of Colledge of Information Science, University of Tsukuba

Ryo Kanbayashi

#3 lore raw
Quoted 9 lines
Quoted 6 lines

What error code do you get? Are you trying to map the first meg all at once and it's failing, or does it fail if you map any page in the first meg? What exactly is the call that's failing?

I guess if you were trying to map the guest's shared_info page then you might be disallowed...?

I try to map no all at once.
I've figured out that top xen kernel is sitting on top 1M region :-|

Xen takes the top 64MB or a guest's virtual address space. But I thought you were trying to map the other end?

Quoted 10 lines
Quoted 7 lines

See the comments starting around line 476 of xen/include/public/xen.h, which describes the start of day memory layout and defines some of the structures involved. This will not be the same once the guest is up and running because the guest will allocate its own full pagetables and make its own decisions about where it wants to put stuff. However, it'll at least give you some clues about how the guest is built initially... I hope this helps you some.

I read the parts you suggested to me.
It helps me great :-)

Good - those comments are some of the most useful anywhere in the codebase ;-)

Cheers,
Mark

Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!