Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-26 Thread Zhao Liu
On Tue, Feb 20, 2024 at 04:06:14PM +, Peter Maydell wrote: > Date: Tue, 20 Feb 2024 16:06:14 + > From: Peter Maydell > Subject: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from > pc_machine_done() > X-Mailer: git-send-email 2.34.1 > > In the i386 PC ma

Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-21 Thread Philippe Mathieu-Daudé
On 20/2/24 17:06, Peter Maydell wrote: In the i386 PC machine, we want to run the pc_cmos_init_late() function only once the IDE and floppy drive devices have been set up. We currently do this using qemu_register_reset(), and then have the function call qemu_unregister_reset() on itself, so it

Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-20 Thread Bernhard Beschow
Am 20. Februar 2024 16:06:14 UTC schrieb Peter Maydell : >In the i386 PC machine, we want to run the pc_cmos_init_late() >function only once the IDE and floppy drive devices have been set up. >We currently do this using qemu_register_reset(), and then have the >function call

Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-20 Thread Peter Maydell
On Tue, 20 Feb 2024 at 19:31, Richard Henderson wrote: > > On 2/20/24 06:06, Peter Maydell wrote: > > -static void pc_cmos_init_late(void *opaque) > > +static void pc_cmos_init_late(PCMachineState *pcms) > > { > > -pc_cmos_init_late_arg *arg = opaque; > > -MC146818RtcState *s =

Re: [PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-20 Thread Richard Henderson
On 2/20/24 06:06, Peter Maydell wrote: -static void pc_cmos_init_late(void *opaque) +static void pc_cmos_init_late(PCMachineState *pcms) { -pc_cmos_init_late_arg *arg = opaque; -MC146818RtcState *s = arg->rtc_state; +X86MachineState *x86ms = X86_MACHINE(pcms); We've already done

[PATCH 02/10] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-20 Thread Peter Maydell
In the i386 PC machine, we want to run the pc_cmos_init_late() function only once the IDE and floppy drive devices have been set up. We currently do this using qemu_register_reset(), and then have the function call qemu_unregister_reset() on itself, so it runs exactly once. This was an expedient