Skip to contentSkip to conversation

doubt on domU segment mappings

DISCUSSION Sandesh 2 participants 13 messages Jul 21, 2008

lore
Share & tools
lore

Sandesh

author
#0 lore raw

Hi all,
Can someone please tell me if the segment mappings like kernel_seg,
ramdisk_seg, pgtables_seg, start_info_seg, etc.. are static or are they subjected to change, in the sense the are the page table entries in dom0 mapping these segments change or do they remain static??
Any hints or reference regarding this is greatly appreciated.

Thanks in advance.

Regards,
Sandesh

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

#1 lore raw
Quoted 4 lines · Sandesh, le Mon 21 Jul 2008 22:20:28 +0530, a écrit :

Can someone please tell me if the segment mappings like kernel_seg,
ramdisk_seg, pgtables_seg, start_info_seg, etc.. are static or are they subjected to change, in the sense the are the page table entries in dom0 mapping these segments change or do they remain static??

These are constructed by the PV domain builder just for the domU. DomU is then free to do whatever it wants with it, dom0 doesn't care at all. In the PV-GRUB case for instance, it is completely rebuilt from within the domU.

Samuel

author
#2 lore raw

thanks for the reply...

Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

but aren't these mappings in the dom0 page tables?? Once the domU is running how can i change them? like how will i know which entries in the dom0 pgtables corresponds to kernel_seg or ramdisk_seg and so on..

Regards,
Sandesh

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

#3 lore raw
Quoted 5 lines · Sandesh, le Mon 21 Jul 2008 22:34:33 +0530, a écrit :
Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

but aren't these mappings in the dom0 page tables?

Just temporarily when the domain builder fills them, but as soon as it's built, they are unmapped.

Quoted 1 line

Once the domU is running how can i change them?

What for?

Quoted 2 lines

like how will i know which entries in the dom0 pgtables corresponds to kernel_seg or ramdisk_seg and so on..

Again, dom0 doesn't map them any more, it doesn't need them any more.

Samuel

author
#4 lore raw
Quoted 5 lines · Samuel Thibault
Quoted 4 lines · Sandesh, le Mon 21 Jul 2008 22:34:33 +0530, a écrit :
Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

Quoted 8 lines
Quoted 1 line

but aren't these mappings in the dom0 page tables?

Just temporarily when the domain builder fills them, but as soon as it's built, they are unmapped.

Quoted 1 line

Once the domU is running how can i change them?

What for?

basically right after shutdown with poweroff = 'preserve' option i want to reboot the domU without having to going through the whole domain building process. So i need to load the different domU segments again, or at least the pt_base mapping.

Quoted 5 lines
Quoted 3 lines

like how will i know which entries in the dom0 pgtables corresponds to kernel_seg or ramdisk_seg and so on..

Again, dom0 doesn't map them any more, it doesn't need them any more.

then how will the domU kernel memory is accessed? are they mapped to the domU pg_tables?

Quoted 2 lines

Samuel

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

#5 lore raw
Quoted 7 lines · Sandesh, le Mon 21 Jul 2008 22:43:13 +0530, a écrit :
Quoted 3 lines
Quoted 1 line

Once the domU is running how can i change them?

What for?

basically right after shutdown with poweroff = 'preserve' option i want to reboot the domU without having to going through the whole domain building process. So i need to load the different domU segments again, or at least the pt_base mapping.

Well the problem is that the domU most probably has destroyed it completely already.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

like how will i know which entries in the dom0 pgtables corresponds to kernel_seg or ramdisk_seg and so on..

Again, dom0 doesn't map them any more, it doesn't need them any more.

then how will the domU kernel memory is accessed? are they mapped to the domU pg_tables?

Yes. No need for anybody else to access it (except PV interfaces, but then the MFNs or grants are explicitely given by the domU).

Samuel

author
#6 lore raw
Quoted 4 lines · Samuel Thibault
Quoted 1 line

or at least the pt_base mapping.

Well the problem is that the domU most probably has destroyed it completely already.

can't i preserve them, at least the base pointers??? :)

Quoted 5 lines
Quoted 1 line
Quoted 1 line

Again, dom0 doesn't map them any more, it doesn't need them any

more.

Quoted 1 line

