Patchwork fsdev - broken qemu-system-?

login
register
mail settings
Submitter Aneesh Kumar K.V
Date June 10, 2011, 12:17 p.m.
Message ID <87vcwdev9a.fsf@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/99888/
State New
Headers show

Comments

Aneesh Kumar K.V - June 10, 2011, 12:17 p.m.
On Fri, 10 Jun 2011 12:12:33 +0200, "Edgar E. Iglesias" <edgar.iglesias@gmail.com> wrote:
> At least CRIS, Microblaze and lm32 are broken on latest git. Things fail with
> the following message:
> qemu-system-cris: there is no option group "fsdev"
> 
> Under GDB I see a segfault...
> 
> % gdb --args ~/src/c/qemu/git/build-qemu/cris-softmmu/qemu-system-cris -M axis-dev88 -kernel kimage -serial stdio
> GNU gdb (Gentoo 7.2 p1) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-pc-linux-gnu".
> For bug reporting instructions, please see:
> <http://bugs.gentoo.org/>...
> Reading symbols from /home/edgar/src/c/qemu/git/build-qemu/cris-softmmu/qemu-system-cris...done.
> (gdb) run
> Starting program: /home/edgar/src/c/qemu/git/build-qemu/cris-softmmu/qemu-system-cris -M axis-dev88 -kernel kimage -serial stdio
> [Thread debugging using libthread_db enabled]
> qemu-system-cris: there is no option group "fsdev"
> 
> Program received signal SIGSEGV, Segmentation fault.
> qemu_opts_foreach (list=0x0, func=0x4fd210 <fsdev_init_func>, opaque=0x0, 
>     abort_on_failure=1) at /home/edgar/src/c/qemu/git/qemu/qemu-option.c:969
> 969         QTAILQ_FOREACH(opts, &list->head, next) {
> (gdb) bt
> #0  qemu_opts_foreach (list=0x0, func=0x4fd210 <fsdev_init_func>, opaque=0x0, 
>     abort_on_failure=1) at /home/edgar/src/c/qemu/git/qemu/qemu-option.c:969
> #1  0x00000000004ff05d in main (argc=7, argv=0x7fffffffdc28, 
>     envp=<value optimized out>) at /home/edgar/src/c/qemu/git/qemu/vl.c:3015
> (gdb) q
> A debugging session is active.
> 
>         Inferior 1 [process 1473] will be killed.
> 

Can you try this patch
Edgar Iglesias - June 10, 2011, 1:04 p.m.
On Fri, Jun 10, 2011 at 05:47:05PM +0530, Aneesh Kumar K.V wrote:
> On Fri, 10 Jun 2011 12:12:33 +0200, "Edgar E. Iglesias" <edgar.iglesias@gmail.com> wrote:
> > At least CRIS, Microblaze and lm32 are broken on latest git. Things fail with
> > the following message:
> > qemu-system-cris: there is no option group "fsdev"
> > 
> > Under GDB I see a segfault...
> > 
> > % gdb --args ~/src/c/qemu/git/build-qemu/cris-softmmu/qemu-system-cris -M axis-dev88 -kernel kimage -serial stdio

....

> >     envp=<value optimized out>) at /home/edgar/src/c/qemu/git/qemu/vl.c:3015
> > (gdb) q
> > A debugging session is active.
> > 
> >         Inferior 1 [process 1473] will be killed.
> > 
> 
> Can you try this patch 

It works, thanks!

Cheers

> 
> diff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c
> index 619e163..4e700dd 100644
> --- a/fsdev/qemu-fsdev-dummy.c
> +++ b/fsdev/qemu-fsdev-dummy.c
> @@ -13,8 +13,16 @@
>  #include <stdio.h>
>  #include <string.h>
>  #include "qemu-fsdev.h"
> +#include "qemu-config.h"
>  
>  int qemu_fsdev_add(QemuOpts *opts)
>  {
>      return 0;
>  }
> +
> +static void fsdev_register_config(void)
> +{
> +    qemu_add_opts(&qemu_fsdev_opts);
> +    qemu_add_opts(&qemu_virtfs_opts);
> +}
> +machine_init(fsdev_register_config);

Patch

diff --git a/fsdev/qemu-fsdev-dummy.c b/fsdev/qemu-fsdev-dummy.c
index 619e163..4e700dd 100644
--- a/fsdev/qemu-fsdev-dummy.c
+++ b/fsdev/qemu-fsdev-dummy.c
@@ -13,8 +13,16 @@ 
 #include <stdio.h>
 #include <string.h>
 #include "qemu-fsdev.h"
+#include "qemu-config.h"
 
 int qemu_fsdev_add(QemuOpts *opts)
 {
     return 0;
 }
+
+static void fsdev_register_config(void)
+{
+    qemu_add_opts(&qemu_fsdev_opts);
+    qemu_add_opts(&qemu_virtfs_opts);
+}
+machine_init(fsdev_register_config);