From: Keir Fraser Subject: Re: [PATCH 1/2] x86, hvm: allow another vcpu to receive PIT IRQ (support kexec/kdump on hvm) Date: Tue, 30 Jun 2009 10:02:30 +0100 Message-ID: References: <7kmy7qnogg.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <7kmy7qnogg.fsf@pingu.sky.yk.fujitsu.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kouya Shimura Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 30/06/2009 08:57, "Kouya Shimura" wrote: >> Really? Why would it do that? > > Not always. kdump leaves one cpu which has received a crash signal > and halts all other cpus. I don't know why. That seems very brave of it, if it also expects interrupts to still work! Does it really require *all* interrupts still to be functional? >> These patches are pretty nasty. We can perhaps come up with a neater smaller >> version of them if there's a real need. > > Hmm, though I tried to make them small... > Could you refine them? Well, looking at patch 1/2 to start with, some of the issues you address are not particular to the PIT, but to any interrupt delivered via vpt.c. I suspect what you really need is a hook into vpt.c when a vcpu goes down, to move all its vpt's (except its own LAPIC one) onto another vcpu's list. And on create_periodic_time() ignore the suggested vcpu given by the caller if that vcpu is down. And disable the IRQ0_SPECIAL_ROUTING in vioapic.c if vcpu0 is down. Patch 2/2 I suppose something like that might be acceptable. Still it'd be nice to not have every VCPU piling into hvm_dirq_assist(). Perhaps that and vpt.c could agree on who their current 'fallback vcpu' is, and have that inherit orphaned vpts and do all dirq assistance. It's still a bit fragile and a bit of a pain in the butt though. Is kdump in HVM guests super important? -- Keir