lkml.org 
[lkml]   [2007]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/paravirt: revert exports to restore old behaviour
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.

> * local_disable_irq(), local_irq_save*(), etc.
>

These should be OK either way. pv_irq_ops is not _GPL.

> * 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.

> * 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.

> 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.

J
-
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/

\
 
 \ /
  Last update: 2007-11-20 02:33    [W:0.079 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site