qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

intc/openpic: Build openpic only once

Since current_cpu is CPUState it no longer depends on CPUPPCState.

Move ppce500_set_mpic_proxy() to a new hw/ppc/ppc_e500.h because
hw/ppc/ppc.h is too heavily using CPUPPCState and PowerPCCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>

+9 -4
+1 -1
hw/intc/Makefile.objs
··· 11 11 common-obj-$(CONFIG_IOAPIC) += ioapic_common.o 12 12 common-obj-$(CONFIG_ARM_GIC) += arm_gic_common.o 13 13 common-obj-$(CONFIG_ARM_GIC) += arm_gic.o 14 + common-obj-$(CONFIG_OPENPIC) += openpic.o 14 15 15 16 obj-$(CONFIG_APIC) += apic.o apic_common.o 16 17 obj-$(CONFIG_ARM_GIC_KVM) += arm_gic_kvm.o ··· 19 20 obj-$(CONFIG_GRLIB) += grlib_irqmp.o 20 21 obj-$(CONFIG_IOAPIC) += ioapic.o 21 22 obj-$(CONFIG_OMAP) += omap_intc.o 22 - obj-$(CONFIG_OPENPIC) += openpic.o 23 23 obj-$(CONFIG_OPENPIC_KVM) += openpic_kvm.o 24 24 obj-$(CONFIG_SH4) += sh_intc.o
+1 -1
hw/intc/openpic.c
··· 37 37 #include "hw/ppc/mac.h" 38 38 #include "hw/pci/pci.h" 39 39 #include "hw/ppc/openpic.h" 40 + #include "hw/ppc/ppc_e500.h" 40 41 #include "hw/sysbus.h" 41 42 #include "hw/pci/msi.h" 42 43 #include "qemu/bitops.h" 43 - #include "hw/ppc/ppc.h" 44 44 45 45 //#define DEBUG_OPENPIC 46 46
+1
hw/ppc/ppc.c
··· 23 23 */ 24 24 #include "hw/hw.h" 25 25 #include "hw/ppc/ppc.h" 26 + #include "hw/ppc/ppc_e500.h" 26 27 #include "qemu/timer.h" 27 28 #include "sysemu/sysemu.h" 28 29 #include "hw/timer/m48t59.h"
-2
include/hw/ppc/ppc.h
··· 73 73 void ppc970_irq_init (CPUPPCState *env); 74 74 void ppcPOWER7_irq_init (CPUPPCState *env); 75 75 76 - void ppce500_set_mpic_proxy(bool enabled); 77 - 78 76 /* PPC machines for OpenBIOS */ 79 77 enum { 80 78 ARCH_PREP = 0,
+6
include/hw/ppc/ppc_e500.h
··· 1 + #ifndef HW_PPC_E500_H 2 + #define HW_PPC_E500_H 3 + 4 + void ppce500_set_mpic_proxy(bool enabled); 5 + 6 + #endif