On 2/15/23 07:43, Philippe Mathieu-Daudé wrote:
Factor a new i8254_pit_create_try_kvm() helper out of the following patter:
pattern
if (kvm_pit_in_kernel()) { kvm_pit_init(...); } else } i8254_pit_create(...); } (adding a stub for non-KVM builds). Since kvm_pit_init() is only used once, un-inline it and remove the now unused headers from "hw/timer/i8254.h". Signed-off-by: Philippe Mathieu-Daudé<philmd@xxxxxxxxxx> --- hw/i386/kvm/i8254.c | 18 ++++++++++++++++++ hw/i386/microvm.c | 6 +----- hw/i386/pc.c | 7 ++----- include/hw/timer/i8254.h | 22 ++++++---------------- target/i386/kvm/kvm-stub.c | 6 ++++++ 5 files changed, 33 insertions(+), 26 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@xxxxxxxxxx> r~