[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 00/35] MIPS patches for 2021-01-03
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PULL 00/35] MIPS patches for 2021-01-03 |
Date: |
Mon, 4 Jan 2021 19:30:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 1/4/21 7:24 PM, Philippe Mathieu-Daudé wrote:
> On 1/4/21 6:39 PM, Philippe Mathieu-Daudé wrote:
>> On 1/4/21 4:01 PM, Peter Maydell wrote:
>>> On Mon, 4 Jan 2021 at 13:59, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>>> I don't have access to OSX host. I'll see to install an aarch32 chroot and
>>>> keep testing (not sure what can differ from an i386 guest).
>>>> If I can't find anything I'll resend the same series without the Loongson-3
>>>> machine, which is the single part adding QOM objects.
>
> OK I guess I found the problem, we have:
>
> struct LoongsonMachineState {
> MachineState parent_obj;
> MemoryRegion *pio_alias;
> MemoryRegion *mmio_alias;
> MemoryRegion *ecam_alias;
> };
>
> Then:
>
> static inline void loongson3_virt_devices_init(MachineState *machine,
> DeviceState *pic)
> {
> int i;
> qemu_irq irq;
> PCIBus *pci_bus;
> DeviceState *dev;
> MemoryRegion *mmio_reg, *ecam_reg;
> LoongsonMachineState *s = LOONGSON_MACHINE(machine);
>
> LoongsonMachineState is never allocated... Accessing its MR lead
> to BOF.
I'm going to respin with this (pass 32-bit tests):
-- >8 --
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index e3723d3dd0f..d4a82fa5367 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -612,8 +612,10 @@ static void mips_loongson3_virt_init(MachineState
*machine)
loongson3_virt_devices_init(machine, liointc);
}
-static void mips_loongson3_virt_machine_init(MachineClass *mc)
+static void loongson3v_machine_class_init(ObjectClass *oc, void *data)
{
+ MachineClass *mc = MACHINE_CLASS(oc);
+
mc->desc = "Loongson-3 Virtualization Platform";
mc->init = mips_loongson3_virt_init;
mc->block_default_type = IF_IDE;
@@ -624,4 +626,13 @@ static void
mips_loongson3_virt_machine_init(MachineClass *mc)
mc->minimum_page_bits = 14;
}
-DEFINE_MACHINE("loongson3-virt", mips_loongson3_virt_machine_init)
+static const TypeInfo loongson3_machine_types[] = {
+ {
+ .name = TYPE_LOONGSON_MACHINE,
+ .parent = TYPE_MACHINE,
+ .instance_size = sizeof(LoongsonMachineState),
+ .class_init = loongson3v_machine_class_init,
+ }
+};
+
+DEFINE_TYPES(loongson3_machine_types)
---
Thanks Peter for catching this (we really need a 32-bit host runner
on GitLab...).
Phil.
- [PULL 33/35] hw/mips/fuloong2e: Remove unused env entry, (continued)
- [PULL 33/35] hw/mips/fuloong2e: Remove unused env entry, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 34/35] hw/mips/fuloong2e: Correct cpuclock in PROM environment, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 35/35] tests/acceptance: Test boot_linux_console for fuloong2e, Philippe Mathieu-Daudé, 2021/01/03
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Peter Maydell, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Peter Maydell, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Peter Maydell, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03,
Philippe Mathieu-Daudé <=
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Huacai Chen, 2021/01/04
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/05
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/05
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Peter Maydell, 2021/01/05
- Re: [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/05