Memory Page Sharing on Xen 4.0.1
Dear List,
I?m trying to figure out *memory page sharing***using HVM on Xen 4.0.1, but I?m not really able to find some useful information or sources about this issue.
I just found two links porviding these sources:
http://knol.google.com/k/learning-grant-tables
http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114
Both are not working.. I think they are made for an older version of xen.
Additionally I thought about checking the code of:
http://kyukhin.dyndns.org/lxr/http/source/drivers/xen/grant-table.c
..which is located in the Xen source, but that?s very complicated and I dont know what I need for a simple page exchange using own programmed standalone tools between two running domains.
Can anyone help me by sending some useful links or can anyone give me a hint where to start?
Thank you a lot!
Signature · 1 line
Se
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi,
I tried the same links but had to make some changes to get it working. Please find attached the sample working files for sharing a domU HVM page to dom0.
It has been tested xen-4.0.1 and HVM guest running ubuntu 10.10 with kernel version 2.6.35.9 (from kernel.org) compiled with CONFIG_XEN disabled and PVHVM drivers compiled in as modules.
Procedure:
1. Set LINUX_ROOT appropriately in Makefiles of dom0 and domU.
2. Set remote domain in dom0 appropriately "info.remoteDomain = <domU_domain_id>"
3. Compile modules dom0 and domU respectively on dom0 and domU guest.
4. Load module on domU first.
# insmod ./domu_share.ko
5. do "dmesg" on domU and note down the grant reference number
[ 1293.316240] gref = 770 <<<--- this is the grant reference number
6. now load the module on dom0 by passing grant reference number as module
param
# insmod ./dom0_share.ko gref=770
7. do dmesg on dom0
======== dmesg on dom0 =====
xen: dom0: init_module with gref = 770
xen: dom0: shared_page = 269f4000, handle = 9, status = 0
Bytes in page aseem sethi
XEN: dom: end init_module
======Thanks & Regards,
VSR.
Quoted 28 lines · Sebastian Biedermann
**
Dear List,I´m trying to figure out *memory page sharing** *using HVM on Xen 4.0.1, but I´m not really able to find some useful information or sources about this issue.
I just found two links porviding these sources:
http://knol.google.com/k/learning-grant-tables
http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114Both are not working.. I think they are made for an older version of xen.
Additionally I thought about checking the code of:
http://kyukhin.dyndns.org/lxr/http/source/drivers/xen/grant-table.c
..which is located in the Xen source, but that´s very complicated and I dont know what I need
for a simple page exchange using own programmed standalone tools between two running domains.Can anyone help me by sending some useful links or can anyone give me a hint where to start?
Thank you a lot!
Quoted 10 lines
--
Se_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Awesome, thank you very much!
dom0 source compiles without problems!
domU source cannot find the xen headers:
#include <xenpvdrivers/evtchn.h>
#include <xenpvdrivers/xenbus.h>
#include <xenpvdrivers/interface/io/netif.h>
#include <xenpvdrivers/interface/memory.h>
#include <xenpvdrivers/balloon.h>
#include <xenpvdrivers/asm/maddr.h>
I compiled in the PV HVM modules using this tutorial:
http://blog.alex.org.uk/?s=xen
And built them into the guest kernel, it runs fine, but I dont have the right headers.
Can you tell me which xenpvdrivers headers you are using and where they come from? Because e.g. I cannot find the asm/maddr.h in the xen sources.. or anywhere else
Tank you !
Am 28.06.2011 15:24, schrieb veerasena reddy:
Quoted 69 lines
Hi,
I tried the same links but had to make some changes to get it working.
Please find attached the sample working files for sharing a domU HVM page to dom0.
It has been tested xen-4.0.1 and HVM guest running ubuntu 10.10 with kernel version 2.6.35.9 (from kernel.org <http://kernel.org>) compiled withCONFIG_XENdisabled and PVHVM drivers compiled in as modules.Procedure:
1. SetLINUX_ROOTappropriately in Makefiles of dom0 and domU.
2. Set remote domain in dom0 appropriately "info.remoteDomain = <domU_domain_id>"
3. Compile modules dom0 and domU respectively on dom0 and domU guest.
4. Load module on domU first.# insmod ./domu_share.ko 5. do "dmesg" on domU and note down the grant reference number [ 1293.316240] gref = 770 <<<--- this is the grant reference number 6. now load the module on dom0 by passing grant reference number as module param # insmod ./dom0_share.ko gref=770 7. do dmesg on dom0 ======== dmesg on dom0 ===== xen: dom0: init_module with gref = 770 xen: dom0: shared_page = 269f4000, handle = 9, status = 0 Bytes in page aseem sethi XEN: dom: end init_module ======Thanks & Regards,
VSR.On Tue, Jun 28, 2011 at 5:50 PM, Sebastian Biedermann <[email protected] <mailto:[email protected]>> wrote:
Dear List,
I´m trying to figure out *memory page sharing***using HVM on Xen 4.0.1,
but I´m not really able to find some useful information or sources about this issue.I just found two links porviding these sources:
http://knol.google.com/k/learning-grant-tables
http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114
<http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114>Both are not working.. I think they are made for an older version of xen.
Additionally I thought about checking the code of:
http://kyukhin.dyndns.org/lxr/http/source/drivers/xen/grant-table.c
..which is located in the Xen source, but that´s very complicated and I dont know what I need
for a simple page exchange using own programmed standalone tools between two running domains.Can anyone help me by sending some useful links or can anyone give me a hint where to start?
Thank you a lot!
--
Se_______________________________________________
Xen-devel mailing list
[email protected] <mailto:[email protected]>
http://lists.xensource.com/xen-devel
Signature · 9 lines
Sebastian Biedermann Security Engineering Group Technische Universität Darmstadt [email protected] This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
I too used the same link (Linux PV drivers for Xen HVM – building normally within an arbitrary kernel tree)
Coulple of questions:
Could you please check whether your sources have include/xenpvdrivers after applying the patch.
Have you disabled CONFIG_XEN and enabled CONFIG_XEN_PVDRIVERS as module ( CONFIG_XEN_PVDRIVERS=m)
Also, could you please share the error log.
Thanks & Regards,
VSR.
Quoted 110 lines · Sebastian Biedermann
**
Awesome, thank you very much!dom0 source compiles without problems!
domU source cannot find the xen headers:#include <
xenpvdrivers/evtchn.h>
#include <xenpvdrivers/xenbus.h>
#include <xenpvdrivers/interface/io/netif.h>
#include <xenpvdrivers/interface/memory.h>
#include <xenpvdrivers/balloon.h>
#include <xenpvdrivers/asm/maddr.h>I compiled in the PV HVM modules using this tutorial:
http://blog.alex.org.uk/?s=xenAnd built them into the guest kernel, it runs fine, but I dont have the right headers.
Can you tell me which xenpvdrivers headers you are using and where they come from?
Because e.g. I cannot find theasm/maddr.hin the xen sources.. or anywhere elseTank you !
Am 28.06.2011 15:24, schrieb veerasena reddy:
Hi,
I tried the same links but had to make some changes to get it working. Please find attached the sample working files for sharing a domU HVM page to dom0.
It has been tested xen-4.0.1 and HVM guest running ubuntu 10.10 with kernel version 2.6.35.9 (from kernel.org) compiled withCONFIG_XENdisabled and PVHVM drivers compiled in as modules.Procedure:
1. SetLINUX_ROOTappropriately in Makefiles of dom0 and domU.
2. Set remote domain in dom0 appropriately "info.remoteDomain = <domU_domain_id>"
3. Compile modules dom0 and domU respectively on dom0 and domU guest.
4. Load module on domU first.# insmod ./domu_share.ko 5. do "dmesg" on domU and note down the grant reference number [ 1293.316240] gref = 770 <<<--- this is the grant reference number 6. now load the module on dom0 by passing grant reference number as module param # insmod ./dom0_share.ko gref=770 7. do dmesg on dom0 ======== dmesg on dom0 ===== xen: dom0: init_module with gref = 770 xen: dom0: shared_page = 269f4000, handle = 9, status = 0 Bytes in page aseem sethi XEN: dom: end init_module ======Thanks & Regards,
VSR.Quoted 27 lines · Sebastian Biedermann
Dear List,
I´m trying to figure out *memory page sharing** *using HVM on Xen 4.0.1, but I´m not really able to find some useful information or sources about this issue.
I just found two links porviding these sources:
http://knol.google.com/k/learning-grant-tables
http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114Both are not working.. I think they are made for an older version of xen.
Additionally I thought about checking the code of:
http://kyukhin.dyndns.org/lxr/http/source/drivers/xen/grant-table.c
..which is located in the Xen source, but that´s very complicated and I dont know what I need
for a simple page exchange using own programmed standalone tools between two running domains.Can anyone help me by sending some useful links or can anyone give me a hint where to start?
Thank you a lot!
Quoted 10 lines
--
Se_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel--
Sebastian Biedermann
Security Engineering Group
Technische Universität Darmstadt
[email protected]
Quoted 6 lines
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi!
I will explain that a bit further...
dom0: Ubuntu 10.04-2 (amd64) kernel 2.6.32.39 running Xen 4.0.1 (amd64)
-> could easily compile and start dom0_working
domU: Ubuntu 10.04 (i386)
-> downloading kernel sources of kernel 2.6.32.11
-> patching with "pvdrivers-0.01/xenify.sh
xen-patches-2.6.32-1.tar.bz2" (works perfect)
-> copy the existing /boot/config-2.6.38.8 to this kernel sources
(thats correct?)
-> make menuconfig and just save & exitIf I now look at the .config of the 2.6.32.11 kernel, there is no CONFIG_XEN_PVDRIVER option
-> make localmodconfig
-> make -j 9
-> cd pvdrivers-0.01 and ./build.sh (works)Then I install the new compiled kernel with "make install modules_install" and I restart.
Now I have booted the kernel 2.6.32.11 in a HVM guest machine including additionally the pv modules, is that true?
Finally, the problem ist, that I cannot compile the domU_working, because there are no pvxendrivers header files on the system.
I think I forgot one step or I have a general problem understanding the whole process. Where can I get the xen header Files?
It tried it also with kernel 2.6.38 and Ubuntu 11.04, but I cloud not ./built the pvdrivers because the compilation process termintated with
"Cannot compile, Error: linux-2.6.38.8/include/linux/autoconf.h: missing".
Thank you!
Se
Am 29.06.2011 13:20, schrieb veerasena reddy:
Quoted 135 lines
I too used the same link (Linux PV drivers for Xen HVM – building normally within an arbitrary kernel tree)
Coulple of questions:
Could you please check whether your sources haveinclude/xenpvdriversafter applying the patch. Have you disabledCONFIG_XENand enabledCONFIG_XEN_PVDRIVERSas module (CONFIG_XEN_PVDRIVERS=m) Also, could you please share the error log.Thanks & Regards,
VSR.
On Wed, Jun 29, 2011 at 3:41 PM, Sebastian Biedermann <[email protected] <mailto:[email protected]>> wrote:Awesome, thank you very much!
dom0 source compiles without problems!
domU source cannot find the xen headers:#include <
xenpvdrivers/evtchn.h>
#include <xenpvdrivers/xenbus.h>
#include <xenpvdrivers/interface/io/netif.h>
#include <xenpvdrivers/interface/memory.h>
#include <xenpvdrivers/balloon.h>
#include <xenpvdrivers/asm/maddr.h>I compiled in the PV HVM modules using this tutorial:
http://blog.alex.org.uk/?s=xenAnd built them into the guest kernel, it runs fine, but I dont have the right headers.
Can you tell me which xenpvdrivers headers you are using and where they come from?
Because e.g. I cannot find theasm/maddr.hin the xen sources.. or anywhere elseTank you !
Am 28.06.2011 15:24, schrieb veerasena reddy:
Quoted 74 lines
Hi,
I tried the same links but had to make some changes to get it working.
Please find attached the sample working files for sharing a domU HVM page to dom0.
It has been tested xen-4.0.1 and HVM guest running ubuntu 10.10 with kernel version 2.6.35.9 (from kernel.org
<http://kernel.org>) compiled withCONFIG_XENdisabled and PVHVM drivers compiled in as modules.Procedure:
1. SetLINUX_ROOTappropriately in Makefiles of dom0 and domU.
2. Set remote domain in dom0 appropriately "info.remoteDomain = <domU_domain_id>"
3. Compile modules dom0 and domU respectively on dom0 and domU guest.
4. Load module on domU first.
# insmod ./domu_share.ko
5. do "dmesg" on domU and note down the grant reference number [ 1293.316240] gref = 770 <<<--- this is the grant reference
number
6. now load the module on dom0 by passing grant reference number as module param
# insmod ./dom0_share.ko gref=770
7. do dmesg on dom0
======== dmesg on dom0 =====
xen: dom0:init_modulewith gref = 770
xen: dom0:shared_page=269f4000, handle = 9, status = 0 Bytes in page aseem sethi
XEN: dom: endinit_module
======Thanks & Regards,
VSR.On Tue, Jun 28, 2011 at 5:50 PM, Sebastian Biedermann <[email protected] <mailto:[email protected]>> wrote:
Dear List,
I´m trying to figure out *memory page sharing***using HVM on Xen 4.0.1,
but I´m not really able to find some useful information or sources about this issue.I just found two links porviding these sources:
http://knol.google.com/k/learning-grant-tables
http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114
<http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114>Both are not working.. I think they are made for an older version of xen.
Additionally I thought about checking the code of:
http://kyukhin.dyndns.org/lxr/http/source/drivers/xen/grant-table.c
..which is located in the Xen source, but that´s very complicated and I dont know what I need
for a simple page exchange using own programmed standalone tools between two running domains.Can anyone help me by sending some useful links or can anyone give me a hint where to start?
Thank you a lot!
--
SeQuoted 7 lines
_______________________________________________
Xen-devel mailing list
[email protected]
<mailto:[email protected]>
http://lists.xensource.com/xen-devel--
Sebastian Biedermann
Security Engineering Group
Technische Universität Darmstadt [email protected] <mailto:[email protected]>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.
Signature · 9 lines
Sebastian Biedermann Security Engineering Group Technische Universität Darmstadt [email protected] This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi,
I think you have followed the older (which is complicated) procedure "How to compile Xen pv drivers for Linux HVM on a modern kernel" in the link.
Please try the latest write-up "Linux PV drivers for Xen HVM – building normally within an arbitrary kernel tree" in the same webpage. Here is the separate link to that:
http://blog.alex.org.uk/2010/05/09/linux-pv-drivers-for-xen-hvm-building-normally-within-an-arbitrary-kernel-tree/
Go the line "To install, simply apply this patch<http://www.alex.org.uk/pvdrivers.20100509-1955.patch>to your kernel build tree, and build as normal." and click on "this patch" highlighted.
This patch adds drivers/xenpvdrivers/ and include/xenpvdriers/ directories to your kernel sources.
Regarding configuration file:
Use the config file of ubuntu-10.04 default kernel "/boot/config-xx.yy.zz" as the base and do menuconfig, disable CONFIG_XEN and enable CONFIG_XEN_PVDRIVERS as module (CONFIG_XEN_PVDRIVERS=m)
# download 2.6.32.11 kernel and the xen_pvdriver patch from the above link
"pvdrivers.20100509-1955.patch"
# tar zxf 2.6.32.11.tar.gz
# cd linux-2.6.32.11
# patch -p1 < path_to_patch_downloaded /* apply the patch */
verify whether drivers/xenpvdrivers and include/xenpvdrivers created or
not after the patch?
# cp /boot/config-<ubuntu_10_04_kernel_version> .config
# make menuconfig
disable PV Guest support
Processor type and features ---> [] Paravirtualized guest support --->
This internally disables CONFIG_XEN
# enable CONFIG_XEN_PVDRIVERS option
Device Drivers --->
<M> Xen pvdrivers
[*] Scrub pages before returning them to system
# go ahead with rest of the build/install procedure.Regards,
VSR.
Quoted 186 lines · Sebastian Biedermann
**
Hi!I will explain that a bit further...
dom0: Ubuntu 10.04-2 (amd64) kernel 2.6.32.39 running Xen 4.0.1 (amd64)
-> could easily compile and start dom0_workingdomU: Ubuntu 10.04 (i386)
-> downloading kernel sources of kernel 2.6.32.11 -> patching with "pvdrivers-0.01/xenify.sh xen-patches-2.6.32-1.tar.bz2" (works perfect) -> copy the existing /boot/config-2.6.38.8 to this kernel sources (thats correct?) -> make menuconfig and just save & exitIf I now look at the .config of the 2.6.32.11 kernel, there is no
CONFIG_XEN_PVDRIVERoption-> make localmodconfig -> make -j 9 -> cd pvdrivers-0.01 and ./build.sh (works)Then I install the new compiled kernel with "make install
modules_install" and I restart.
Now I have booted the kernel 2.6.32.11 in a HVM guest machine including additionally the pv modules, is that true?Finally, the problem ist, that I cannot compile the
domU_working, because there are no pvxendrivers header files on the system.I think I forgot one step or I have a general problem understanding the whole process.
Where can I get the xen header Files?It tried it also with kernel 2.6.38 and Ubuntu 11.04, but I cloud not ./built the pvdrivers
because the compilation process termintated with
"Cannot compile, Error:linux-2.6.38.8/include/linux/autoconf.h: missing".Thank you!
SeAm 29.06.2011 13:20, schrieb veerasena reddy:
I too used the same link (Linux PV drivers for Xen HVM – building normally within an arbitrary kernel tree)
Coulple of questions:
Could you please check whether your sources haveinclude/xenpvdriversafter applying the patch.
Have you disabledCONFIG_XENand enabledCONFIG_XEN_PVDRIVERSas module (CONFIG_XEN_PVDRIVERS=m)
Also, could you please share the error log.Thanks & Regards,
VSR.Quoted 110 lines · Sebastian Biedermann
Awesome, thank you very much!
dom0 source compiles without problems!
domU source cannot find the xen headers:#include <
xenpvdrivers/evtchn.h>
#include <xenpvdrivers/xenbus.h>
#include <xenpvdrivers/interface/io/netif.h>
#include <xenpvdrivers/interface/memory.h>
#include <xenpvdrivers/balloon.h>
#include <xenpvdrivers/asm/maddr.h>I compiled in the PV HVM modules using this tutorial:
http://blog.alex.org.uk/?s=xenAnd built them into the guest kernel, it runs fine, but I dont have the right headers.
Can you tell me which xenpvdrivers headers you are using and where they come from?
Because e.g. I cannot find theasm/maddr.hin the xen sources.. or anywhere elseTank you !
Am 28.06.2011 15:24, schrieb veerasena reddy:
Hi,
I tried the same links but had to make some changes to get it working. Please find attached the sample working files for sharing a domU HVM page to dom0.
It has been tested xen-4.0.1 and HVM guest running ubuntu 10.10 with kernel version 2.6.35.9 (from kernel.org) compiled withCONFIG_XENdisabled and PVHVM drivers compiled in as modules.Procedure:
1. SetLINUX_ROOTappropriately in Makefiles of dom0 and domU.
2. Set remote domain in dom0 appropriately "info.remoteDomain = <domU_domain_id>"
3. Compile modules dom0 and domU respectively on dom0 and domU guest.
4. Load module on domU first.# insmod ./domu_share.ko 5. do "dmesg" on domU and note down the grant reference number [ 1293.316240] gref = 770 <<<--- this is the grant reference number 6. now load the module on dom0 by passing grant reference number as module param # insmod ./dom0_share.ko gref=770 7. do dmesg on dom0 ======== dmesg on dom0 ===== xen: dom0: init_module with gref = 770 xen: dom0: shared_page = 269f4000, handle = 9, status = 0 Bytes in page aseem sethi XEN: dom: end init_module ======Thanks & Regards,
VSR.Quoted 28 lines · Sebastian Biedermann
Dear List,
I´m trying to figure out *memory page sharing** *using HVM on Xen 4.0.1,
but I´m not really able to find some useful information or sources about this issue.
I just found two links porviding these sources:
http://knol.google.com/k/learning-grant-tables
http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114Both are not working.. I think they are made for an older version of xen.
Additionally I thought about checking the code of:
http://kyukhin.dyndns.org/lxr/http/source/drivers/xen/grant-table.c
..which is located in the Xen source, but that´s very complicated and I dont know what I need
for a simple page exchange using own programmed standalone tools between two running domains.Can anyone help me by sending some useful links or can anyone give me a hint where to start?
Thank you a lot!
Quoted 10 lines
--
Se_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel--
Sebastian Biedermann
Security Engineering Group
Technische Universität Darmstadt
[email protected]Quoted 6 lines
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.
--
Sebastian Biedermann
Security Engineering Group
Technische Universität [email protected]
Quoted 6 lines
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel