From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH 0/2] kvm: disable virtualization on kdump Date: Thu, 23 Oct 2008 18:00:17 -0700 Message-ID: References: <20081022232824.GD5247@verge.net.au> <20081023194129.GD27959@blackpad> <20081023222906.GB10753@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eduardo Habkost , kexec@lists.infradead.org, Avi Kivity , kvm@vger.kernel.org, Andrew Morton , Vivek Goyal , Haren Myneni To: Simon Horman Return-path: Received: from out02.mta.xmission.com ([166.70.13.232]:43719 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424AbYJXBEe (ORCPT ); Thu, 23 Oct 2008 21:04:34 -0400 In-Reply-To: <20081023222906.GB10753@verge.net.au> (Simon Horman's message of "Fri, 24 Oct 2008 09:29:08 +1100") Sender: kvm-owner@vger.kernel.org List-ID: Simon Horman writes: > [ Added Andrew Morton, Eric Biederman, Vivek Goyal and Haren Myneni to CC ] > > On Thu, Oct 23, 2008 at 05:41:29PM -0200, Eduardo Habkost wrote: >> On Thu, Oct 23, 2008 at 10:28:24AM +1100, Simon Horman wrote: >> > On Mon, Oct 20, 2008 at 01:01:32PM -0200, Eduardo Habkost wrote: >> > > The following two patches should make kdump work when the kvm-intel module >> > > is loaded. We need to disable vmx mode before booting the kdump kernel, >> > > so I've introduced a notifier interface where KVM can hook and disable >> > > virtualization on all CPUs just before they are halted. >> > > >> > > It has the same purpose of the KVM reboot notifier that gets executed >> > > at kexec-time. But on the kdump case, things are not as simple because >> > > the kernel has just crashed. >> > > >> > > The notifier interface being introduced is x86-specific. I don't know >> > > if an arch-independent interface would be more appropriate for this >> > > case. My preference would be to have a magic function call that compiles out when kvm isn't present. This is a code path that is hard to audit and test, and get right. A notifier chain seems to make a proper audit all but impossible. Why do we need to disable vmx mode before booting a normal linux kernel? Is it possible to disable vmx mode before we enable interrrupts in the kdump kernel? Eric