From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: out of memory page request Date: Mon, 08 Oct 2007 10:03:09 +0200 Message-ID: <4709E43D.40003@qumranet.com> References: <9c21eeae0710032143j3ed5f43dgc3858a8fde6806d1@mail.gmail.com> <470638A5.3020609@qumranet.com> <9c21eeae0710071037o452bea4bm706e044526ed7ab7@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060205090304040300020303" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: David Brown Return-path: In-Reply-To: <9c21eeae0710071037o452bea4bm706e044526ed7ab7-JsoAwUIsXosN+BqQ9rBEUg@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. --------------060205090304040300020303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit David Brown wrote: >> Can you run 'gdb /path/to/kvm.ko' and post the output of 'disassemble >> ioapic_mmio_write' please? >> >> > > Sorry for not getting back sooner. > > (gdb) disassemble ioapic_mmio_write > Dump of assembler code for function ioapic_mmio_write: > The attached patch should fix, though there's probably another problem lurking in there. -- Any sufficiently difficult bug is indistinguishable from a feature. --------------060205090304040300020303 Content-Type: text/x-patch; name="ioapic-indirect-write-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ioapic-indirect-write-fix.patch" commit f1b8c28f1886c9375361d7f2ebca1f742ea6bc5f Author: Avi Kivity Date: Mon Oct 8 10:01:45 2007 +0200 KVM: Check I/O APIC indirect index before writing Signed-off-by: Avi Kivity diff --git a/drivers/kvm/ioapic.c b/drivers/kvm/ioapic.c index 9eb5058..c7992e6 100644 --- a/drivers/kvm/ioapic.c +++ b/drivers/kvm/ioapic.c @@ -96,7 +96,7 @@ static void ioapic_service(struct kvm_ioapic *ioapic, unsigned int idx) static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) { - int index; + unsigned index; switch (ioapic->ioregsel) { case IOAPIC_REG_VERSION: @@ -114,7 +114,8 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) index = (ioapic->ioregsel - 0x10) >> 1; ioapic_debug("change redir index %x val %x", index, val); - ASSERT(irq < IOAPIC_NUM_PINS); + if (index >= IOAPIC_NUM_PINS) + return; if (ioapic->ioregsel & 1) { ioapic->redirtbl[index].bits &= 0xffffffff; ioapic->redirtbl[index].bits |= (u64) val << 32; --------------060205090304040300020303 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: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --------------060205090304040300020303 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 --------------060205090304040300020303--