i386/fw_cfg: move hpet_cfg definition to hpet.c
authorZhao Liu <zhao1.liu@intel.com>
Mon, 10 Feb 2025 03:00:42 +0000 (11:00 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 13 Feb 2025 11:51:32 +0000 (12:51 +0100)
commitf32352ff9ea1ce3bdf432e29a587ccf84b1ec57a
tree860ae31003b8306f0c3a09c4da20c82085aba9e8
parent7630ca2a701a0f79728996e660cda06518c97b9b
i386/fw_cfg: move hpet_cfg definition to hpet.c

HPET device needs to access and update hpet_cfg variable, but now it is
defined in hw/i386/fw_cfg.c and Rust code can't access it.

Move hpet_cfg definition to hpet.c (and rename it to hpet_fw_cfg). This
allows Rust HPET device implements its own global hpet_fw_cfg variable,
and will further reduce the use of unsafe C code access and calls in the
Rust HPET implementation.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250210030051.2562726-2-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/fw_cfg.c
hw/timer/hpet.c
include/hw/timer/hpet.h