diff options
Diffstat (limited to 'hw')
139 files changed, 211 insertions, 181 deletions
diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 6a2f452141..1ffd155c11 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -491,6 +491,12 @@ void acpi_pm_tmr_update(ACPIREGS *ar, bool enable) } } +static inline int64_t acpi_pm_tmr_get_clock(void) +{ + return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), PM_TIMER_FREQUENCY, + NANOSECONDS_PER_SECOND); +} + void acpi_pm_tmr_calc_overflow_time(ACPIREGS *ar) { int64_t d = acpi_pm_tmr_get_clock(); diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 9531340e56..fb925dccae 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -378,17 +378,19 @@ struct NvdimmDsmIn { uint32_t function; /* the remaining size in the page is used by arg3. */ union { - uint8_t arg3[0]; + uint8_t arg3[4084]; }; } QEMU_PACKED; typedef struct NvdimmDsmIn NvdimmDsmIn; +QEMU_BUILD_BUG_ON(sizeof(NvdimmDsmIn) != 4096); struct NvdimmDsmOut { /* the size of buffer filled by QEMU. */ uint32_t len; - uint8_t data[0]; + uint8_t data[4092]; } QEMU_PACKED; typedef struct NvdimmDsmOut NvdimmDsmOut; +QEMU_BUILD_BUG_ON(sizeof(NvdimmDsmOut) != 4096); struct NvdimmDsmFunc0Out { /* the size of buffer filled by QEMU. */ @@ -424,8 +426,8 @@ nvdimm_dsm_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) * can change its content while we are doing DSM emulation. Avoid * this by copying DSM memory to QEMU local memory. */ - in = g_malloc(TARGET_PAGE_SIZE); - cpu_physical_memory_read(dsm_mem_addr, in, TARGET_PAGE_SIZE); + in = g_new(NvdimmDsmIn, 1); + cpu_physical_memory_read(dsm_mem_addr, in, sizeof(*in)); le32_to_cpus(&in->revision); le32_to_cpus(&in->function); @@ -475,7 +477,7 @@ void nvdimm_init_acpi_state(AcpiNVDIMMState *state, MemoryRegion *io, memory_region_add_subregion(io, NVDIMM_ACPI_IO_BASE, &state->io_mr); state->dsm_mem = g_array_new(false, true /* clear */, 1); - acpi_data_push(state->dsm_mem, TARGET_PAGE_SIZE); + acpi_data_push(state->dsm_mem, sizeof(NvdimmDsmIn)); fw_cfg_add_file(fw_cfg, NVDIMM_DSM_MEM_FILE, state->dsm_mem->data, state->dsm_mem->len); } @@ -608,7 +610,7 @@ static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets, aml_append(dev, aml_operation_region("NPIO", AML_SYSTEM_IO, aml_int(NVDIMM_ACPI_IO_BASE), NVDIMM_ACPI_IO_LEN)); aml_append(dev, aml_operation_region("NRAM", AML_SYSTEM_MEMORY, - aml_name(NVDIMM_ACPI_MEM_ADDR), TARGET_PAGE_SIZE)); + aml_name(NVDIMM_ACPI_MEM_ADDR), sizeof(NvdimmDsmIn))); /* * DSM notifier: @@ -642,8 +644,7 @@ static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets, aml_append(field, aml_named_field("FUNC", sizeof(typeof_field(NvdimmDsmIn, function)) * BITS_PER_BYTE)); aml_append(field, aml_named_field("ARG3", - (TARGET_PAGE_SIZE - offsetof(NvdimmDsmIn, arg3)) * - BITS_PER_BYTE)); + (sizeof(NvdimmDsmIn) - offsetof(NvdimmDsmIn, arg3)) * BITS_PER_BYTE)); aml_append(dev, field); /* @@ -659,8 +660,7 @@ static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets, aml_append(field, aml_named_field("RLEN", sizeof(typeof_field(NvdimmDsmOut, len)) * BITS_PER_BYTE)); aml_append(field, aml_named_field("ODAT", - (TARGET_PAGE_SIZE - offsetof(NvdimmDsmOut, data)) * - BITS_PER_BYTE)); + (sizeof(NvdimmDsmOut) - offsetof(NvdimmDsmOut, data)) * BITS_PER_BYTE)); aml_append(dev, field); nvdimm_build_common_dsm(dev); @@ -678,7 +678,7 @@ static void nvdimm_build_ssdt(GSList *device_list, GArray *table_offsets, mem_addr_offset = build_append_named_dword(table_data, NVDIMM_ACPI_MEM_ADDR); - bios_linker_loader_alloc(linker, NVDIMM_DSM_MEM_FILE, TARGET_PAGE_SIZE, + bios_linker_loader_alloc(linker, NVDIMM_DSM_MEM_FILE, sizeof(NvdimmDsmIn), false /* high memory */); bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, NVDIMM_DSM_MEM_FILE, table_data, diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 16abdf1624..b3e3bb306a 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -39,6 +39,7 @@ #include "hw/acpi/memory_hotplug.h" #include "hw/acpi/acpi_dev_interface.h" #include "hw/xen/xen.h" +#include "qom/cpu.h" //#define DEBUG diff --git a/hw/alpha/alpha_sys.h b/hw/alpha/alpha_sys.h index e11025b4be..fcaeb2b7aa 100644 --- a/hw/alpha/alpha_sys.h +++ b/hw/alpha/alpha_sys.h @@ -3,6 +3,7 @@ #ifndef HW_ALPHA_H #define HW_ALPHA_H 1 +#include "target-alpha/cpu-qom.h" #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" #include "hw/ide.h" diff --git a/hw/alpha/pci.c b/hw/alpha/pci.c index 5baa0eaf15..8dde637bfe 100644 --- a/hw/alpha/pci.c +++ b/hw/alpha/pci.c @@ -8,7 +8,6 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#include "cpu.h" #include "alpha_sys.h" #include "qemu/log.h" #include "sysemu/sysemu.h" diff --git a/hw/arm/ast2400.c b/hw/arm/ast2400.c index 03f993863b..5510a8a374 100644 --- a/hw/arm/ast2400.c +++ b/hw/arm/ast2400.c @@ -17,6 +17,7 @@ #include "exec/address-spaces.h" #include "hw/arm/ast2400.h" #include "hw/char/serial.h" +#include "qemu/log.h" #define AST2400_UART_5_BASE 0x00184000 #define AST2400_IOMEM_SIZE 0x00200000 diff --git a/hw/arm/collie.c b/hw/arm/collie.c index 8bb308a42e..2e69531287 100644 --- a/hw/arm/collie.c +++ b/hw/arm/collie.c @@ -18,6 +18,7 @@ #include "hw/block/flash.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h" +#include "qom/cpu.h" static struct arm_boot_info collie_binfo = { .loader_start = SA_SDCS0, diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index c7068c0d38..d4eb141764 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -20,7 +20,9 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "cpu.h" #include "qemu/cutils.h" +#include "qemu/bswap.h" #include "sysemu/sysemu.h" #include "hw/arm/omap.h" #include "hw/arm/arm.h" @@ -35,6 +37,7 @@ #include "hw/loader.h" #include "sysemu/block-backend.h" #include "hw/sysbus.h" +#include "qemu/log.h" #include "exec/address-spaces.h" /* Nokia N8x0 support */ diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c index 89ebd92b93..a51d960510 100644 --- a/hw/arm/palmetto-bmc.c +++ b/hw/arm/palmetto-bmc.c @@ -17,6 +17,7 @@ #include "hw/arm/arm.h" #include "hw/arm/ast2400.h" #include "hw/boards.h" +#include "qemu/log.h" static struct arm_boot_info palmetto_bmc_binfo = { .loader_start = AST2400_SDRAM_BASE, diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c index 67e7e70943..576a8eb91f 100644 --- a/hw/arm/pxa2xx_gpio.c +++ b/hw/arm/pxa2xx_gpio.c @@ -8,9 +8,11 @@ */ #include "qemu/osdep.h" +#include "cpu.h" #include "hw/hw.h" #include "hw/sysbus.h" #include "hw/arm/pxa.h" +#include "qemu/log.h" #define PXA2XX_GPIO_BANKS 4 diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index f90b9fd190..44591716fe 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -17,6 +17,7 @@ #include "hw/i2c/i2c.h" #include "net/net.h" #include "hw/boards.h" +#include "qemu/log.h" #include "exec/address-spaces.h" #include "sysemu/sysemu.h" diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index a5ea1e2370..9c1dafbb19 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -25,7 +25,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu-common.h" -#include "cpu.h" #include "hw/arm/arm.h" #include "exec/address-spaces.h" #include "hw/arm/stm32f205_soc.h" diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 3bc8a98150..f1b2c6c966 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -38,6 +38,7 @@ #include "sysemu/sysemu.h" #include "hw/ssi/ssi.h" #include "qemu/cutils.h" +#include "qemu/log.h" //#define DEBUG diff --git a/hw/arm/strongarm.h b/hw/arm/strongarm.h index 2893f94445..cd32bbdb0e 100644 --- a/hw/arm/strongarm.h +++ b/hw/arm/strongarm.h @@ -2,6 +2,7 @@ #define _STRONGARM_H #include "exec/memory.h" +#include "target-arm/cpu-qom.h" #define SA_CS0 0x00000000 #define SA_CS1 0x08000000 diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-ep108.c index 5f480182b2..40f7cc1425 100644 --- a/hw/arm/xlnx-ep108.c +++ b/hw/arm/xlnx-ep108.c @@ -23,6 +23,7 @@ #include "hw/boards.h" #include "qemu/error-report.h" #include "exec/address-spaces.h" +#include "qemu/log.h" typedef struct XlnxEP108 { XlnxZynqMPState soc; diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c index 4717bc9b9c..6e9c104011 100644 --- a/hw/audio/pl041.c +++ b/hw/audio/pl041.c @@ -22,6 +22,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "qemu/log.h" #include "pl041.h" #include "lm4549.h" diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c index d388f13e9d..57ad5012a7 100644 --- a/hw/block/hd-geometry.c +++ b/hw/block/hd-geometry.c @@ -32,6 +32,7 @@ #include "qemu/osdep.h" #include "sysemu/block-backend.h" +#include "qemu/bswap.h" #include "hw/block/block.h" #include "trace.h" diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 5d308637df..4c856f5278 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -27,6 +27,7 @@ #include "sysemu/blockdev.h" #include "hw/ssi/ssi.h" #include "qemu/bitops.h" +#include "qemu/log.h" #ifndef M25P80_ERR_DEBUG #define M25P80_ERR_DEBUG 0 diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 3a1f85d279..31585e3aa1 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -45,6 +45,7 @@ #include "qemu/bitops.h" #include "exec/address-spaces.h" #include "qemu/host-utils.h" +#include "qemu/log.h" #include "hw/sysbus.h" #include "sysemu/sysemu.h" diff --git a/hw/bt/hci-csr.c b/hw/bt/hci-csr.c index 2e970b6561..e6b8998253 100644 --- a/hw/bt/hci-csr.c +++ b/hw/bt/hci-csr.c @@ -22,6 +22,7 @@ #include "qemu-common.h" #include "sysemu/char.h" #include "qemu/timer.h" +#include "qemu/bswap.h" #include "hw/irq.h" #include "sysemu/bt.h" #include "hw/bt.h" diff --git a/hw/bt/l2cap.c b/hw/bt/l2cap.c index 8065251947..dfc95ed048 100644 --- a/hw/bt/l2cap.c +++ b/hw/bt/l2cap.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h" +#include "qemu/bswap.h" #include "hw/bt.h" #define L2CAP_CID_MAX 0x100 /* Between 0x40 and 0x10000 */ diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c index be26009b0d..f67b3b89c0 100644 --- a/hw/bt/sdp.c +++ b/hw/bt/sdp.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" +#include "qemu/host-utils.h" #include "hw/bt.h" struct bt_l2cap_sdp_state_s { diff --git a/hw/char/bcm2835_aux.c b/hw/char/bcm2835_aux.c index 0394d11a88..319f1652f6 100644 --- a/hw/char/bcm2835_aux.c +++ b/hw/char/bcm2835_aux.c @@ -22,6 +22,7 @@ #include "qemu/osdep.h" #include "hw/char/bcm2835_aux.h" +#include "qemu/log.h" #define AUX_IRQ 0x0 #define AUX_ENABLES 0x4 diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 797787823e..442dac52cf 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -17,6 +17,10 @@ */ #include "qemu/osdep.h" +#include "hw/sysbus.h" +#include "sysemu/char.h" +#include "qemu/timer.h" +#include "qemu/log.h" #include "hw/char/cadence_uart.h" #ifdef CADENCE_UART_ERR_DEBUG diff --git a/hw/char/digic-uart.c b/hw/char/digic-uart.c index d3bc533d7c..0e44878405 100644 --- a/hw/char/digic-uart.c +++ b/hw/char/digic-uart.c @@ -30,6 +30,7 @@ #include "hw/hw.h" #include "hw/sysbus.h" #include "sysemu/char.h" +#include "qemu/log.h" #include "hw/char/digic-uart.h" diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c index 6df74ac7c4..44856d671e 100644 --- a/hw/char/imx_serial.c +++ b/hw/char/imx_serial.c @@ -22,6 +22,7 @@ #include "hw/char/imx_serial.h" #include "sysemu/sysemu.h" #include "sysemu/char.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_UART #define DEBUG_IMX_UART 0 diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 210c87b4c2..6876ea6eef 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "sysemu/char.h" +#include "qemu/log.h" #define TYPE_PL011 "pl011" #define PL011(obj) OBJECT_CHECK(PL011State, (obj), TYPE_PL011) diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c index a94d61cebc..72305ec5d4 100644 --- a/hw/char/stm32f2xx_usart.c +++ b/hw/char/stm32f2xx_usart.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "hw/char/stm32f2xx_usart.h" +#include "qemu/log.h" #ifndef STM_USART_ERR_DEBUG #define STM_USART_ERR_DEBUG 0 diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index abb3560bea..70951d4137 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -4,7 +4,7 @@ common-obj-y += fw-path-provider.o # irq.o needed for qdev GPIO handling: common-obj-y += irq.o common-obj-y += hotplug.o -common-obj-y += nmi.o +obj-y += nmi.o common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o common-obj-$(CONFIG_XILINX_AXI) += stream.o diff --git a/hw/core/nmi.c b/hw/core/nmi.c index e8bcc4177b..f616a79312 100644 --- a/hw/core/nmi.c +++ b/hw/core/nmi.c @@ -20,11 +20,16 @@ */ #include "qemu/osdep.h" +#include "qom/cpu.h" #include "hw/nmi.h" #include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "monitor/monitor.h" +#if defined(TARGET_I386) +#include "cpu.h" +#endif + struct do_nmi_s { int cpu_index; Error *err; diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index a7dbe2b324..c0f560b289 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -190,9 +190,9 @@ MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n) return dev->mmio[n].memory; } -void sysbus_init_ioports(SysBusDevice *dev, pio_addr_t ioport, pio_addr_t size) +void sysbus_init_ioports(SysBusDevice *dev, uint32_t ioport, uint32_t size) { - pio_addr_t i; + uint32_t i; for (i = 0; i < size; i++) { assert(dev->num_pio < QDEV_MAX_PIO); diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c index 5459ae8c1b..f17f292090 100644 --- a/hw/cpu/a9mpcore.c +++ b/hw/cpu/a9mpcore.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/cpu/a9mpcore.h" +#include "qom/cpu.h" static void a9mp_priv_set_irq(void *opaque, int irq, int level) { diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c index 506f1d3d90..7eab927652 100644 --- a/hw/display/bcm2835_fb.c +++ b/hw/display/bcm2835_fb.c @@ -29,6 +29,7 @@ #include "hw/display/framebuffer.h" #include "ui/pixel_ops.h" #include "hw/misc/bcm2835_mbox_defs.h" +#include "qemu/log.h" #define DEFAULT_VCRAM_SIZE 0x4000000 #define BCM2835_FB_OFFSET 0x00100000 diff --git a/hw/display/cg3.c b/hw/display/cg3.c index fc0d97fa4b..1174220394 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -26,10 +26,12 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu-common.h" +#include "cpu.h" #include "qemu/error-report.h" #include "ui/console.h" #include "hw/sysbus.h" #include "hw/loader.h" +#include "qemu/log.h" /* Change to 1 to enable debugging */ #define DEBUG_CG3 0 diff --git a/hw/display/pl110.c b/hw/display/pl110.c index d589959f1b..c069c0b7fd 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -12,6 +12,7 @@ #include "ui/console.h" #include "framebuffer.h" #include "ui/pixel_ops.h" +#include "qemu/log.h" #define PL110_CR_EN 0x001 #define PL110_CR_BGR 0x100 diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c index da3ceceb0a..92f7120acc 100644 --- a/hw/display/tc6393xb.c +++ b/hw/display/tc6393xb.c @@ -12,6 +12,7 @@ */ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/host-utils.h" #include "hw/hw.h" #include "hw/devices.h" #include "hw/block/flash.h" diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index c181fb364c..91345bd399 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -19,6 +19,7 @@ #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-gpu.h" #include "hw/virtio/virtio-bus.h" +#include "qemu/log.h" static struct virtio_gpu_simple_resource* virtio_gpu_find_resource(VirtIOGPU *g, uint32_t resource_id); diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c index 5421175998..5d144a2633 100644 --- a/hw/dma/bcm2835_dma.c +++ b/hw/dma/bcm2835_dma.c @@ -6,6 +6,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/dma/bcm2835_dma.h" +#include "qemu/log.h" /* DMA CS Control and Status bits */ #define BCM2708_DMA_ACTIVE (1 << 0) diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c index 9318108b81..3bed5c3390 100644 --- a/hw/dma/pl080.c +++ b/hw/dma/pl080.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "exec/address-spaces.h" +#include "qemu/log.h" #define PL080_MAX_CHANNELS 8 #define PL080_CONF_E 0x1 diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index ea89ecb00e..c0bd9fec30 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -19,6 +19,7 @@ #include "qapi/error.h" #include "qemu/timer.h" #include "sysemu/dma.h" +#include "qemu/log.h" #ifndef PL330_ERR_DEBUG #define PL330_ERR_DEBUG 0 diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index a06c2359a7..2f2576fafb 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -27,6 +27,7 @@ #include "hw/mips/mips.h" #include "hw/sysbus.h" #include "qemu/timer.h" +#include "qemu/log.h" #include "exec/address-spaces.h" #include "trace.h" diff --git a/hw/gpio/gpio_key.c b/hw/gpio/gpio_key.c index ef287727b6..b34aa49dfb 100644 --- a/hw/gpio/gpio_key.c +++ b/hw/gpio/gpio_key.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "qemu/timer.h" #define TYPE_GPIOKEY "gpio-key" #define GPIOKEY(obj) OBJECT_CHECK(GPIOKEYState, (obj), TYPE_GPIOKEY) diff --git a/hw/gpio/imx_gpio.c b/hw/gpio/imx_gpio.c index ed7e247f56..f3574aa8f3 100644 --- a/hw/gpio/imx_gpio.c +++ b/hw/gpio/imx_gpio.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "hw/gpio/imx_gpio.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_GPIO #define DEBUG_IMX_GPIO 0 diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 29dc7fc38e..44faeb23b7 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio/pl061.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "qemu/log.h" //#define DEBUG_PL061 1 diff --git a/hw/i2c/imx_i2c.c b/hw/i2c/imx_i2c.c index e19d4fa745..37e5a62ce7 100644 --- a/hw/i2c/imx_i2c.c +++ b/hw/i2c/imx_i2c.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "hw/i2c/imx_i2c.h" #include "hw/i2c/i2c.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_I2C #define DEBUG_IMX_I2C 0 diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index fee3bc7619..0bce52416e 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "bitbang_i2c.h" +#include "qemu/log.h" #define TYPE_VERSATILE_I2C "versatile_i2c" #define VERSATILE_I2C(obj) \ diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c index 3c7c8fa007..c5983c79be 100644 --- a/hw/i386/kvm/apic.c +++ b/hw/i386/kvm/apic.c @@ -10,6 +10,8 @@ * See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" +#include "qemu-common.h" +#include "cpu.h" #include "hw/i386/apic_internal.h" #include "hw/pci/msi.h" #include "sysemu/kvm.h" diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index a3b300cadf..0f75dd385a 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -15,6 +15,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" +#include "cpu.h" #include "qemu/host-utils.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h" diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index a4462e5ca9..734992ead0 100644 --- a/hw/i386/kvm/i8254.c +++ b/hw/i386/kvm/i8254.c @@ -29,6 +29,7 @@ #include "hw/timer/i8254.h" #include "hw/timer/i8254_internal.h" #include "sysemu/kvm.h" +#include "linux/kvm.h" #define KVM_PIT_REINJECT_BIT 0 diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index bf425a2b9f..db2cbd2002 100644 --- a/hw/i386/kvm/pci-assign.c +++ b/hw/i386/kvm/pci-assign.c @@ -33,6 +33,7 @@ #include "sysemu/sysemu.h" #include "hw/pci/pci.h" #include "hw/pci/msi.h" +#include "linux/kvm.h" #include "kvm_i386.h" #include "hw/pci/pci-assign.h" diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index f14445d4fb..8fd27ba2f4 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -9,6 +9,9 @@ * top-level directory. */ #include "qemu/osdep.h" +#include "qemu-common.h" +#include "cpu.h" +#include "exec/exec-all.h" #include "sysemu/sysemu.h" #include "sysemu/cpus.h" #include "sysemu/kvm.h" diff --git a/hw/input/pl050.c b/hw/input/pl050.c index 3092b0fe3b..be9cd57b17 100644 --- a/hw/input/pl050.c +++ b/hw/input/pl050.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/input/ps2.h" +#include "qemu/log.h" #define TYPE_PL050 "pl050" #define PL050(obj) OBJECT_CHECK(PL050State, (obj), TYPE_PL050) diff --git a/hw/intc/allwinner-a10-pic.c b/hw/intc/allwinner-a10-pic.c index dc971a1603..11f13663c8 100644 --- a/hw/intc/allwinner-a10-pic.c +++ b/hw/intc/allwinner-a10-pic.c @@ -20,6 +20,7 @@ #include "hw/devices.h" #include "sysemu/sysemu.h" #include "hw/intc/allwinner-a10-pic.h" +#include "qemu/log.h" static void aw_a10_pic_update(AwA10PICState *s) { diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 28c2ea5406..e1ab9354c6 100644 --- a/hw/intc/apic.c +++ b/hw/intc/apic.c @@ -17,6 +17,8 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/> */ #include "qemu/osdep.h" +#include "qemu-common.h" +#include "cpu.h" #include "qemu/thread.h" #include "hw/i386/apic_internal.h" #include "hw/i386/apic.h" diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 4abe145c68..e6eb694de0 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -19,6 +19,8 @@ */ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu-common.h" +#include "cpu.h" #include "hw/i386/apic.h" #include "hw/i386/apic_internal.h" #include "trace.h" diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 5ee79b83e6..06a22e0aaf 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -23,6 +23,7 @@ #include "gic_internal.h" #include "qapi/error.h" #include "qom/cpu.h" +#include "qemu/log.h" #include "trace.h" //#define DEBUG_GIC diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index bc85ab769f..5593cdb3e4 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -21,6 +21,8 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu-common.h" +#include "cpu.h" #include "hw/sysbus.h" #include "migration/migration.h" #include "sysemu/kvm.h" diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c index e8b5177dcc..3922fbc1c1 100644 --- a/hw/intc/arm_gicv2m.c +++ b/hw/intc/arm_gicv2m.c @@ -29,6 +29,8 @@ #include "qapi/error.h" #include "hw/sysbus.h" #include "hw/pci/msi.h" +#include "sysemu/kvm.h" +#include "qemu/log.h" #define TYPE_ARM_GICV2M "arm-gicv2m" #define ARM_GICV2M(obj) OBJECT_CHECK(ARMGICv2mState, (obj), TYPE_ARM_GICV2M) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 669e82adfc..890d5d7442 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -13,11 +13,13 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu-common.h" +#include "cpu.h" #include "hw/sysbus.h" #include "qemu/timer.h" #include "hw/arm/arm.h" #include "exec/address-spaces.h" #include "gic_internal.h" +#include "qemu/log.h" typedef struct { GICState gic; diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c index 80513b28fd..00d25306fd 100644 --- a/hw/intc/bcm2835_ic.c +++ b/hw/intc/bcm2835_ic.c @@ -14,6 +14,7 @@ #include "qemu/osdep.h" #include "hw/intc/bcm2835_ic.h" +#include "qemu/log.h" #define GPU_IRQS 64 #define ARM_IRQS 8 diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c index d0271810cc..cfa5bc7365 100644 --- a/hw/intc/bcm2836_control.c +++ b/hw/intc/bcm2836_control.c @@ -15,6 +15,7 @@ #include "qemu/osdep.h" #include "hw/intc/bcm2836_control.h" +#include "qemu/log.h" #define REG_GPU_ROUTE 0x0c #define REG_TIMERCONTROL 0x40 diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c index bb43669b93..c2607a5868 100644 --- a/hw/intc/i8259.c +++ b/hw/intc/i8259.c @@ -27,6 +27,7 @@ #include "hw/isa/isa.h" #include "monitor/monitor.h" #include "qemu/timer.h" +#include "qemu/log.h" #include "hw/isa/i8259_internal.h" /* debug PIC */ diff --git a/hw/intc/imx_avic.c b/hw/intc/imx_avic.c index d21cb97451..813e587a63 100644 --- a/hw/intc/imx_avic.c +++ b/hw/intc/imx_avic.c @@ -17,6 +17,7 @@ #include "qemu/osdep.h" #include "hw/intc/imx_avic.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_AVIC #define DEBUG_IMX_AVIC 0 diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 378e663f65..4f42b911a2 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -24,6 +24,7 @@ #include "monitor/monitor.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/i386/apic.h" #include "hw/i386/ioapic.h" #include "hw/i386/ioapic_internal.h" #include "include/hw/pci/msi.h" diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 2d3769310f..4349e45e04 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -44,6 +44,7 @@ #include "qapi/error.h" #include "qemu/bitops.h" #include "qapi/qmp/qerror.h" +#include "qemu/log.h" //#define DEBUG_OPENPIC diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c index e47e94f2cf..0518e017c4 100644 --- a/hw/intc/openpic_kvm.c +++ b/hw/intc/openpic_kvm.c @@ -24,6 +24,8 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu-common.h" +#include "cpu.h" #include <sys/ioctl.h> #include "exec/address-spaces.h" #include "hw/hw.h" diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c index 1e50baf237..55ea15de76 100644 --- a/hw/intc/pl190.c +++ b/hw/intc/pl190.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "qemu/log.h" /* The number of virtual priority levels. 16 user vectors plus the unvectored IRQ. Chained interrupts would require an additional level diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c index 02449b390e..eed6325cde 100644 --- a/hw/intc/s390_flic_kvm.c +++ b/hw/intc/s390_flic_kvm.c @@ -11,6 +11,8 @@ */ #include "qemu/osdep.h" +#include "qemu-common.h" +#include "cpu.h" #include <sys/ioctl.h> #include "qemu/error-report.h" #include "hw/sysbus.h" diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index 9029d9ee0b..55fd801ffd 100644 --- a/hw/intc/xics_kvm.c +++ b/hw/intc/xics_kvm.c @@ -31,6 +31,7 @@ #include "cpu.h" #include "hw/hw.h" #include "trace.h" +#include "sysemu/kvm.h" #include "hw/ppc/spapr.h" #include "hw/ppc/xics.h" #include "kvm_ppc.h" diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 99cd3ba9e1..4f8ca45f6d 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -47,6 +47,7 @@ #include "hw/pci/pci_bus.h" #include "exec/address-spaces.h" #include "sysemu/sysemu.h" +#include "qom/cpu.h" static int ich9_lpc_sci_irq(ICH9LPCState *lpc); diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 1bafbbb278..61208f8c69 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -81,11 +81,12 @@ static void mips_cps_realize(DeviceState *dev, Error **errp) error_setg(errp, "%s: CPU initialization failed\n", __func__); return; } - env = &cpu->env; /* Init internal devices */ - cpu_mips_irq_init_cpu(env); - cpu_mips_clock_init(env); + cpu_mips_irq_init_cpu(cpu); + cpu_mips_clock_init(cpu); + + env = &cpu->env; if (cpu_mips_itu_supported(env)) { itu_present = true; /* Attach ITC Tag to the VP */ diff --git a/hw/mips/cputimer.c b/hw/mips/cputimer.c index efb227d06e..8a166b3ea7 100644 --- a/hw/mips/cputimer.c +++ b/hw/mips/cputimer.c @@ -151,8 +151,10 @@ static void mips_timer_cb (void *opaque) env->CP0_Count--; } -void cpu_mips_clock_init (CPUMIPSState *env) +void cpu_mips_clock_init (MIPSCPU *cpu) { + CPUMIPSState *env = &cpu->env; + /* * If we're in KVM mode, don't create the periodic timer, that is handled in * kernel. diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index bdb716e725..889cdc7ca7 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -334,8 +334,8 @@ static void mips_fulong2e_init(MachineState *machine) } /* Init internal devices */ - cpu_mips_irq_init_cpu(env); - cpu_mips_clock_init(env); + cpu_mips_irq_init_cpu(cpu); + cpu_mips_clock_init(cpu); /* North bridge, Bonito --> IP2 */ pci_bus = bonito_init((qemu_irq *)&(env->irq[2])); diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c index 59081f9d1e..48192d22f3 100644 --- a/hw/mips/mips_int.c +++ b/hw/mips/mips_int.c @@ -58,8 +58,9 @@ static void cpu_mips_irq_request(void *opaque, int irq, int level) } } -void cpu_mips_irq_init_cpu(CPUMIPSState *env) +void cpu_mips_irq_init_cpu(MIPSCPU *cpu) { + CPUMIPSState *env = &cpu->env; qemu_irq *qi; int i; diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index ac7c641258..73f6c9facf 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -201,8 +201,8 @@ static void mips_jazz_init(MachineState *machine, } /* Init CPU internal devices */ - cpu_mips_irq_init_cpu(env); - cpu_mips_clock_init(env); + cpu_mips_irq_init_cpu(cpu); + cpu_mips_clock_init(cpu); /* Chipset */ rc4030 = rc4030_init(&dmas, &rc4030_dma_mr); diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index fa769e5c00..5c8ba44c62 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -923,11 +923,10 @@ static void create_cpu_without_cps(const char *cpu_model, fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } - env = &cpu->env; /* Init internal devices */ - cpu_mips_irq_init_cpu(env); - cpu_mips_clock_init(env); + cpu_mips_irq_init_cpu(cpu); + cpu_mips_clock_init(cpu); qemu_register_reset(main_cpu_reset, cpu); } diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c index a2c2a1646e..1b91195006 100644 --- a/hw/mips/mips_mipssim.c +++ b/hw/mips/mips_mipssim.c @@ -216,8 +216,8 @@ mips_mipssim_init(MachineState *machine) } /* Init CPU internal devices. */ - cpu_mips_irq_init_cpu(env); - cpu_mips_clock_init(env); + cpu_mips_irq_init_cpu(cpu); + cpu_mips_clock_init(cpu); /* Register 64 KB of ISA IO space at 0x1fd00000. */ memory_region_init_alias(isa, NULL, "isa_mmio", diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index 21aca981c2..16a59c779c 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -267,8 +267,8 @@ void mips_r4k_init(MachineState *machine) } /* Init CPU internal devices */ - cpu_mips_irq_init_cpu(env); - cpu_mips_clock_init(env); + cpu_mips_irq_init_cpu(cpu); + cpu_mips_clock_init(cpu); /* ISA bus: IO space at 0x14000000, mem space at 0x10000000 */ memory_region_init_alias(isa_io, NULL, "isa-io", diff --git a/hw/misc/arm11scu.c b/hw/misc/arm11scu.c index 5e54b494be..7042ce11e8 100644 --- a/hw/misc/arm11scu.c +++ b/hw/misc/arm11scu.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/misc/arm11scu.h" +#include "qemu/log.h" static uint64_t mpcore_scu_read(void *opaque, hwaddr offset, unsigned size) diff --git a/hw/misc/arm_integrator_debug.c b/hw/misc/arm_integrator_debug.c index 902605fef4..8a5f29559d 100644 --- a/hw/misc/arm_integrator_debug.c +++ b/hw/misc/arm_integrator_debug.c @@ -19,6 +19,7 @@ #include "hw/sysbus.h" #include "exec/address-spaces.h" #include "hw/misc/arm_integrator_debug.h" +#include "qemu/log.h" #define INTEGRATOR_DEBUG(obj) \ OBJECT_CHECK(IntegratorDebugState, (obj), TYPE_INTEGRATOR_DEBUG) diff --git a/hw/misc/arm_l2x0.c b/hw/misc/arm_l2x0.c index 7e179f1a4e..4442227877 100644 --- a/hw/misc/arm_l2x0.c +++ b/hw/misc/arm_l2x0.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "qemu/log.h" /* L2C-310 r3p2 */ #define CACHE_ID 0x410000c8 diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c index 34d90d5230..8524008708 100644 --- a/hw/misc/arm_sysctl.c +++ b/hw/misc/arm_sysctl.c @@ -14,6 +14,7 @@ #include "hw/sysbus.h" #include "hw/arm/primecell.h" #include "sysemu/sysemu.h" +#include "qemu/log.h" #define LOCK_VALUE 0xa05f diff --git a/hw/misc/bcm2835_mbox.c b/hw/misc/bcm2835_mbox.c index 263280fd49..e97cc814af 100644 --- a/hw/misc/bcm2835_mbox.c +++ b/hw/misc/bcm2835_mbox.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/misc/bcm2835_mbox.h" +#include "qemu/log.h" #define MAIL0_PEEK 0x90 #define MAIL0_SENDER 0x94 diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c index 34473469d4..70eaafd325 100644 --- a/hw/misc/bcm2835_property.c +++ b/hw/misc/bcm2835_property.c @@ -8,6 +8,7 @@ #include "hw/misc/bcm2835_property.h" #include "hw/misc/bcm2835_mbox_defs.h" #include "sysemu/dma.h" +#include "qemu/log.h" /* https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface */ diff --git a/hw/misc/imx25_ccm.c b/hw/misc/imx25_ccm.c index 225604d823..5cd8c0a9a7 100644 --- a/hw/misc/imx25_ccm.c +++ b/hw/misc/imx25_ccm.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "hw/misc/imx25_ccm.h" +#include "qemu/log.h" #ifndef DEBUG_IMX25_CCM #define DEBUG_IMX25_CCM 0 diff --git a/hw/misc/imx31_ccm.c b/hw/misc/imx31_ccm.c index 80c1647166..1c03e52c40 100644 --- a/hw/misc/imx31_ccm.c +++ b/hw/misc/imx31_ccm.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "hw/misc/imx31_ccm.h" +#include "qemu/log.h" #define CKIH_FREQ 26000000 /* 26MHz crystal input */ diff --git a/hw/misc/imx6_ccm.c b/hw/misc/imx6_ccm.c index 4e1d49da69..ec58eef92d 100644 --- a/hw/misc/imx6_ccm.c +++ b/hw/misc/imx6_ccm.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "hw/misc/imx6_ccm.h" +#include "qemu/log.h" #ifndef DEBUG_IMX6_CCM #define DEBUG_IMX6_CCM 0 diff --git a/hw/misc/imx6_src.c b/hw/misc/imx6_src.c index 6b026b459f..8bb6829575 100644 --- a/hw/misc/imx6_src.c +++ b/hw/misc/imx6_src.c @@ -12,6 +12,7 @@ #include "hw/misc/imx6_src.h" #include "sysemu/sysemu.h" #include "qemu/bitops.h" +#include "qemu/log.h" #include "arm-powerctl.h" #ifndef DEBUG_IMX6_SRC diff --git a/hw/misc/imx_ccm.c b/hw/misc/imx_ccm.c index 986d890caf..7f239a41d8 100644 --- a/hw/misc/imx_ccm.c +++ b/hw/misc/imx_ccm.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "hw/misc/imx_ccm.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_CCM #define DEBUG_IMX_CCM 0 diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index f15f301100..05c02fb3a4 100644 --- a/hw/misc/macio/cuda.c +++ b/hw/misc/macio/cuda.c @@ -29,6 +29,7 @@ #include "qemu/timer.h" #include "sysemu/sysemu.h" #include "qemu/cutils.h" +#include "qemu/log.h" /* XXX: implement all timer modes */ diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c index 6051f17dbd..5632743d36 100644 --- a/hw/misc/macio/mac_dbdma.c +++ b/hw/misc/macio/mac_dbdma.c @@ -41,6 +41,7 @@ #include "hw/isa/isa.h" #include "hw/ppc/mac_dbdma.h" #include "qemu/main-loop.h" +#include "qemu/log.h" /* debug DBDMA */ //#define DEBUG_DBDMA diff --git a/hw/misc/mips_cmgcr.c b/hw/misc/mips_cmgcr.c index 37be23995b..40f34643e3 100644 --- a/hw/misc/mips_cmgcr.c +++ b/hw/misc/mips_cmgcr.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/sysbus.h" #include "sysemu/sysemu.h" diff --git a/hw/misc/mips_cpc.c b/hw/misc/mips_cpc.c index d2b8e42da7..e6a35dd6a0 100644 --- a/hw/misc/mips_cpc.c +++ b/hw/misc/mips_cpc.c @@ -19,6 +19,8 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "cpu.h" +#include "qemu/log.h" #include "hw/sysbus.h" #include "hw/misc/mips_cpc.h" diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index da5455062d..ef935b51a8 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -19,6 +19,9 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "cpu.h" +#include "qemu/log.h" +#include "exec/exec-all.h" #include "hw/hw.h" #include "hw/sysbus.h" #include "sysemu/sysemu.h" diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c index 2f2e989778..7d5990213e 100644 --- a/hw/misc/pci-testdev.c +++ b/hw/misc/pci-testdev.c @@ -21,6 +21,7 @@ #include "hw/hw.h" #include "hw/pci/pci.h" #include "qemu/event_notifier.h" +#include "sysemu/kvm.h" typedef struct PCITestDevHdr { uint8_t test; diff --git a/hw/misc/stm32f2xx_syscfg.c b/hw/misc/stm32f2xx_syscfg.c index d0d7076eff..7c45833d09 100644 --- a/hw/misc/stm32f2xx_syscfg.c +++ b/hw/misc/stm32f2xx_syscfg.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "hw/misc/stm32f2xx_syscfg.h" +#include "qemu/log.h" #ifndef STM_SYSCFG_ERR_DEBUG #define STM_SYSCFG_ERR_DEBUG 0 diff --git a/hw/misc/zynq-xadc.c b/hw/misc/zynq-xadc.c index 71fbccd79f..14906103c9 100644 --- a/hw/misc/zynq-xadc.c +++ b/hw/misc/zynq-xadc.c @@ -18,6 +18,7 @@ #include "hw/misc/zynq-xadc.h" #include "qemu/timer.h" #include "sysemu/sysemu.h" +#include "qemu/log.h" enum { CFG = 0x000 / 4, diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index b1b7591ef6..7891219001 100644 --- a/hw/misc/zynq_slcr.c +++ b/hw/misc/zynq_slcr.c @@ -19,6 +19,7 @@ #include "qemu/timer.h" #include "hw/sysbus.h" #include "sysemu/sysemu.h" +#include "qemu/log.h" #ifndef ZYNQ_SLCR_ERR_DEBUG #define ZYNQ_SLCR_ERR_DEBUG 0 diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c index 16d4b63ba0..d57502300c 100644 --- a/hw/net/allwinner_emac.c +++ b/hw/net/allwinner_emac.c @@ -21,6 +21,7 @@ #include "net/net.h" #include "qemu/fifo8.h" #include "hw/net/allwinner_emac.h" +#include "qemu/log.h" #include <zlib.h> static uint8_t padding[60]; diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index 1e35f7f8c5..98250e0591 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/etsec.c @@ -33,6 +33,7 @@ #include "hw/ptimer.h" #include "etsec.h" #include "registers.h" +#include "qemu/log.h" /* #define HEX_DUMP */ /* #define DEBUG_REGISTER */ diff --git a/hw/net/fsl_etsec/rings.c b/hw/net/fsl_etsec/rings.c index ed1de7da9b..79d2f14dd8 100644 --- a/hw/net/fsl_etsec/rings.c +++ b/hw/net/fsl_etsec/rings.c @@ -23,7 +23,7 @@ */ #include "qemu/osdep.h" #include "net/checksum.h" - +#include "qemu/log.h" #include "etsec.h" #include "registers.h" diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index e60e3380e4..9055ea89a9 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "hw/net/imx_fec.h" #include "sysemu/dma.h" +#include "qemu/log.h" /* For crc32 */ #include <zlib.h> diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index 08dc474d61..205207356c 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -16,6 +16,7 @@ #include "hw/devices.h" #include "sysemu/sysemu.h" #include "hw/ptimer.h" +#include "qemu/log.h" /* For crc32 */ #include <zlib.h> diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index a647f25d96..a8266f8ec7 100644 --- a/hw/net/spapr_llan.c +++ b/hw/net/spapr_llan.c @@ -28,6 +28,7 @@ #include "qemu-common.h" #include "cpu.h" #include "hw/hw.h" +#include "qemu/log.h" #include "net/net.h" #include "hw/qdev.h" #include "hw/ppc/spapr.h" @@ -106,9 +107,9 @@ typedef struct VIOsPAPRVLANDevice { NICConf nicconf; NICState *nic; bool isopen; - target_ulong buf_list; + hwaddr buf_list; uint32_t add_buf_ptr, use_buf_ptr, rx_bufs; - target_ulong rxq_ptr; + hwaddr rxq_ptr; uint32_t compat_flags; /* Compatability flags for migration */ RxBufPool *rx_pool[RX_MAX_POOLS]; /* Receive buffer descriptor pools */ } VIOsPAPRVLANDevice; @@ -765,11 +766,11 @@ static const VMStateDescription vmstate_spapr_llan = { VMSTATE_SPAPR_VIO(sdev, VIOsPAPRVLANDevice), /* LLAN state */ VMSTATE_BOOL(isopen, VIOsPAPRVLANDevice), - VMSTATE_UINTTL(buf_list, VIOsPAPRVLANDevice), + VMSTATE_UINT64(buf_list, VIOsPAPRVLANDevice), VMSTATE_UINT32(add_buf_ptr, VIOsPAPRVLANDevice), VMSTATE_UINT32(use_buf_ptr, VIOsPAPRVLANDevice), VMSTATE_UINT32(rx_bufs, VIOsPAPRVLANDevice), - VMSTATE_UINTTL(rxq_ptr, VIOsPAPRVLANDevice), + VMSTATE_UINT64(rxq_ptr, VIOsPAPRVLANDevice), VMSTATE_END_OF_LIST() }, diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c index aaef7bb3a1..babbbef0c2 100644 --- a/hw/pci-host/apb.c +++ b/hw/pci-host/apb.c @@ -36,6 +36,7 @@ #include "hw/pci-host/apb.h" #include "sysemu/sysemu.h" #include "exec/address-spaces.h" +#include "qemu/log.h" /* debug APB */ //#define DEBUG_APB diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c index 339ec2c508..0792c4501c 100644 --- a/hw/pci-host/versatile.c +++ b/hw/pci-host/versatile.c @@ -13,6 +13,7 @@ #include "hw/pci/pci_bus.h" #include "hw/pci/pci_host.h" #include "exec/address-spaces.h" +#include "qemu/log.h" /* Old and buggy versions of QEMU used the wrong mapping from * PCI IRQs to system interrupt lines. Unfortunately the Linux diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index b00565c3d3..94b454551f 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -14,6 +14,7 @@ #include "e500.h" #include "hw/boards.h" #include "sysemu/device_tree.h" +#include "sysemu/kvm.h" #include "hw/pci/pci.h" #include "hw/ppc/openpic.h" #include "kvm_ppc.h" diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 38ff2e1596..cdf9f258ae 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -164,9 +164,9 @@ static void ppc6xx_set_irq(void *opaque, int pin, int level) } } -void ppc6xx_irq_init(CPUPPCState *env) +void ppc6xx_irq_init(PowerPCCPU *cpu) { - PowerPCCPU *cpu = ppc_env_get_cpu(env); + CPUPPCState *env = &cpu->env; env->irq_inputs = (void **)qemu_allocate_irqs(&ppc6xx_set_irq, cpu, PPC6xx_INPUT_NB); @@ -251,9 +251,9 @@ static void ppc970_set_irq(void *opaque, int pin, int level) } } -void ppc970_irq_init(CPUPPCState *env) +void ppc970_irq_init(PowerPCCPU *cpu) { - PowerPCCPU *cpu = ppc_env_get_cpu(env); + CPUPPCState *env = &cpu->env; env->irq_inputs = (void **)qemu_allocate_irqs(&ppc970_set_irq, cpu, PPC970_INPUT_NB); @@ -287,9 +287,9 @@ static void power7_set_irq(void *opaque, int pin, int level) } } -void ppcPOWER7_irq_init(CPUPPCState *env) +void ppcPOWER7_irq_init(PowerPCCPU *cpu) { - PowerPCCPU *cpu = ppc_env_get_cpu(env); + CPUPPCState *env = &cpu->env; env->irq_inputs = (void **)qemu_allocate_irqs(&power7_set_irq, cpu, POWER7_INPUT_NB); @@ -372,9 +372,9 @@ static void ppc40x_set_irq(void *opaque, int pin, int level) } } -void ppc40x_irq_init(CPUPPCState *env) +void ppc40x_irq_init(PowerPCCPU *cpu) { - PowerPCCPU *cpu = ppc_env_get_cpu(env); + CPUPPCState *env = &cpu->env; env->irq_inputs = (void **)qemu_allocate_irqs(&ppc40x_set_irq, cpu, PPC40x_INPUT_NB); @@ -436,9 +436,9 @@ static void ppce500_set_irq(void *opaque, int pin, int level) } } -void ppce500_irq_init(CPUPPCState *env) +void ppce500_irq_init(PowerPCCPU *cpu) { - PowerPCCPU *cpu = ppc_env_get_cpu(env); + CPUPPCState *env = &cpu->env; env->irq_inputs = (void **)qemu_allocate_irqs(&ppce500_set_irq, cpu, PPCE500_INPUT_NB); diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c index 7d59018fc2..e7f413e49d 100644 --- a/hw/ppc/ppc4xx_devs.c +++ b/hw/ppc/ppc4xx_devs.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" +#include "cpu.h" #include "hw/hw.h" #include "hw/ppc/ppc.h" #include "hw/ppc/ppc4xx.h" diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 3ffb85e601..07ffe72de1 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" +#include "cpu.h" #include "hw/hw.h" #include "hw/timer/m48t59.h" #include "hw/i386/pc.h" diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index b69995e0dc..de1de1d067 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -29,6 +29,7 @@ #include "sysemu/sysemu.h" #include "sysemu/numa.h" #include "hw/hw.h" +#include "qemu/log.h" #include "hw/fw-path-provider.h" #include "elf.h" #include "net/net.h" diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 8f40602a5e..feb3629664 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1,12 +1,15 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "sysemu/sysemu.h" +#include "qemu/log.h" #include "cpu.h" +#include "exec/exec-all.h" #include "helper_regs.h" #include "hw/ppc/spapr.h" #include "mmu-hash64.h" #include "cpu-models.h" #include "trace.h" +#include "sysemu/kvm.h" #include "kvm_ppc.h" struct SPRSyncState { diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c index 7dd458846e..722db91ffa 100644 --- a/hw/ppc/spapr_iommu.c +++ b/hw/ppc/spapr_iommu.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" #include "hw/hw.h" +#include "qemu/log.h" #include "sysemu/kvm.h" #include "hw/qdev.h" #include "kvm_ppc.h" diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 573e635bfb..e55b505c96 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -44,6 +44,7 @@ #include "hw/pci/pci_bus.h" #include "hw/ppc/spapr_drc.h" #include "sysemu/device_tree.h" +#include "sysemu/kvm.h" #include "hw/vfio/vfio.h" diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index f07325831c..43e2c684fd 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -26,11 +26,13 @@ */ #include "qemu/osdep.h" #include "cpu.h" +#include "qemu/log.h" #include "sysemu/sysemu.h" #include "sysemu/char.h" #include "hw/qdev.h" #include "sysemu/device_tree.h" #include "sysemu/cpus.h" +#include "sysemu/kvm.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_vio.h" diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index 8aa021fde9..d084aedadf 100644 --- a/hw/ppc/spapr_vio.c +++ b/hw/ppc/spapr_vio.c @@ -22,6 +22,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/hw.h" +#include "qemu/log.h" #include "sysemu/sysemu.h" #include "hw/boards.h" #include "hw/loader.h" @@ -584,7 +585,7 @@ const VMStateDescription vmstate_spapr_vio = { VMSTATE_UINT32_EQUAL(irq, VIOsPAPRDevice), /* General VIO device state */ - VMSTATE_UINTTL(signal_state, VIOsPAPRDevice), + VMSTATE_UINT64(signal_state, VIOsPAPRDevice), VMSTATE_UINT64(crq.qladdr, VIOsPAPRDevice), VMSTATE_UINT32(crq.qsize, VIOsPAPRDevice), VMSTATE_UINT32(crq.qnext, VIOsPAPRDevice), diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c index b807a08c28..b97d96685c 100644 --- a/hw/ppc/virtex_ml507.c +++ b/hw/ppc/virtex_ml507.c @@ -23,6 +23,7 @@ */ #include "qemu/osdep.h" +#include "cpu.h" #include "hw/sysbus.h" #include "hw/hw.h" #include "hw/char/serial.h" diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 3a1d919580..1675a19ac2 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -14,8 +14,8 @@ #include "qemu/bitops.h" #include "exec/address-spaces.h" #include "cpu.h" -#include "ioinst.h" -#include "css.h" +#include "hw/s390x/ioinst.h" +#include "hw/s390x/css.h" #include "trace.h" #include "hw/s390x/s390_flic.h" diff --git a/hw/s390x/css.h b/hw/s390x/css.h deleted file mode 100644 index a320eea59c..0000000000 --- a/hw/s390x/css.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Channel subsystem structures and definitions. - * - * Copyright 2012 IBM Corp. - * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com> - * - * This work is licensed under the terms of the GNU GPL, version 2 or (at - * your option) any later version. See the COPYING file in the top-level - * directory. - */ - -#ifndef CSS_H -#define CSS_H - -#include "hw/s390x/adapter.h" -#include "hw/s390x/s390_flic.h" -#include "ioinst.h" - -/* Channel subsystem constants. */ -#define MAX_SCHID 65535 -#define MAX_SSID 3 -#define MAX_CSSID 254 /* 255 is reserved */ -#define MAX_CHPID 255 - -#define MAX_CIWS 62 - -typedef struct CIW { - uint8_t type; - uint8_t command; - uint16_t count; -} QEMU_PACKED CIW; - -typedef struct SenseId { - /* common part */ - uint8_t reserved; /* always 0x'FF' */ - uint16_t cu_type; /* control unit type */ - uint8_t cu_model; /* control unit model */ - uint16_t dev_type; /* device type */ - uint8_t dev_model; /* device model */ - uint8_t unused; /* padding byte */ - /* extended part */ - CIW ciw[MAX_CIWS]; /* variable # of CIWs */ -} QEMU_PACKED SenseId; - -/* Channel measurements, from linux/drivers/s390/cio/cmf.c. */ -typedef struct CMB { - uint16_t ssch_rsch_count; - uint16_t sample_count; - uint32_t device_connect_time; - uint32_t function_pending_time; - uint32_t device_disconnect_time; - uint32_t control_unit_queuing_time; - uint32_t device_active_only_time; - uint32_t reserved[2]; -} QEMU_PACKED CMB; - -typedef struct CMBE { - uint32_t ssch_rsch_count; - uint32_t sample_count; - uint32_t device_connect_time; - uint32_t function_pending_time; - uint32_t device_disconnect_time; - uint32_t control_unit_queuing_time; - uint32_t device_active_only_time; - uint32_t device_busy_time; - uint32_t initial_command_response_time; - uint32_t reserved[7]; -} QEMU_PACKED CMBE; - -struct SubchDev { - /* channel-subsystem related things: */ - uint8_t cssid; - uint8_t ssid; - uint16_t schid; - uint16_t devno; - SCHIB curr_status; - uint8_t sense_data[32]; - hwaddr channel_prog; - CCW1 last_cmd; - bool last_cmd_valid; - bool ccw_fmt_1; - bool thinint_active; - uint8_t ccw_no_data_cnt; - /* transport-provided data: */ - int (*ccw_cb) (SubchDev *, CCW1); - void (*disable_cb)(SubchDev *); - SenseId id; - void *driver_data; -}; - -typedef struct IndAddr { - hwaddr addr; - uint64_t map; - unsigned long refcnt; - int len; - QTAILQ_ENTRY(IndAddr) sibling; -} IndAddr; - -IndAddr *get_indicator(hwaddr ind_addr, int len); -void release_indicator(AdapterInfo *adapter, IndAddr *indicator); -int map_indicator(AdapterInfo *adapter, IndAddr *indicator); - -typedef SubchDev *(*css_subch_cb_func)(uint8_t m, uint8_t cssid, uint8_t ssid, - uint16_t schid); -void subch_device_save(SubchDev *s, QEMUFile *f); -int subch_device_load(SubchDev *s, QEMUFile *f); -int css_create_css_image(uint8_t cssid, bool default_image); -bool css_devno_used(uint8_t cssid, uint8_t ssid, uint16_t devno); -void css_subch_assign(uint8_t cssid, uint8_t ssid, uint16_t schid, - uint16_t devno, SubchDev *sch); -void css_sch_build_virtual_schib(SubchDev *sch, uint8_t chpid, uint8_t type); -uint16_t css_build_subchannel_id(SubchDev *sch); -void css_reset(void); -void css_reset_sch(SubchDev *sch); -void css_queue_crw(uint8_t rsc, uint8_t erc, int chain, uint16_t rsid); -void css_generate_sch_crws(uint8_t cssid, uint8_t ssid, uint16_t schid, - int hotplugged, int add); -void css_generate_chp_crws(uint8_t cssid, uint8_t chpid); -void css_generate_css_crws(uint8_t cssid); -void css_clear_sei_pending(void); -void css_adapter_interrupt(uint8_t isc); - -#define CSS_IO_ADAPTER_VIRTIO 1 -int css_register_io_adapter(uint8_t type, uint8_t isc, bool swap, - bool maskable, uint32_t *id); -#endif diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 6528ffed17..d772cfc7ea 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -15,6 +15,7 @@ #include "migration/qemu-file.h" #include "hw/s390x/storage-keys.h" #include "qemu/error-report.h" +#include "sysemu/kvm.h" #define S390_SKEYS_BUFFER_SIZE 131072 /* Room for 128k storage keys */ #define S390_SKEYS_SAVE_FLAG_EOS 0x01 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 4456fce9f1..18bbbfbbe2 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -18,8 +18,8 @@ #include "s390-virtio.h" #include "hw/s390x/sclp.h" #include "hw/s390x/s390_flic.h" -#include "ioinst.h" -#include "css.h" +#include "hw/s390x/ioinst.h" +#include "hw/s390x/css.h" #include "virtio-ccw.h" #include "qemu/config-file.h" #include "s390-pci-bus.h" diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index d51642db0d..a1c1ed9496 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -16,6 +16,7 @@ #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "sysemu/sysemu.h" +#include "sysemu/kvm.h" #include "net/net.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-serial.h" @@ -28,8 +29,8 @@ #include "hw/s390x/adapter.h" #include "hw/s390x/s390_flic.h" -#include "ioinst.h" -#include "css.h" +#include "hw/s390x/ioinst.h" +#include "hw/s390x/css.h" #include "virtio-ccw.h" #include "trace.h" diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 66c831ba84..86b9edb18f 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -24,7 +24,8 @@ #include <hw/virtio/virtio-rng.h> #include <hw/virtio/virtio-bus.h> -#include "css.h" +#include <hw/s390x/s390_flic.h> +#include <hw/s390x/css.h> #define VIRTUAL_CSSID 0xfe diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index e87abb2051..eb783c6b51 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -12,6 +12,7 @@ #include "sysemu/blockdev.h" #include "hw/sysbus.h" #include "hw/sd/sd.h" +#include "qemu/log.h" //#define DEBUG_PL181 1 diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 87e3d23a3d..87c6dc108d 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -39,6 +39,7 @@ #include "hw/qdev-properties.h" #include "qemu/error-report.h" #include "qemu/timer.h" +#include "qemu/log.h" //#define DEBUG_SD 1 diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index d28b5871fc..01fbf228be 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -30,6 +30,7 @@ #include "qemu/timer.h" #include "qemu/bitops.h" #include "sdhci-internal.h" +#include "qemu/log.h" /* host controller debug messages */ #ifndef SDHC_DEBUG diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c index a1ea760f68..3132d559d7 100644 --- a/hw/sh4/sh7750.c +++ b/hw/sh4/sh7750.c @@ -30,6 +30,7 @@ #include "sh7750_regnames.h" #include "hw/sh4/sh_intc.h" #include "cpu.h" +#include "exec/exec-all.h" #include "exec/address-spaces.h" #define NB_DEVICES 4 diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index d5dd42aca6..4226199811 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "hw/ssi/imx_spi.h" #include "sysemu/sysemu.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_SPI #define DEBUG_IMX_SPI 0 diff --git a/hw/ssi/pl022.c b/hw/ssi/pl022.c index 564a0d36e7..c1368018ee 100644 --- a/hw/ssi/pl022.c +++ b/hw/ssi/pl022.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/ssi/ssi.h" +#include "qemu/log.h" //#define DEBUG_PL022 1 diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c index 51cdc98f3a..3385e5dc35 100644 --- a/hw/timer/allwinner-a10-pit.c +++ b/hw/timer/allwinner-a10-pit.c @@ -19,6 +19,7 @@ #include "hw/sysbus.h" #include "sysemu/sysemu.h" #include "hw/timer/allwinner-a10-pit.h" +#include "qemu/log.h" static void a10_pit_update_irq(AwA10PITState *s) { diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c index f1ede5f53b..111a16db37 100644 --- a/hw/timer/arm_timer.c +++ b/hw/timer/arm_timer.c @@ -14,6 +14,7 @@ #include "hw/qdev.h" #include "hw/ptimer.h" #include "qemu/main-loop.h" +#include "qemu/log.h" /* Common timer implementation. */ diff --git a/hw/timer/digic-timer.c b/hw/timer/digic-timer.c index 5b97e1e1a6..0f21faf876 100644 --- a/hw/timer/digic-timer.c +++ b/hw/timer/digic-timer.c @@ -30,6 +30,7 @@ #include "hw/sysbus.h" #include "hw/ptimer.h" #include "qemu/main-loop.h" +#include "qemu/log.h" #include "hw/timer/digic-timer.h" diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c index f5836e21f4..eddf3481e8 100644 --- a/hw/timer/imx_epit.c +++ b/hw/timer/imx_epit.c @@ -16,6 +16,7 @@ #include "hw/timer/imx_epit.h" #include "hw/misc/imx_ccm.h" #include "qemu/main-loop.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_EPIT #define DEBUG_IMX_EPIT 0 diff --git a/hw/timer/imx_gpt.c b/hw/timer/imx_gpt.c index ab2e213a19..3c2f01ab99 100644 --- a/hw/timer/imx_gpt.c +++ b/hw/timer/imx_gpt.c @@ -16,6 +16,7 @@ #include "hw/timer/imx_gpt.h" #include "hw/misc/imx_ccm.h" #include "qemu/main-loop.h" +#include "qemu/log.h" #ifndef DEBUG_IMX_GPT #define DEBUG_IMX_GPT 0 diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c index 38e0cb5ad6..dbbeb9b16b 100644 --- a/hw/timer/pl031.c +++ b/hw/timer/pl031.c @@ -16,6 +16,7 @@ #include "qemu/timer.h" #include "sysemu/sysemu.h" #include "qemu/cutils.h" +#include "qemu/log.h" //#define DEBUG_PL031 diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c index 55dacbbe3b..bf0fb288c4 100644 --- a/hw/timer/stm32f2xx_timer.c +++ b/hw/timer/stm32f2xx_timer.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "hw/timer/stm32f2xx_timer.h" +#include "qemu/log.h" #ifndef STM_TIMER_ERR_DEBUG #define STM_TIMER_ERR_DEBUG 0 diff --git a/hw/vfio/common.c b/hw/vfio/common.c index f27db36fb3..88154a1f03 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -30,6 +30,9 @@ #include "hw/hw.h" #include "qemu/error-report.h" #include "sysemu/kvm.h" +#ifdef CONFIG_KVM +#include "linux/kvm.h" +#endif #include "trace.h" struct vfio_group_head vfio_group_list = diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c index f54a35a0e3..a7b64e2c40 100644 --- a/hw/watchdog/wdt_diag288.c +++ b/hw/watchdog/wdt_diag288.c @@ -16,6 +16,7 @@ #include "hw/sysbus.h" #include "qemu/timer.h" #include "hw/watchdog/wdt_diag288.h" +#include "qemu/log.h" static WatchdogTimerModel model = { .wdt_name = TYPE_WDT_DIAG288, diff --git a/hw/xtensa/pic_cpu.c b/hw/xtensa/pic_cpu.c index c835bd0096..ccf65fd8ad 100644 --- a/hw/xtensa/pic_cpu.c +++ b/hw/xtensa/pic_cpu.c @@ -26,6 +26,7 @@ */ #include "qemu/osdep.h" +#include "cpu.h" #include "hw/hw.h" #include "qemu/log.h" #include "qemu/timer.h" |