qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/5] hw/i386/kvm: Factor i8254_pit_create_try_kvm() out


From: Richard Henderson
Subject: Re: [PATCH 5/5] hw/i386/kvm: Factor i8254_pit_create_try_kvm() out
Date: Wed, 15 Feb 2023 09:02:35 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

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@linaro.org>
---
  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@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]