From: Takashi Iwai <tiwai@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zachary Amsden <zach@vmware.com>,
Christoph Hellwig <hch@infradead.org>,
Tobias Powalowski <t.powa@gmx.de>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86/paravirt: revert exports to restore old behaviour
Date: Tue, 20 Nov 2007 07:25:45 +0100 [thread overview]
Message-ID: <s5hd4u5bfh2.wl%tiwai@suse.de> (raw)
In-Reply-To: <474234E7.4070505@goop.org>
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
next prev parent reply other threads:[~2007-11-20 6:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 10:39 REGRESSION: 2.6.24 breaks nvidia and amd/ati binary drivers, by exporting paravirt symbols as GPL Tobias Powalowski
2007-11-13 20:21 ` [PATCH] x86/paravirt: revert exports to restore old behaviour Jeremy Fitzhardinge
2007-11-13 22:22 ` Christoph Hellwig
2007-11-14 0:51 ` Zachary Amsden
2007-11-19 17:05 ` Takashi Iwai
2007-11-20 1:14 ` Jeremy Fitzhardinge
2007-11-20 6:25 ` Takashi Iwai [this message]
2007-11-14 1:22 ` Jeremy Fitzhardinge
2007-11-27 22:57 Jeremy Fitzhardinge
2007-11-28 20:40 ` Adrian Bunk
2007-11-28 21:15 ` Jeremy Fitzhardinge
2007-11-28 22:39 ` Adrian Bunk
2007-11-28 23:57 ` Jeremy Fitzhardinge
2007-11-29 22:06 ` Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hd4u5bfh2.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=hch@infradead.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=t.powa@gmx.de \
--cc=tglx@linutronix.de \
--cc=zach@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome