* powerpc kvm-userspace build fixes
@ 2008-12-02 15:37 Hollis Blanchard
[not found] ` <1228232229-14360-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Hollis Blanchard @ 2008-12-02 15:37 UTC (permalink / raw)
To: avi; +Cc: kvm, kvm-ppc
These patches fix the kvm-userspace qemu build after a recent merge with
upstream qemu.
I'm also seeing a build dependency issue with dyngen-opc.h that I don't see
upstream. I haven't sorted that out yet, but "make qemu/ppcemb-softmmu/dyngen-opc.h" first works around the problem.
-Hollis
^ permalink raw reply [flat|nested] 7+ messages in thread[parent not found: <1228232229-14360-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* [PATCH 1/2] qemu: ppc: fix build after qemu upstream changes [not found] ` <1228232229-14360-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2008-12-02 15:37 ` Hollis Blanchard 2008-12-02 15:37 ` [PATCH 2/2] qemu: ppc: fix build warnings Hollis Blanchard 2008-12-03 11:04 ` powerpc kvm-userspace build fixes Avi Kivity 2008-12-03 11:05 ` Avi Kivity 2 siblings, 1 reply; 7+ messages in thread From: Hollis Blanchard @ 2008-12-02 15:37 UTC (permalink / raw) To: avi-H+wXaHxf7aLQT0dZR+AlfA Cc: kvm-u79uwXL29TY76Z2rM5mHXA, kvm-ppc-u79uwXL29TY76Z2rM5mHXA, Hollis Blanchard Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> --- qemu/hw/ppc440_bamboo.c | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c index bf42245..79e4ea8 100644 --- a/qemu/hw/ppc440_bamboo.c +++ b/qemu/hw/ppc440_bamboo.c @@ -38,13 +38,14 @@ void bamboo_init(ram_addr_t ram_size, int vga_ram_size, qemu_irq *pic; ppc4xx_pci_t *pci; CPUState *env; - uint64_t ep=0; - uint64_t la=0; - int is_linux=1; /* Will assume allways is Linux for now */ - target_long kernel_size=0; - target_ulong initrd_base=0; - target_long initrd_size=0; - target_ulong dt_base=0; + uint64_t elf_entry; + uint64_t elf_lowaddr; + target_ulong entry = 0; + target_ulong loadaddr = 0; + target_long kernel_size = 0; + target_ulong initrd_base = 0; + target_long initrd_size = 0; + target_ulong dt_base = 0; void *fdt; int ret; int ram_stick_sizes[] = {256<<20, 128<<20, 64<<20, @@ -105,20 +106,24 @@ void bamboo_init(ram_addr_t ram_size, int vga_ram_size, /* load kernel with uboot loader */ printf("%s: load kernel\n", __func__); - ret = load_uimage(kernel_filename, &ep, &la, &kernel_size, &is_linux); - if (ret < 0) - ret = load_elf(kernel_filename, 0, &ep, &la, NULL); - - if (ret < 0) { + kernel_size = load_uimage(kernel_filename, &entry, &loadaddr, NULL); + if (kernel_size < 0) { + kernel_size = load_elf(kernel_filename, 0, &elf_entry, &elf_lowaddr, + NULL); + entry = elf_entry; + loadaddr = elf_lowaddr; + } + + if (kernel_size < 0) { fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename); exit(1); } - printf("kernel is at guest address: 0x%lx\n", (unsigned long)la); + printf("kernel is at guest address: 0x%lx\n", (unsigned long)loadaddr); /* load initrd */ if (initrd_filename) { - initrd_base = kernel_size + la; + initrd_base = kernel_size + loadaddr; printf("%s: load initrd\n", __func__); initrd_size = load_image(initrd_filename, phys_ram_base + initrd_base); @@ -156,7 +161,7 @@ void bamboo_init(ram_addr_t ram_size, int vga_ram_size, if (initrd_base) dt_base = initrd_base + initrd_size; else - dt_base = kernel_size + la; + dt_base = kernel_size + loadaddr; fdt = load_device_tree(buf, (unsigned long)(phys_ram_base + dt_base)); if (fdt == NULL) { @@ -188,7 +193,7 @@ void bamboo_init(ram_addr_t ram_size, int vga_ram_size, /* location of device tree in register */ env->gpr[3] = dt_base; #endif - env->nip = ep; + env->nip = entry; } if (pci) { -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] qemu: ppc: fix build warnings 2008-12-02 15:37 ` [PATCH 1/2] qemu: ppc: fix build after qemu upstream changes Hollis Blanchard @ 2008-12-02 15:37 ` Hollis Blanchard 0 siblings, 0 replies; 7+ messages in thread From: Hollis Blanchard @ 2008-12-02 15:37 UTC (permalink / raw) To: avi; +Cc: kvm, kvm-ppc, Hollis Blanchard Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> --- qemu/hw/device_tree.c | 14 +++++++------- qemu/hw/device_tree.h | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qemu/hw/device_tree.c b/qemu/hw/device_tree.c index e73129d..2621ff1 100644 --- a/qemu/hw/device_tree.c +++ b/qemu/hw/device_tree.c @@ -31,7 +31,7 @@ /* This function reads device-tree property files that are of * a single cell size */ -uint32_t read_proc_dt_prop_cell(char *path_in_device_tree) +uint32_t read_proc_dt_prop_cell(const char *path_in_device_tree) { char *buf = NULL; int i; @@ -65,7 +65,7 @@ uint32_t read_proc_dt_prop_cell(char *path_in_device_tree) #ifdef CONFIG_LIBFDT /* support functions */ -static int get_offset_of_node(void *fdt, char *node_path) +static int get_offset_of_node(void *fdt, const char *node_path) { int node_offset; node_offset = fdt_path_offset(fdt, node_path); @@ -78,7 +78,7 @@ static int get_offset_of_node(void *fdt, char *node_path) } /* public functions */ -void *load_device_tree(char *filename_path, unsigned long load_addr) +void *load_device_tree(const char *filename_path, unsigned long load_addr) { int dt_file_size; int dt_file_load_size; @@ -134,7 +134,7 @@ fail: return NULL; } -void dump_device_tree_to_file(void *fdt, char *filename) +void dump_device_tree_to_file(void *fdt, const char *filename) { int fd; fd = open(filename, O_RDWR|O_CREAT, O_RDWR); @@ -148,7 +148,7 @@ void dump_device_tree_to_file(void *fdt, char *filename) close(fd); } -void dt_cell(void *fdt, char *node_path, char *property, +void dt_cell(void *fdt, const char *node_path, const char *property, uint32_t val) { int offset; @@ -163,7 +163,7 @@ void dt_cell(void *fdt, char *node_path, char *property, } /* This function is to manipulate a cell with multiple values */ -void dt_cell_multi(void *fdt, char *node_path, char *property, +void dt_cell_multi(void *fdt, const char *node_path, const char *property, uint32_t *val_array, int size) { int offset; @@ -177,7 +177,7 @@ void dt_cell_multi(void *fdt, char *node_path, char *property, } } -void dt_string(void *fdt, char *node_path, char *property, +void dt_string(void *fdt, const char *node_path, const char *property, char *string) { int offset; diff --git a/qemu/hw/device_tree.h b/qemu/hw/device_tree.h index 05a81ef..a311309 100644 --- a/qemu/hw/device_tree.h +++ b/qemu/hw/device_tree.h @@ -11,16 +11,16 @@ */ /* device-tree proc support functions */ -uint32_t read_proc_dt_prop_cell(char *path_in_device_tree); +uint32_t read_proc_dt_prop_cell(const char *path_in_device_tree); #ifdef CONFIG_LIBFDT /* device tree functions */ -void *load_device_tree(char *filename_path, target_ulong load_addr); -void dump_device_tree_to_file(void *fdt, char *filename); -void dt_cell(void *fdt, char *node_path, char *property, +void *load_device_tree(const char *filename_path, target_ulong load_addr); +void dump_device_tree_to_file(void *fdt, const char *filename); +void dt_cell(void *fdt, const char *node_path, const char *property, uint32_t val); -void dt_cell_multi(void *fdt, char *node_path, char *property, +void dt_cell_multi(void *fdt, const char *node_path, const char *property, uint32_t *val_array, int size); -void dt_string(void *fdt, char *node_path, char *property, +void dt_string(void *fdt, const char *node_path, const char *property, char *string); #endif -- 1.5.6.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: powerpc kvm-userspace build fixes [not found] ` <1228232229-14360-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 2008-12-02 15:37 ` [PATCH 1/2] qemu: ppc: fix build after qemu upstream changes Hollis Blanchard @ 2008-12-03 11:04 ` Avi Kivity 2008-12-03 11:05 ` Avi Kivity 2 siblings, 0 replies; 7+ messages in thread From: Avi Kivity @ 2008-12-03 11:04 UTC (permalink / raw) To: Hollis Blanchard Cc: kvm-u79uwXL29TY76Z2rM5mHXA, kvm-ppc-u79uwXL29TY76Z2rM5mHXA Hollis Blanchard wrote: > These patches fix the kvm-userspace qemu build after a recent merge with > upstream qemu. > Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: powerpc kvm-userspace build fixes [not found] ` <1228232229-14360-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 2008-12-02 15:37 ` [PATCH 1/2] qemu: ppc: fix build after qemu upstream changes Hollis Blanchard 2008-12-03 11:04 ` powerpc kvm-userspace build fixes Avi Kivity @ 2008-12-03 11:05 ` Avi Kivity 2008-12-03 19:03 ` Hollis Blanchard 2 siblings, 1 reply; 7+ messages in thread From: Avi Kivity @ 2008-12-03 11:05 UTC (permalink / raw) To: Hollis Blanchard Cc: kvm-u79uwXL29TY76Z2rM5mHXA, kvm-ppc-u79uwXL29TY76Z2rM5mHXA Hollis Blanchard wrote: > I'm also seeing a build dependency issue with dyngen-opc.h that I don't see > upstream. I haven't sorted that out yet, but "make qemu/ppcemb-softmmu/dyngen-opc.h" first works around the problem. > Doesn't for me... -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: powerpc kvm-userspace build fixes 2008-12-03 11:05 ` Avi Kivity @ 2008-12-03 19:03 ` Hollis Blanchard 2008-12-04 2:12 ` Zhang, Xiantao 0 siblings, 1 reply; 7+ messages in thread From: Hollis Blanchard @ 2008-12-03 19:03 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm, kvm-ppc, kvm-ia64 On Wed, 2008-12-03 at 13:05 +0200, Avi Kivity wrote: > Hollis Blanchard wrote: > > I'm also seeing a build dependency issue with dyngen-opc.h that I don't see > > upstream. I haven't sorted that out yet, but "make qemu/ppcemb-softmmu/dyngen-opc.h" first works around the problem. > > > > Doesn't for me... I'll send the fix in a separate mail. Looks like we missed the addition of a dependency from upstream, which we probably didn't get because it conflicted with the --disable-cpu-emulation patch in kvm-userspace. PowerPC stopped using that once upstream fixed PowerPC host builds. If IA64 doesn't use it (and I don't think they do), we can probably drop that patch completely, which should make future merges a little easier... IA64 people? -- Hollis Blanchard IBM Linux Technology Center ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: powerpc kvm-userspace build fixes 2008-12-03 19:03 ` Hollis Blanchard @ 2008-12-04 2:12 ` Zhang, Xiantao 0 siblings, 0 replies; 7+ messages in thread From: Zhang, Xiantao @ 2008-12-04 2:12 UTC (permalink / raw) To: Hollis Blanchard, Avi Kivity, Jes Sorensen Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm-ia64 Hollis Blanchard wrote: > On Wed, 2008-12-03 at 13:05 +0200, Avi Kivity wrote: >> Hollis Blanchard wrote: >>> I'm also seeing a build dependency issue with dyngen-opc.h that I >>> don't see >>> upstream. I haven't sorted that out yet, but "make >>> qemu/ppcemb-softmmu/dyngen-opc.h" first works around the problem. >>> >> >> Doesn't for me... > > I'll send the fix in a separate mail. > > Looks like we missed the addition of a dependency from upstream, which > we probably didn't get because it conflicted with the > --disable-cpu-emulation patch in kvm-userspace. > > PowerPC stopped using that once upstream fixed PowerPC host builds. If > IA64 doesn't use it (and I don't think they do), we can probably drop > that patch completely, which should make future merges a little > easier... > > IA64 people? IA64 still needs it since the upstream doesn't include tcg fixes. :( Xiantao ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-12-04 2:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 15:37 powerpc kvm-userspace build fixes Hollis Blanchard
[not found] ` <1228232229-14360-1-git-send-email-hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-02 15:37 ` [PATCH 1/2] qemu: ppc: fix build after qemu upstream changes Hollis Blanchard
2008-12-02 15:37 ` [PATCH 2/2] qemu: ppc: fix build warnings Hollis Blanchard
2008-12-03 11:04 ` powerpc kvm-userspace build fixes Avi Kivity
2008-12-03 11:05 ` Avi Kivity
2008-12-03 19:03 ` Hollis Blanchard
2008-12-04 2:12 ` Zhang, Xiantao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox