Message ID | 1344468698-9768-1-git-send-email-jcmvbkbc@gmail.com |
---|---|
State | New |
Headers | show |
Max Filippov <jcmvbkbc@gmail.com> writes: > This fixes the following error: > > $ qemu-system-xtensa -cpu help > Segmentation fault main() attempts to cope with "no machine found", it just screws it up: if (machine->hw_version) { qemu_set_version(machine->hw_version); } [...] if (machine == NULL) { fprintf(stderr, "No machine found.\n"); exit(1); } Probably broken in commit 93bfef4c, cc'ing its author. Of course, I don't mind you picking a default machine for xtensa, if that's what you want.
2012/8/9 Markus Armbruster <armbru@redhat.com>: > Max Filippov <jcmvbkbc@gmail.com> writes: > >> This fixes the following error: >> >> $ qemu-system-xtensa -cpu help >> Segmentation fault > > main() attempts to cope with "no machine found", it just screws it up: > > if (machine->hw_version) { > qemu_set_version(machine->hw_version); > } > [...] > if (machine == NULL) { > fprintf(stderr, "No machine found.\n"); > exit(1); > } > I have sent a trivial patch to fix this bug, but no one replied it. I resend it just now. http://lists.nongnu.org/archive/html/qemu-devel/2012-08/msg01437.html > Probably broken in commit 93bfef4c, cc'ing its author. > > Of course, I don't mind you picking a default machine for xtensa, if > that's what you want. >
Dunrong Huang <riegamaths@gmail.com> writes: > 2012/8/9 Markus Armbruster <armbru@redhat.com>: >> Max Filippov <jcmvbkbc@gmail.com> writes: >> >>> This fixes the following error: >>> >>> $ qemu-system-xtensa -cpu help >>> Segmentation fault >> >> main() attempts to cope with "no machine found", it just screws it up: >> >> if (machine->hw_version) { >> qemu_set_version(machine->hw_version); >> } >> [...] >> if (machine == NULL) { >> fprintf(stderr, "No machine found.\n"); >> exit(1); >> } >> > I have sent > a trivial patch to fix this bug, but no one replied it. > > I resend it just now. > http://lists.nongnu.org/archive/html/qemu-devel/2012-08/msg01437.html Thanks!
On Thu, Aug 9, 2012 at 11:43 AM, Markus Armbruster <armbru@redhat.com> wrote: > Max Filippov <jcmvbkbc@gmail.com> writes: > >> This fixes the following error: >> >> $ qemu-system-xtensa -cpu help >> Segmentation fault > > main() attempts to cope with "no machine found", it just screws it up: > > if (machine->hw_version) { > qemu_set_version(machine->hw_version); > } > [...] > if (machine == NULL) { > fprintf(stderr, "No machine found.\n"); > exit(1); > } > > Probably broken in commit 93bfef4c, cc'ing its author. > > Of course, I don't mind you picking a default machine for xtensa, if > that's what you want. I guess it would make no harm. Also this way it will less likely break next time, and I remember Blue once wondered why xtensa doesn't have the default machine.
Thanks, applied. On Wed, Aug 8, 2012 at 11:31 PM, Max Filippov <jcmvbkbc@gmail.com> wrote: > This fixes the following error: > > $ qemu-system-xtensa -cpu help > Segmentation fault > > Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> > --- > hw/xtensa_sim.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/hw/xtensa_sim.c b/hw/xtensa_sim.c > index ed38bd4..831460b 100644 > --- a/hw/xtensa_sim.c > +++ b/hw/xtensa_sim.c > @@ -111,6 +111,7 @@ static void xtensa_sim_init(ram_addr_t ram_size, > static QEMUMachine xtensa_sim_machine = { > .name = "sim", > .desc = "sim machine (" XTENSA_DEFAULT_CPU_MODEL ")", > + .is_default = true, > .init = xtensa_sim_init, > .max_cpus = 4, > }; > -- > 1.7.7.6 > >
diff --git a/hw/xtensa_sim.c b/hw/xtensa_sim.c index ed38bd4..831460b 100644 --- a/hw/xtensa_sim.c +++ b/hw/xtensa_sim.c @@ -111,6 +111,7 @@ static void xtensa_sim_init(ram_addr_t ram_size, static QEMUMachine xtensa_sim_machine = { .name = "sim", .desc = "sim machine (" XTENSA_DEFAULT_CPU_MODEL ")", + .is_default = true, .init = xtensa_sim_init, .max_cpus = 4, };
This fixes the following error: $ qemu-system-xtensa -cpu help Segmentation fault Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- hw/xtensa_sim.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)