public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add the arg "module" for kvm_arch_init
@ 2007-11-22 23:32 Zhang, Xiantao
       [not found] ` <42DFA526FC41B1429CE7279EF83C6BDC9E752C-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Zhang, Xiantao @ 2007-11-22 23:32 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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


From: Zhang Xiantao <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Fri, 23 Nov 2007 07:28:35 +0800
Subject: [PATCH] Add the arg module for kvm_arch_into
Add the arg module for kvm_arch_into, since some archs may
need module info.
Signed-off-by: Zhang Xiantao <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/kvm/kvm.h      |    4 +++-
 drivers/kvm/kvm_main.c |    2 +-
 drivers/kvm/x86.c      |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index ca638d9..e765b32 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -15,6 +15,8 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/preempt.h>
+#include <linux/module.h>
+
 #include <asm/signal.h>
 
 #include <linux/kvm.h>
@@ -451,7 +453,7 @@ int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu
*vcpu,
 				    struct kvm_debug_guest *dbg);
 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run
*kvm_run);
 
-int kvm_arch_init(void *opaque);
+int kvm_arch_init(void *opaque, struct module *module);
 void kvm_arch_exit(void);
 
 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 4706ed8..c738697 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1337,7 +1337,7 @@ int kvm_init(void *opaque, unsigned int vcpu_size,
 
 	kvm_init_debug();
 
-	r = kvm_arch_init(opaque);
+	r = kvm_arch_init(opaque, module);
 	if (r)
 		goto out4;
 
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index 0873c95..f373040 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -1994,7 +1994,7 @@ int kvm_emulate_pio_string(struct kvm_vcpu *vcpu,
struct kvm_run *run, int in,
 }
 EXPORT_SYMBOL_GPL(kvm_emulate_pio_string);
 
-int kvm_arch_init(void *opaque)
+int kvm_arch_init(void *opaque, struct module *module)
 {
 	int r;
 	struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque;
-- 
1.5.1.2

[-- Attachment #2: 0001-Add-the-arg-module-for-kvm_arch_into-since-some-arc.patch --]
[-- Type: application/octet-stream, Size: 2021 bytes --]

From 5678fd3b385f0d3157957f2fcfd5b740722d102d Mon Sep 17 00:00:00 2001
From: Zhang Xiantao <xiantao.zhang@intel.com>
Date: Fri, 23 Nov 2007 07:28:35 +0800
Subject: [PATCH] Add the arg module for kvm_arch_init
Add the arg module for kvm_arch_init, since some archs may need module info.
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
 drivers/kvm/kvm.h      |    4 +++-
 drivers/kvm/kvm_main.c |    2 +-
 drivers/kvm/x86.c      |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index ca638d9..e765b32 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -15,6 +15,8 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/preempt.h>
+#include <linux/module.h>
+
 #include <asm/signal.h>
 
 #include <linux/kvm.h>
@@ -451,7 +453,7 @@ int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu *vcpu,
 				    struct kvm_debug_guest *dbg);
 int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run);
 
-int kvm_arch_init(void *opaque);
+int kvm_arch_init(void *opaque, struct module *module);
 void kvm_arch_exit(void);
 
 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 4706ed8..c738697 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1337,7 +1337,7 @@ int kvm_init(void *opaque, unsigned int vcpu_size,
 
 	kvm_init_debug();
 
-	r = kvm_arch_init(opaque);
+	r = kvm_arch_init(opaque, module);
 	if (r)
 		goto out4;
 
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index 0873c95..f373040 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -1994,7 +1994,7 @@ int kvm_emulate_pio_string(struct kvm_vcpu *vcpu, struct kvm_run *run, int in,
 }
 EXPORT_SYMBOL_GPL(kvm_emulate_pio_string);
 
-int kvm_arch_init(void *opaque)
+int kvm_arch_init(void *opaque, struct module *module)
 {
 	int r;
 	struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque;
-- 
1.5.1.2


[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found] ` <42DFA526FC41B1429CE7279EF83C6BDC9E752C-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-11-23  8:19   ` Christian Borntraeger
       [not found]     ` <200711230919.38608.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Borntraeger @ 2007-11-23  8:19 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Avi Kivity, Zhang, Xiantao

