Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Technical Notes for Advanced Users

The following information is provided to assist those who are familiar with compiling kernels. Many Linux distributions provide documentation on how to compile a kernel in kernel source packages. For users compiling 2.6.30+ kernels, Amazon recommends using the PVOps method described below. Amazon is unable to offer support for compiling your own kernel.

openSUSE and Gentoo Kernels

Both openSUSE and Gentoo provide native source code that enables compiling an Amazon EC2 capable kernel. For openSUSE, the configuration options are part of the mainline 11.2 and higher, while Gentoo provides a Xen-compatible in the "xen-sources" portage package. For both distributions, please use the following kernel configuration options:

CONFIG_XEN_COMPAT_00002_AND_LATER=y
CONFIG_XEN_COMPAT=0x030002
CONFIG_HOTPLUG_CPU=y

Option 1: Patching vanilla or other distribution kernels (apply Xen DomU patchset)

The process of patching any kernel (vanilla or distribution) is an advanced topic. For instructions, see “kernel/Documentation/applying-patches.txt” under the kernel source tree for instructions.

The same patchset that is used with openSUSE and Gentoo can be applied to a vanilla kernel.org kernel.

http://code.google.com/p/gentoo-xen-kernel/downloads/list
2.6.29: http://lists.xensource.com/archives/html/xen-users/2009-04/msg00004.html http://lists.xensource.com/archives/html/xen-devel/2009-06/msg00127.html
2.6.30: http://lists.xensource.com/archives/html/xen-devel/2009-07/msg00027.html
2.6.31: http://lists.xensource.com/archives/html/xen-users/2009-10/msg00342.html
2.6.31-9: http://lists.xensource.com/archives/html/xen-users/2009-12/msg00411.html
2.6.31-10: http://lists.xensource.com/archives/html/xen-users/2010-01/msg00032.html
2.6.31-14 and 2.6.32-1 :http://lists.xensource.com/archives/html/xen-users/2010-04/msg00091.html

Option 2: Patching vanilla or other distribution kernels (PVOps)

For PVOps kernels, you can elect to disable the XSAVE hypercall in the guest. The following patch works against 2.6.32 through 2.6.35 kernels.

---
 arch/x86/xen/enlighten.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 52f8e19..6db3d67 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -802,6 +802,7 @@ static void xen_write_cr4(unsigned long cr4)
 {
 	cr4 &= ~X86_CR4_PGE;
 	cr4 &= ~X86_CR4_PSE;
+	cr4 &= ~X86_CR4_OSXSAVE;
 
 	native_write_cr4(cr4);
 }
-- 
1.6.6.1