On Wed, Dec 05, 2018 at 05:50:23PM +0800, Hongbo Zhang wrote: > > > +static > > > +void sbsa_ref_machine_done(Notifier *notifier, void *data) > > > +{ > > > + VirtMachineState *vms = container_of(notifier, VirtMachineState, > > > + machine_done); > > > + ARMCPU *cpu = ARM_CPU(first_cpu); > > > + struct arm_boot_info *info = &vms->bootinfo; > > > + AddressSpace *as = arm_boot_address_space(cpu, info); > > > + > > > + if (arm_load_dtb(info->dtb_start, info, info->dtb_limit, as) < 0) { > > > + exit(1); > > > + } > > > +} > > > > The virt board needs a machine-done notifier because it has > > to add extra things to the DTB here. You don't, so you don't > > need one. Don't set bootinfo.skip_dtb_autoload to true, and > > then the boot.c code will do the arm_load_dtb() call for you. > > > After test and check, I think we still need this machine_done callback > to call arm_load_dtb(). > If only kernel loaded via -kernel but without any firmware, it should > work to let arm_load_kernel() call the arm_load_dtb(), while in our > case, we have have firmware loaded but no kernel, so the > arm_load_kernel() returns before calling arm_load_dtb(), that is, > firmware runs and there is no chance to call arm_load_dtb(), then we > get error message and qemu quits. > Moving arm_load_dtb() to earlier place in arm_load_kernel() cannot fix > this issue either.
I don't see the value in using -kernel on the SBSA machine. If it causes complexity, can we drop the functionality? Regards, Leif