As recently pointed [1], using different object types for the KVM and non-KVM scenarios was a bad idea: "In general different device types should represent guest-visibly different objects, not just implementation differences."
This series converts the base ICP class and the "simple" ICS class to support KVM. This is done through the use of kvm_irqchip_in_kernel(), which allows the compiler to optimize the KVM branches out when CONFIG_KVM isn't set. The removal of the KVM specific object types greatly simplifies the code. Please comment. [1] https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg03580.html -- Greg --- Greg Kurz (10): xics: Explicitely call KVM ICP methods from the common code xics: Handle KVM ICP reset from the common code xics: Handle KVM ICP realize from the common code spapr/irq: Use the base ICP class for KVM xics: Drop the KVM ICP class xics: Explicitely call KVM ICS methods from the common code xics: Handle KVM ICS reset from the "simple" ICS code xics: Handle KVM interrupt presentation from "simple" ICS code spapr/irq: Use the "simple" ICS class for KVM xics: Drop the KVM ICS class hw/intc/xics.c | 76 +++++++++++++++++------------- hw/intc/xics_kvm.c | 120 +++--------------------------------------------- hw/ppc/spapr_irq.c | 28 ++++------- include/hw/ppc/spapr.h | 1 include/hw/ppc/xics.h | 26 ++++------ 5 files changed, 71 insertions(+), 180 deletions(-)