From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Subject: Re: [PATCH 2 of 2] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier Date: Wed, 16 Jan 2008 10:23:11 -0600 Message-ID: <1200500591.26153.1.camel@basalt> References: <9878c9cec5f831ff5e9b.1200434386@basalt> <478DBB95.6030005@qumranet.com> Reply-To: Hollis Blanchard Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <478DBB95.6030005-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 On Wed, 2008-01-16 at 10:08 +0200, Avi Kivity wrote: > Hollis Blanchard wrote: > > # HG changeset patch > > # User Hollis Blanchard > > # Date 1200434370 21600 > > # Node ID 9878c9cec5f831ff5e9b97539aabc5fa3d934501 > > # Parent 931a81e1002110be0e8bf5b335bf199d43534c2c > > This allows kvm_host.h to be #included even when struct preempt_notifier is > > undefined. > > Don't you actually need preempt notifiers? They are useful if you have > state that is only needed from userspace, but is expensive to switch. > For x86, this is the syscall msrs (which define the syscall entry > point), the fpu (which is not used in the kernel), and a few other bits > (which I'm too lazy too look up and are esoteric anyway). Yes, I do. However, if you #include *without* CONFIG_VIRTUALIZATION=y, CONFIG_PREEMPT_NOTIFIERS is not set and the structure is undefined. It is Linux policy to be able to unconditionally include headers, and indeed I already hit this problem when I added that #include to arch/powerpc/kernel/asm-offsets.c. -- Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/