Skip to contentSkip to conversation

target-xtensa: make 'sim' to be the default machine

PATCH Applied Max Filippov 4 participants 6 messages Aug 8, 2012 – Aug 9, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-xtensa: make 'sim' to be the default machine

This fixes the following error:

    $ qemu-system-xtensa -cpu help
    Segmentation fault
---
 hw/xtensa_sim.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/xtensa_sim.c +1 -0
index ed38bd4..831460b 100644
@@ -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,
 };
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 4 lines · Max Filippov

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.

#2 lore raw

2012/8/9 Markus Armbruster <[email protected]>:

Quoted 9 lines
Quoted 4 lines · Max Filippov

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:

Quoted 9 lines
    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

Quoted 5 lines

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.

Signature · 3 lines
Best Regards,

Dunrong Huang
#3 lore raw
Quoted 19 lines · Dunrong Huang

2012/8/9 Markus Armbruster <[email protected]>:

Quoted 9 lines
Quoted 4 lines · Max Filippov

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:

Quoted 9 lines
    if (machine->hw_version) {
        qemu_set_version(machine->hw_version);
    }
[...]
    if (machine == NULL) {
        fprintf(stderr, "No machine found.\n");
        exit(1);
    }
Quoted 5 lines

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!

#4 lore raw
In reply to Markus Armbruster
Quoted 18 lines · Markus Armbruster
Quoted 4 lines · Max Filippov

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);
    }
Quoted 4 lines

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.

Signature · 2 lines
Thanks.
-- Max
Applied
#5 lore raw
In reply to Max Filippov

Thanks, applied.

Quoted 26 lines · Max Filippov

This fixes the following error:

    $ qemu-system-xtensa -cpu help
    Segmentation fault
---
 hw/xtensa_sim.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/xtensa_sim.c +1 -1
index ed38bd4..831460b 100644
@@ -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