hw/i386/pc: Populate RTC attribute directly
authorBernhard Beschow <shentey@gmail.com>
Sat, 24 Feb 2024 13:58:50 +0000 (14:58 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 27 Feb 2024 08:37:30 +0000 (09:37 +0100)
commit99e1c1137b6f339be1e4b76e243ad7b7c3d3cb8c
treecfa9c310123e7ea548a151d5d5dcc5836bffe572
parent929cfe9885bfe71525df8ef054426196d6596b2c
hw/i386/pc: Populate RTC attribute directly

Both the piix and the q35 machines introduce an rtc_state variable and defer the
initialization of the X86MachineState::rtc attribute to pc_cmos_init(). Resolve
this complication which makes pc_cmos_init() do what it says on the tin.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20240224135851.100361-6-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/i386/pc.c
hw/i386/pc_piix.c
hw/i386/pc_q35.c