From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/5]: Fix kdump under KVM Date: Wed, 28 Oct 2009 11:59:51 +0200 Message-ID: <4AE81617.6060406@redhat.com> References: <1256661667-9298-1-git-send-email-clalance@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Chris Lalancette Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46149 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbZJ1J7s (ORCPT ); Wed, 28 Oct 2009 05:59:48 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9S9xr96025516 for ; Wed, 28 Oct 2009 05:59:53 -0400 In-Reply-To: <1256661667-9298-1-git-send-email-clalance@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/27/2009 06:41 PM, Chris Lalancette wrote: > This patch series aims to get kdump working inside a KVM guest. > The current problem with using kdump is that KVM always delivers > PIT interrupts to the BSP, and the BSP only. While this is > technically allowed by the MPS spec, most motherboards actually > deliver timer interrupts to *any* LAPIC in virtual wire mode. > Since a crash can occur on any CPU, timer interrupts must > be able to reach any CPU in order for kdump to work properly. > > Therefore, this patch series kicks all of the relevant vCPUs > when delivering a timer interrupt. With these patches in > place, kdump in a RHEL-5 guest works properly. > This is pretty expensive on large guests. However I suppose under normal conditions we won't be in virtual wire mode? The kick from i8254 code is pretty bad, as you mention. I forget why it is needed at all - shouldn't kvm_set_irq() end up kicking the correct vcpu (and note the pic still insists on the bsp:) /* * callback when PIC0 irq status changed */ static void pic_irq_request(void *opaque, int level) { struct kvm *kvm = opaque; struct kvm_vcpu *vcpu = kvm->bsp_vcpu; struct kvm_pic *s = pic_irqchip(kvm); int irq = pic_get_irq(&s->pics[0]); s->output = level; if (vcpu && level && (s->pics[0].isr_ack & (1 << irq))) { s->pics[0].isr_ack &= ~(1 << irq); kvm_vcpu_kick(vcpu); } } -- error compiling committee.c: too many arguments to function