From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm compat patch Date: Sun, 04 Feb 2007 11:35:41 +0200 Message-ID: <45C5A8ED.2010402@qumranet.com> References: <45C29834.4020107@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Markus Rechberger Return-path: In-Reply-To: <45C29834.4020107-5C7GfCeVMHo@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Markus Rechberger wrote: > This patch fixes the mutex, page and kzalloc problems with older kernels. > > Signed-off-by: Markus Rechberger > > The page_private() and kzalloc() stuff looks good, I can apply it. But: > Index: kvm.h > =================================================================== > --- kvm.h (revision 4381) > +++ kvm.h (working copy) > @@ -8,7 +8,9 @@ > > #include > #include > +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) > #include > +#endif > Checks on kernel version are (usually) not accepted in mainline. I think I can cook up some Makefile magic to work around the #include though. > #include > #include > > @@ -225,7 +227,11 @@ > struct vmcs *vmcs; > struct vcpu_svm *svm; > }; > +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) > struct mutex mutex; > +#else > + struct semaphore mutex; > +#endif > '#define mutex semaphore' in external-module-comapt.h, please. > +#if 0 > + page->private; > +#endif > Please delete. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642