Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759066AbXKTGw0 (ORCPT ); Tue, 20 Nov 2007 01:52:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754815AbXKTGwR (ORCPT ); Tue, 20 Nov 2007 01:52:17 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57793 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbXKTGwQ (ORCPT ); Tue, 20 Nov 2007 01:52:16 -0500 Date: Tue, 20 Nov 2007 07:25:45 +0100 Message-ID: From: Takashi Iwai To: Jeremy Fitzhardinge Cc: Zachary Amsden , Christoph Hellwig , Tobias Powalowski , linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner Subject: Re: [PATCH] x86/paravirt: revert exports to restore old behaviour In-Reply-To: <474234E7.4070505@goop.org> References: <200711131139.42791.t.powa@gmx.de> <473A073C.2020201@goop.org> <20071113222212.GA1322@infradead.org> <1195001464.6352.109.camel@bodhitayantram.eng.vmware.com> <474234E7.4070505@goop.org> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2627 Lines: 76 At Mon, 19 Nov 2007 17:14:15 -0800, Jeremy Fitzhardinge wrote: > > Takashi Iwai wrote: > > I took at this problem (as I have an nvidia card on one of my > > workstations), and found out that the following suffer from > > EXPORT_SYMBOL_GPL changes: > > > > Which kernel version are you using? This is different in .24-rc > compared to .23. 24-rc2. 23 has no problem, as you know :) > > * local_disable_irq(), local_irq_save*(), etc. > > > > These should be OK either way. pv_irq_ops is not _GPL. Right. I thought it somehow involved with other pv ops indirectly, but it seems not. > > * MSR-related macros like rdmsr(), wrmsr(), read_cr0(), etc. > > wbinvd(), too. > > > > These could reasonably use the the native_* versions anyway, since the > driver won't be being used in an environment where these won't work. > Perhaps they should be split out separate from the gdt/ldt operations, > which they should have no business touching. Yes, that's possible. > > * pmd_val(), pgd_val(), etc are all involved with pv_mm_ops. > > pmd_large() and pmd_bad() is also indirectly involved. > > __flush_tlb() and friends suffer, too. > > > > Yeah, I guess they can be expected to play with pagetables. > > > The easiest workaround I found was to undefine CONFIG_PARAVIRT before > > inclusion of linux kernel headers, but it is really ugly and hacky. > > > > Yeah. It will explode if you are running in a virtual environment which > still gives the virtual machine graphics hardware access. Yes. More over, there is no guarantee that this will be built properly in the future. It's a kind of coincident that the driver is built. If any non-paravirt implementation accesses an exported symbol instead of inlining, then this won't work, too. > > Redefinig with raw_*() and native_*() is another way, but it takes > > much more work than defining these primitive functions in assembly. > > > > So, in short, with EXPORT_SYMBOL_GPL change, it's pretty hard to write > > a non-GPL driver in a same manner... > > > > Yeah. I think removing the difference between PARAVIRT and non-PARAVIRT > is enough to justify the exports. If we want to make the policy > decision that modules can't use pagetable or msr operations at all, then > that's a separate decision which can be applied uniformly to PARAVIRT > and non-PARAVIRT. Agreed. thanks, Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/