Am Freitag, 23. November 2007 schrieb Zhang, Xiantao:
> 
> From: Zhang Xiantao <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Date: Fri, 23 Nov 2007 07:28:35 +0800
> Subject: [PATCH] Add the arg module for kvm_arch_into
> Add the arg module for kvm_arch_into, since some archs may
> need module info.
> Signed-off-by: Zhang Xiantao <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Can you explain what you try to achieve? Would the macro
THIS_MODULE be sufficient as well?

Christian

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]     ` <200711230919.38608.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
@ 2007-11-23  8:25       ` Zhang, Xiantao
       [not found]         ` <42DFA526FC41B1429CE7279EF83C6BDC9E773F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Zhang, Xiantao @ 2007-11-23  8:25 UTC (permalink / raw)
  To: Christian Borntraeger, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Avi Kivity

Christian Borntraeger wrote:
> Am Freitag, 23. November 2007 schrieb Zhang, Xiantao:
>> 
>> From: Zhang Xiantao <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> Date: Fri, 23 Nov 2007 07:28:35 +0800
>> Subject: [PATCH] Add the arg module for kvm_arch_into
>> Add the arg module for kvm_arch_into, since some archs may need
>> module info. Signed-off-by: Zhang Xiantao <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> Can you explain what you try to achieve? Would the macro
> THIS_MODULE be sufficient as well?

No, THIS_MODULE just stands for itself. But for IA64, we need another
module, and it will register some information to kvm module. So, we have
to keep it.
Xiantao

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]         ` <42DFA526FC41B1429CE7279EF83C6BDC9E773F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-11-23  9:34           ` Carsten Otte
       [not found]             ` <47469EAF.8010301-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Otte @ 2007-11-23  9:34 UTC (permalink / raw)
  To: Zhang, Xiantao
  Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity,
	borntrae-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Zhang, Xiantao wrote:
> No, THIS_MODULE just stands for itself. But for IA64, we need another
> module, and it will register some information to kvm module. So, we have
> to keep it.
That answer confuses me. kvm_arch_init() for ia64 will reside in 
kvm.ko just like kvm_init(), right?
So THIS_MODULE will be the same in kvm_arch_init() and kvm_init(). So 
which module are you giving as argument?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]             ` <47469EAF.8010301-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
@ 2007-11-25  3:23               ` Zhang, Xiantao
       [not found]                 ` <42DFA526FC41B1429CE7279EF83C6BDC9E77AA-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Zhang, Xiantao @ 2007-11-25  3:23 UTC (permalink / raw)
  To: carsteno-tA70FqPdS9bQT0dZR+AlfA
  Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	borntrae-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, Avi Kivity

Carsten Otte wrote:
> Zhang, Xiantao wrote:
>> No, THIS_MODULE just stands for itself. But for IA64, we need another
>> module, and it will register some information to kvm module. So, we
>> have to keep it.
> That answer confuses me. kvm_arch_init() for ia64 will reside in
> kvm.ko just like kvm_init(), right?
> So THIS_MODULE will be the same in kvm_arch_init() and kvm_init(). So
> which module are you giving as argument?

Sorry for confusing you. In KVM/IA64 architecture, we have a separate
module called vmm module to handle mmu and cpu virtualization. It is not
related to kvm_arch, and will be relocated by kvm.ko when it is
initilized. So, we have to get some information through its
registeration when it calls kvm_init. Certaninly, this information
should be transftered to kvm_arch_init, and handled by ia64-specific
code. Is it clear now?
Xiantao


>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]                 ` <42DFA526FC41B1429CE7279EF83C6BDC9E77AA-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-11-25  9:43                   ` Avi Kivity
       [not found]                     ` <474943A4.507-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  2007-11-26  9:23                   ` Carsten Otte
  1 sibling, 1 reply; 10+ messages in thread
From: Avi Kivity @ 2007-11-25  9:43 UTC (permalink / raw)
  To: Zhang, Xiantao
  Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	borntrae-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Zhang, Xiantao wrote:
> Carsten Otte wrote:
>   
>> Zhang, Xiantao wrote:
>>     
>>> No, THIS_MODULE just stands for itself. But for IA64, we need another
>>> module, and it will register some information to kvm module. So, we
>>> have to keep it.
>>>       
>> That answer confuses me. kvm_arch_init() for ia64 will reside in
>> kvm.ko just like kvm_init(), right?
>> So THIS_MODULE will be the same in kvm_arch_init() and kvm_init(). So
>> which module are you giving as argument?
>>     
>
> Sorry for confusing you. In KVM/IA64 architecture, we have a separate
> module called vmm module to handle mmu and cpu virtualization. It is not
> related to kvm_arch, and will be relocated by kvm.ko when it is
> initilized. So, we have to get some information through its
> registeration when it calls kvm_init. Certaninly, this information
> should be transftered to kvm_arch_init, and handled by ia64-specific
> code. Is it clear now?
>   

Can it not just call an ia64 specific function?


Is it actually required to be a kernel module? (is it linked with the 
rest of the kernel?)  If not, maybe it can be a .o file instead of a 
.ko, and loaded via the request_firmware() mechanism.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]                     ` <474943A4.507-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-11-25 11:59                       ` Zhang, Xiantao
       [not found]                         ` <42DFA526FC41B1429CE7279EF83C6BDC9E77BF-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Zhang, Xiantao @ 2007-11-25 11:59 UTC (permalink / raw)
  To: Avi Kivity
  Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	borntrae-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> Carsten Otte wrote:
>> 
>>> Zhang, Xiantao wrote:
>>> 
>>>> No, THIS_MODULE just stands for itself. But for IA64, we need
>>>> another module, and it will register some information to kvm
>>>> module. So, we have to keep it. 
>>>> 
>>> That answer confuses me. kvm_arch_init() for ia64 will reside in
>>> kvm.ko just like kvm_init(), right?
>>> So THIS_MODULE will be the same in kvm_arch_init() and kvm_init().
>>> So which module are you giving as argument?
>>> 
>> 
>> Sorry for confusing you. In KVM/IA64 architecture, we have a separate
>> module called vmm module to handle mmu and cpu virtualization. It is
>> not related to kvm_arch, and will be relocated by kvm.ko when it is
>> initilized. So, we have to get some information through its
>> registeration when it calls kvm_init. Certaninly, this information
>> should be transftered to kvm_arch_init, and handled by ia64-specific
>> code. Is it clear now? 
>> 
> 
> Can it not just call an ia64 specific function?
> 
> 
> Is it actually required to be a kernel module? (is it linked with the
> rest of the kernel?)  If not, maybe it can be a .o file instead of a
> .ko, and loaded via the request_firmware() mechanism.

Hi Avi,
	Thanks, But seems it is very hard to implement it through a.o,
because all functions in this part should be relocated to another
separate address space in whole.  If it is implemented as a module(ko),
we can relocate it as a whole. Currenlty, we haven't found an easy
method to handle it, due to  IA64 virtualization architecture's
intrinsic implementation. Anyway, adding one arg in this function
shouldn't impact other architectures. What's your opinion? :)
Xiantao 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]                         ` <42DFA526FC41B1429CE7279EF83C6BDC9E77BF-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-11-25 12:31                           ` Avi Kivity
       [not found]                             ` <47496B2E.2050101-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Avi Kivity @ 2007-11-25 12:31 UTC (permalink / raw)
  To: Zhang, Xiantao
  Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	borntrae-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Zhang, Xiantao wrote:
>>>> That answer confuses me. kvm_arch_init() for ia64 will reside in
>>>> kvm.ko just like kvm_init(), right?
>>>> So THIS_MODULE will be the same in kvm_arch_init() and kvm_init().
>>>> So which module are you giving as argument?
>>>>
>>>>         
>>> Sorry for confusing you. In KVM/IA64 architecture, we have a separate
>>> module called vmm module to handle mmu and cpu virtualization. It is
>>> not related to kvm_arch, and will be relocated by kvm.ko when it is
>>> initilized. So, we have to get some information through its
>>> registeration when it calls kvm_init. Certaninly, this information
>>> should be transftered to kvm_arch_init, and handled by ia64-specific
>>> code. Is it clear now? 
>>>
>>>       
>> Can it not just call an ia64 specific function?
>>
>>
>> Is it actually required to be a kernel module? (is it linked with the
>> rest of the kernel?)  If not, maybe it can be a .o file instead of a
>> .ko, and loaded via the request_firmware() mechanism.
>>     
>
> Hi Avi,
> 	Thanks, But seems it is very hard to implement it through a.o,
> because all functions in this part should be relocated to another
> separate address space in whole.  If it is implemented as a module(ko),
> we can relocate it as a whole. Currenlty, we haven't found an easy
> method to handle it, due to  IA64 virtualization architecture's
> intrinsic implementation. Anyway, adding one arg in this function
> shouldn't impact other architectures. What's your opinion? :)
> Xiantao 
>   

I can't say much about .o vs .ko without further information.  Regarding 
passing the module parameter, you might have your module call some 
function that is only present in the ia64 implementation to register 
itself, instead of calling common code (or, you can have the ia64 code 
call some function in your vmm module to get information from it).


-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]                             ` <47496B2E.2050101-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-11-26  4:24                               ` Zhang, Xiantao
  0 siblings, 0 replies; 10+ messages in thread
From: Zhang, Xiantao @ 2007-11-26  4:24 UTC (permalink / raw)
  To: Avi Kivity
  Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	borntrae-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

Avi Kivity wrote:
> Zhang, Xiantao wrote:

>> 
>> Hi Avi,
>> 	Thanks, But seems it is very hard to implement it through a.o,
>> because all functions in this part should be relocated to another
>> separate address space in whole.  If it is implemented as a
>> module(ko), we can relocate it as a whole. Currenlty, we haven't
>> found an easy method to handle it, due to  IA64 virtualization
>> architecture's intrinsic implementation. Anyway, adding one arg in
>> this function shouldn't impact other architectures. What's your
>> opinion? :) 
>> Xiantao
>> 
> 
> I can't say much about .o vs .ko without further information. 
> Regarding passing the module parameter, you might have your module
> call some function that is only present in the ia64 implementation to
> register itself, instead of calling common code (or, you can have the
> ia64 code call some function in your vmm module to get information
> from it). 

Yes to make it register itself. But if we use current interfaces, I
think it maybe easy,and direct. Otherwise, we have to call kvm_init
first, and call register function. Seems we can integrate them into
kvm_init, and just transfer the module pointer to kvm_init_arch. In this
way, it will simplify the code logic. 
BTW, it doesn't impact other arches, because they can just implement it
as NULL directly. 
Xiantao

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add the arg "module" for kvm_arch_init
       [not found]                 ` <42DFA526FC41B1429CE7279EF83C6BDC9E77AA-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  2007-11-25  9:43                   ` Avi Kivity
@ 2007-11-26  9:23                   ` Carsten Otte
  1 sibling, 0 replies; 10+ messages in thread
From: Carsten Otte @ 2007-11-26  9:23 UTC (permalink / raw)
  To: Zhang, Xiantao
  Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	borntrae-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, Avi Kivity

Zhang, Xiantao wrote:
> Sorry for confusing you. <snip> Is it clear now?
Thanks, yea this makes your intention clear to me. I think what you 
describe is an odd way to initialize both modules, and I'd like to 
suggest to try to come up with the reverse approach where kvm.ko loads 
your other module via request_module() in kvm_arch_init(). But as you 
said, this way does not confict with other archs, therefore I'm fine 
with it.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-11-26  9:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-22 23:32 [PATCH] Add the arg "module" for kvm_arch_init Zhang, Xiantao
     [not found] ` <42DFA526FC41B1429CE7279EF83C6BDC9E752C-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-23  8:19   ` Christian Borntraeger
     [not found]     ` <200711230919.38608.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-11-23  8:25       ` Zhang, Xiantao
     [not found]         ` <42DFA526FC41B1429CE7279EF83C6BDC9E773F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-23  9:34           ` Carsten Otte
     [not found]             ` <47469EAF.8010301-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-11-25  3:23               ` Zhang, Xiantao
     [not found]                 ` <42DFA526FC41B1429CE7279EF83C6BDC9E77AA-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-25  9:43                   ` Avi Kivity
     [not found]                     ` <474943A4.507-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-25 11:59                       ` Zhang, Xiantao
     [not found]                         ` <42DFA526FC41B1429CE7279EF83C6BDC9E77BF-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-25 12:31                           ` Avi Kivity
     [not found]                             ` <47496B2E.2050101-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-26  4:24                               ` Zhang, Xiantao
2007-11-26  9:23                   ` Carsten Otte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox