qemu/kvm: extern one function and fix a bug.
PATCH 5/5 qemu/kvm: extern one function and fix a bug.
As host and guest have different fdt path,
E500 can't use kvmppc_fdt_update(),
but to use kvmppc_read_host_proper lonely.
--- target-ppc/kvm_ppc.c | 4 ++-- target-ppc/kvm_ppc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
target-ppc/kvm_ppc.c +2 -2
@@ -22,12 +22,12 @@ static QEMUTimer *kvmppc_timer;static unsigned int kvmppc_timer_rate;#ifdef HAVE_FDT -static int kvmppc_read_host_property (const char *node_path,const char *prop, +int kvmppc_read_host_property (const char *node_path,const char *prop,void *val,size_t len) {char *path;FILE *f; -int ret; +int ret =0 ;int pathlen; pathlen =snprintf (NULL ,0 ,"%s/%s/%s" ,PROC_DEVTREE_PATH , node_path, prop)
target-ppc/kvm_ppc.h +2 -0
@@ -11,5 +11,7 @@void kvmppc_init (void );void kvmppc_fdt_update (void *fdt); +int kvmppc_read_host_property (const char *node_path,const char *prop, +void *val,size_t len);#endif /* __KVM_PPC_H__ */
Signature · 1 line
1.5.4
Quoted 19 lines · Liu Yu
As host and guest have different fdt path,
E500 can't usekvmppc_fdt_update(),
but to usekvmppc_read_host_properlonely.Signed-off-by Liu Yu <[email protected]>--- target-ppc/kvm_ppc.c | 4 ++-- target-ppc/kvm_ppc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)target-ppc/kvm_ppc.c +0
-1@@ -22,12 +22,12 @@ static QEMUTimer *kvmppc_timer;static unsigned int kvmppc_timer_rate;#ifdef HAVE_FDT -static int kvmppc_read_host_property(const char *node_path, const char *prop,
target-ppc/kvm_ppc.c static QEMUTimer *kvmppc_timer; · line 33
Quoted 10 lines
target-ppc/kvm_ppc.c +2
-1+int kvmppc_read_host_property (const char *node_path,const char *prop,void *val,size_t len) {char *path;FILE *f; -int ret; +int ret =0 ;int pathlen; pathlen =snprintf (NULL ,0 ,"%s/%s/%s" ,PROC_DEVTREE_PATH , node_path, prop)
Bug fixes like these should be in a separate patch and sent at the *beginning* of the series, not the end.
target-ppc/kvm_ppc.h line 17
Quoted 12 lines
target-ppc/kvm_ppc.h +2
-0@@ -11,5 +11,7 @@void kvmppc_init (void );void kvmppc_fdt_update (void *fdt); +int kvmppc_read_host_property (const char *node_path,const char *prop, +void *val,size_t len);#endif /* __KVM_PPC_H__ */
So this means your earlier patches don't even build? The point of a patch series is to keep the tree working at every step, so this patch should appear before the e500 patch that uses it.
Similarly, your new PCI code and Makefile changes should all appear in one patch. Right now you define PCI structures in one, PCI emulation in another, and don't even built it until a third...
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Sorry for all these wrong patch organizations.
It won't happen next time.
I submitted them in a hurry for a preliminary review even I knew there still has some problems,
and that's why I didn't send them to qemu list...
Quoted 77 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hollis Blanchard
Sent: Saturday, January 10, 2009 4:39 AM
To: Liu Yu-B13201
Cc: [email protected]
Subject: Re: [PATCH 5/5] qemu/kvm: extern one function and fix a bug.Quoted 15 lines · Liu Yu
As host and guest have different fdt path,
E500 can't usekvmppc_fdt_update(),
but to usekvmppc_read_host_properlonely.Signed-off-by Liu Yu <[email protected]>--- target-ppc/kvm_ppc.c | 4 ++-- target-ppc/kvm_ppc.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)target-ppc/kvm_ppc.c +0
-0target-ppc/kvm_ppc.c static QEMUTimer *kvmppc_timer; · line 25
Quoted 4 lines
target-ppc/kvm_ppc.c +0
-1@@ -22,12 +22,12 @@ static QEMUTimer *kvmppc_timer;static unsigned int kvmppc_timer_rate;#ifdef HAVE_FDT -static int kvmppc_read_host_property(const char
*node_path, const char *prop,target-ppc/kvm_ppc.c static QEMUTimer *kvmppc_timer; · line 25
Quoted 1 line
target-ppc/kvm_ppc.c +1
-0+int kvmppc_read_host_property(const char *node_path, constchar *prop,
target-ppc/kvm_ppc.c static QEMUTimer *kvmppc_timer;
Quoted 9 lines
target-ppc/kvm_ppc.c +1
-1void *val, size_t len) { char *path;FILE *f; -int ret; +int ret =0 ;int pathlen; pathlen = snprintf(NULL, 0, "%s/%s/%s",
PROC_DEVTREE_PATH,node_path, prop)Bug fixes like these should be in a separate patch and sent at the *beginning* of the series, not the end.
target-ppc/kvm_ppc.h line 14
Quoted 9 lines
target-ppc/kvm_ppc.h +1
-0@@ -11,5 +11,7 @@void kvmppc_init (void );void kvmppc_fdt_update (void *fdt); +int kvmppc_read_host_property(const char *node_path, constchar *prop,
target-ppc/kvm_ppc.h line 17
Quoted 3 lines
target-ppc/kvm_ppc.h +1
-0+ void *val, size_t len);#endif /* __KVM_PPC_H__ */ So this means your earlier patches don't even build? The point of a patch series is to keep the tree working at every step, so this patch should appear before the e500 patch that uses it.
Similarly, your new PCI code and
Makefilechanges should all appear in one patch. Right now you define PCI structures in one, PCI emulation in
another, and don't even built it until a third...Signature · 7 lines
Hollis Blanchard IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html