All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: [PATCH v2] kvm-kmod: x86: Drop duplicate external-module-compat objects
Date: Mon, 25 May 2009 08:56:46 +0200	[thread overview]
Message-ID: <4A1A412E.2090106@web.de> (raw)
In-Reply-To: <4A19021E.8080205@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3018 bytes --]

Avi Kivity wrote:
> Jan Kiszka wrote:
>> This redundancy breaks subtly when building against recent OpenSUSE
>> kernels.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>>  x86/Kbuild |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/x86/Kbuild b/x86/Kbuild
>> index e304c79..ade87fc 100644
>> --- a/x86/Kbuild
>> +++ b/x86/Kbuild
>> @@ -13,7 +13,7 @@ endif
>>  ifeq ($(CONFIG_IOMMU_API),y)
>>  kvm-objs += iommu.o
>>  endif
>> -kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o
>> -kvm-amd-objs := svm.o ../external-module-compat.o
>> +kvm-intel-objs := vmx.o vmx-debug.o
>> +kvm-amd-objs := svm.o
>>  
>>   
> 
> IIRC, for really old kernels, some symbols are defined in
> external-module-compat.c and needed by kvm-$arch.ko.  So we'll have to
> export those symbols if we drop the double link (which is a good idea
> regardless of the build problem).
> 

Checked against 2.6.18 (2.6.16 doesn't build build with my gcc-4.3 and
x86/x86_emulate.o sends my gcc-3.3 into some stack overflow): We only
need to export kvm_smp_call_function_single.

More patches to fix various old kernel build breakages are now also in
my queue...

------------>

This redundancy breaks subtly when building against recent OpenSUSE
kernels. Somehow scripts/basic/hash gets called with multiple modname
arguments, causing it to fail and produce invalid output.

Changes in v2:
 - export kvm_smp_call_function_single required by vendor module

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 external-module-compat.c |    3 +++
 x86/Kbuild               |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/external-module-compat.c b/external-module-compat.c
index f6013f3..6b69127 100644
--- a/external-module-compat.c
+++ b/external-module-compat.c
@@ -46,6 +46,7 @@ int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
 	put_cpu();
 	return r;
 }
+EXPORT_SYMBOL_GPL(kvm_smp_call_function_single);
 
 #define smp_call_function_single kvm_smp_call_function_single
 
@@ -75,6 +76,7 @@ int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
 	put_cpu();
 	return r;
 }
+EXPORT_SYMBOL_GPL(kvm_smp_call_function_single);
 
 #define smp_call_function_single kvm_smp_call_function_single
 
@@ -104,6 +106,7 @@ int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
 
 }
 #endif /* !CONFIG_SMP */
+EXPORT_SYMBOL_GPL(kvm_smp_call_function_single);
 
 #define smp_call_function_single kvm_smp_call_function_single
 
diff --git a/x86/Kbuild b/x86/Kbuild
index e304c79..ade87fc 100644
--- a/x86/Kbuild
+++ b/x86/Kbuild
@@ -13,7 +13,7 @@ endif
 ifeq ($(CONFIG_IOMMU_API),y)
 kvm-objs += iommu.o
 endif
-kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o
-kvm-amd-objs := svm.o ../external-module-compat.o
+kvm-intel-objs := vmx.o vmx-debug.o
+kvm-amd-objs := svm.o
 
 CFLAGS_kvm_main.o = -DKVM_MAIN


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2009-05-25  6:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 20:04 [PATCH] kvm-kmod: x86: Drop duplicate external-module-compat objects Jan Kiszka
2009-05-23  1:36 ` Chris Wright
2009-05-23 11:55   ` Jan Kiszka
2009-05-24  8:17     ` Avi Kivity
2009-05-25  6:49       ` Jan Kiszka
2009-05-25  9:40         ` Avi Kivity
2009-05-24  8:15 ` Avi Kivity
2009-05-25  6:56   ` Jan Kiszka [this message]
2009-05-25  9:36     ` [PATCH v2] " Avi Kivity

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=4A1A412E.2090106@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.