From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Oopse in kvm Date: Wed, 18 Apr 2007 11:21:30 +0300 Message-ID: <4625D50A.3010005@qumranet.com> References: <9c21eeae0704171348r71a62af8nc98bb018313ca35@mail.gmail.com> <4625A521.6010407@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010209030501090603040901" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: David Brown Return-path: In-Reply-To: <4625A521.6010407-atKUWr5tajBWk0Htik3J/w@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 This is a multi-part message in MIME format. --------------010209030501090603040901 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Avi Kivity wrote: > David Brown wrote: > >> I was wondering of anyone could help out on this, just found an oopse >> when trying to start rhel4 on i386 box. I was wondering if anyone else >> has seen this with kvm-18 and if I should submit a bug for it. >> >> [10937.520000] BUG: unable to handle kernel NULL pointer dereference >> [10937.521000] EIP: [] mmu_page_remove_parent_pte+0xc/0xf0 >> [kvm] SS:ESP 0068:c918fbbc >> [10937.521000] >> >> >> > > > I've seen a few reports like this, but never managed to get one of my own. > > Is this reproducible? If so, a recipe would be _very_ valuable. > > At what stage in the boot process does it crash? > > Okay, I got a testcase through a private mail which reproduced this on guest boot. The attached patch fixes it. Note that the problem is only with nonpae guests, so if your guest is pae, you're probably seeing something different. -- error compiling committee.c: too many arguments to function --------------010209030501090603040901 Content-Type: text/x-patch; name="nonpae-oops-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="nonpae-oops-fix.patch" diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index b872f09..c814394 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -1190,6 +1190,7 @@ void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes) * and zap two pdes instead of one. */ if (level == PT32_ROOT_LEVEL) { + page_offset &= ~7; /* kill rounding error */ page_offset <<= 1; npte = 2; } --------------010209030501090603040901 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --------------010209030501090603040901 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------010209030501090603040901--