[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Machine and Physical address



Hi,

I have posted this same message earlier during the day through the
gmane.com.emulators.xen.devel newsgroup but I don't think that the message
made it through. I am now emailing directly to the mailing list. Sorry if
my posting appears twice.

I am trying to undestand how the memory address translation works on Xen.
My question is the following. Do the page table entries of a guest OS contain
physical page frame numbers OR real-world machine frame numbers ?

I have tried the following little experiment.

1.) Within a guest OS (domain 1), I read the value of a page table entry
(pte_val). The value of 'pte_val>>12' would then correspond to either a
machine
frame number or physical frame number.

2.) Then from within domain0 I issued the hypervisor call HYPERVISOR_dom0_op
with option DOM0_GETMEMLIST. If I am correct, that hypervisor call returns a
list of real-world machine frame numbers being allocated to my guest OS.

3.) From the list I got in step 2 above, I search for 'pte_val>>12' but I
do not
get any matching entry. However if I search for
phys_to_machine_mapping[pte_val>>12] then I do get a matching entry.

So from the above experiment it seems that pte_val contains physical page
frame
numbers. However, if that is the case, I do not see how xen translates each
virtual memory reference within the guest OS into the correct address.
Somehow,
each address translation that comes out of the intel's paging unit has to be
adjusted to the real-world machine page frame number.

I have a second question not directly related to the above. I am trying to
trace
through XEN and I don't know where all the printk will be displayed. Printk
within the guest OS kernels are all logged within their respective
/var/log/messages files, but what about the printk within XEN ?

I read that XEN shares the console of domain0. My grub.conf file is configure
with:

kernel /xen.gz dom0_mem=100000
module /vmlinuz-2.4.26-xen0 root=/dev/hda7 ro console=tty1

But the printk from within XEN do not seem to appear on tty1.

Thanks
Richard


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.