then how will the domU kernel memory is accessed? are they mapped to

the

Quoted 1 line

domU pg_tables?

so even pt_base becomes invalid once domU has booted?? can u just point to me where these segment mappings are recreated in domU(linux 2.6.18.1).

Regards,
Sandesh

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

#7 lore raw
Quoted 8 lines · Sandesh, le Mon 21 Jul 2008 23:06:31 +0530, a écrit :
Quoted 4 lines · Samuel Thibault
Quoted 1 line

or at least the pt_base mapping.

Well the problem is that the domU most probably has destroyed it completely already.

can't i preserve them, at least the base pointers??? :) can u just point to me where these segment mappings are recreated in domU(linux 2.6.18.1).

Linux domU starts in head-xen.S's startup_32, which calls start_kernel, which itself becomes the idle thread, so I guess it actually preserves it. As for the pt_base address, you can get it from linux itself from the xen_start_info structure. There is no way to get that from other domains.

Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Again, dom0 doesn't map them any more, it doesn't need them any

more.

Quoted 1 line

then how will the domU kernel memory is accessed? are they mapped to

the

Quoted 1 line

domU pg_tables?

so even pt_base becomes invalid once domU has booted??

DomU is free to do so, yes.

Samuel

author
#8 lore raw
In reply to Samuel Thibault
Quoted 9 lines · Samuel Thibault
Quoted 5 lines · Sandesh, le Mon 21 Jul 2008 22:34:33 +0530, a écrit :
Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

but aren't these mappings in the dom0 page tables?

Just temporarily when the domain builder fills them, but as soon as it's built, they are unmapped.

hi samuel,
can u just point me where the segments are being unmapped??
so far i have not come across the code achieving this functionality.

Thanks a lot,

Regards,
Sandesh

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

#9 lore raw
Quoted 11 lines · Sandesh, le Tue 22 Jul 2008 00:21:54 +0530, a écrit :
Quoted 9 lines · Samuel Thibault
Quoted 5 lines · Sandesh, le Mon 21 Jul 2008 22:34:33 +0530, a écrit :
Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

but aren't these mappings in the dom0 page tables?

Just temporarily when the domain builder fills them, but as soon as it's built, they are unmapped.

can u just point me where the segments are being unmapped??

xc_dom_release calls xc_dom_unmap_all()

Quoted 1 line

so far i have not come across the code achieving this functionality.

you should probably tune your grep.

Samuel

author
#10 lore raw
In reply to Sandesh
Quoted 9 lines · Sandesh

thanks for the reply...

Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

but aren't these mappings in the dom0 page tables?? Once the domU is running how can i change them? like how will i know which entries in the dom0 pgtables corresponds to kernel_seg or ramdisk_seg and so on..

i want to access these mappings from the hypervisor once domU is booted, not from domU guest kernel. So in that perspective how will i know which entries point to respective segments.

Quoted 3 lines

Regards,
Sandesh

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

#11 lore raw
Quoted 11 lines · Sandesh, le Mon 21 Jul 2008 22:38:15 +0530, a écrit :
Quoted 9 lines · Sandesh

thanks for the reply...

Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

but aren't these mappings in the dom0 page tables?? Once the domU is running how can i change them? like how will i know which entries in the dom0 pgtables corresponds to kernel_seg or ramdisk_seg and so on..

i want to access these mappings from the hypervisor once domU is booted,

What for? What is your domU guest?

Samuel

author
#12 lore raw
Quoted 8 lines · Samuel Thibault
Quoted 7 lines · Sandesh, le Mon 21 Jul 2008 22:38:15 +0530, a écrit :
Quoted 6 lines · Sandesh

thanks for the reply...

Quoted 4 lines

These are constructed by the PV domain builder just for the domU. DomU
is then free to do whatever it wants with it, dom0 doesn't care at all

Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

but aren't these mappings in the dom0 page tables?? Once the domU is running how can i change them? like how will i know which entries in the dom0 pgtables corresponds to kernel_seg or ramdisk_seg and so on..

i want to access these mappings from the hypervisor once domU is booted,

What for? What is your domU guest?

domU guest is linux 2.8.18.1 hypervisor kernel.

Quoted 2 lines

Samuel

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com