summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/Kconfig317
-rw-r--r--hw/arm/Makefile.objs25
-rw-r--r--hw/arm/smmuv3-internal.h4
-rw-r--r--hw/display/Kconfig3
-rw-r--r--hw/display/ati.c1
-rw-r--r--hw/display/ati_2d.c1
-rw-r--r--hw/display/ati_dbg.c1
-rw-r--r--hw/display/ati_int.h1
-rw-r--r--hw/display/vga_regs.h6
-rw-r--r--hw/i2c/Kconfig2
-rw-r--r--hw/i386/Kconfig2
-rw-r--r--hw/i386/amd_iommu.h4
-rw-r--r--hw/ide/Kconfig6
-rw-r--r--hw/ide/Makefile.objs2
-rw-r--r--hw/ide/ahci_internal.h2
-rw-r--r--hw/input/Kconfig7
-rw-r--r--hw/input/Makefile.objs5
-rw-r--r--hw/input/vhost-user-input.c129
-rw-r--r--hw/misc/Kconfig2
-rw-r--r--hw/pci/pci-stub.c11
-rw-r--r--hw/rdma/rdma_utils.h1
-rw-r--r--hw/rdma/vmw/pvrdma_qp_ops.h4
-rw-r--r--hw/sd/sdmmc-internal.h5
-rw-r--r--hw/timer/m48t59-internal.h3
-rw-r--r--hw/tpm/tpm_ioctl.h7
-rw-r--r--hw/virtio/Makefile.objs1
-rw-r--r--hw/virtio/vhost-user-input-pci.c50
-rw-r--r--hw/virtio/virtio-input-host-pci.c7
-rw-r--r--hw/xtensa/xtensa_memory.h4
29 files changed, 569 insertions, 44 deletions
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index d298fbdc89..af8cffde9c 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -1,124 +1,435 @@
config ARM_VIRT
bool
+ imply PCI_DEVICES
+ imply TEST_DEVICES
+ imply VFIO_AMD_XGBE
imply VFIO_PLATFORM
+ imply VFIO_XGMAC
+ select A15MPCORE
+ select ACPI
+ select ARM_SMMUV3
+ select GPIO_KEY
+ select FW_CFG_DMA
+ select PCI_EXPRESS
+ select PCI_EXPRESS_GENERIC_BRIDGE
+ select PFLASH_CFI01
+ select PL011 # UART
+ select PL031 # RTC
+ select PL061 # GPIO
+ select PLATFORM_BUS
+ select SMBIOS
+ select VIRTIO_MMIO
+
+config CHEETAH
+ bool
+ select OMAP
+ select TSC210X
+
+config CUBIEBOARD
+ bool
+ select ALLWINNER_A10
config DIGIC
bool
select PTIMER
+ select PFLASH_CFI02
config EXYNOS4
bool
+ select A9MPCORE
+ select I2C
+ select LAN9118
+ select PL310 # cache controller
select PTIMER
+ select SDHCI
+ select USB_EHCI_SYSBUS
config HIGHBANK
bool
+ select A9MPCORE
+ select A15MPCORE
+ select AHCI
+ select ARM_TIMER # sp804
+ select ARM_V7M
+ select PL011 # UART
+ select PL022 # Serial port
+ select PL031 # RTC
+ select PL061 # GPIO
+ select PL310 # cache controller
+ select XGMAC # ethernet
config INTEGRATOR
bool
+ select ARM_TIMER
+ select INTEGRATOR_DEBUG
+ select PL011 # UART
+ select PL031 # RTC
+ select PL050 # keyboard/mouse
+ select PL110 # pl111 LCD controller
+ select PL181 # display
+ select SMC91C111
config MAINSTONE
bool
+ select PXA2XX
+ select PFLASH_CFI01
+ select SMC91C111
+
+config MUSCA
+ bool
+ select ARMSSE
+ select PL011
+ select PL031
config MUSICPAL
bool
+ select BITBANG_I2C
+ select MARVELL_88W8618
select PTIMER
+ select PFLASH_CFI02
+ select SERIAL
+ select WM8750
config NETDUINO2
bool
+ select STM32F205_SOC
config NSERIES
bool
+ select OMAP
+ select TMP105 # tempature sensor
+ select BLIZZARD # LCD/TV controller
+ select ONENAND
+ select TSC210X # touchscreen/sensors/audio
+ select TSC2005 # touchscreen/sensors/keypad
+ select LM832X # GPIO keyboard chip
+ select TWL92230 # energy-management
+ select TUSB6010
config OMAP
bool
+ select FRAMEBUFFER
+ select I2C
+ select ECC
+ select NAND
+ select PFLASH_CFI01
+ select SD
+ select SERIAL
config PXA2XX
bool
+ select FRAMEBUFFER
+ select I2C
+ select SERIAL
+ select SD
+ select SSI
+ select USB_OHCI
+
+config GUMSTIX
+ bool
+ select PFLASH_CFI01
+ select SMC91C111
+ select PXA2XX
+
+config TOSA
+ bool
+ select ZAURUS # scoop
+ select MICRODRIVE
+ select PXA2XX
+
+config SPITZ
+ bool
+ select ADS7846 # display
+ select MAX111X # A/D converter
+ select WM8750 # audio codec
+ select MAX7310 # GPIO expander
+ select ZAURUS # scoop
+ select NAND # memory
+ select ECC # Error-correcting for NAND
+ select MICRODRIVE
+ select PXA2XX
+
+config Z2
+ bool
+ select PFLASH_CFI01
+ select WM8750
+ select PL011 # UART
+ select PXA2XX
config REALVIEW
bool
+ imply PCI_DEVICES
+ imply PCI_TESTDEV
+ select SMC91C111
+ select LAN9118
+ select A9MPCORE
+ select A15MPCORE
+ select ARM11MPCORE
+ select ARM_TIMER
+ select VERSATILE_PCI
+ select WM8750 # audio codec
+ select LSI_SCSI_PCI
+ select PCI
+ select PL011 # UART
+ select PL031 # RTC
+ select PL041 # audio codec
+ select PL050 # keyboard/mouse
+ select PL061 # GPIO
+ select PL080 # DMA controller
+ select PL110
+ select PL181 # display
+ select PL310 # cache controller
+ select VERSATILE_I2C
+ select DS1338 # I2C RTC+NVRAM
+ select USB_OHCI
+
+config SABRELITE
+ bool
+ select FSL_IMX6
+ select SSI_M25P80
config STELLARIS
bool
+ select ARM_V7M
+ select CMSDK_APB_WATCHDOG
+ select I2C
+ select PL011 # UART
+ select PL022 # Serial port
+ select PL061 # GPIO
+ select SSD0303 # OLED display
+ select SSD0323 # OLED display
+ select SSI_SD
+ select STELLARIS_INPUT
+ select STELLARIS_ENET # ethernet
config STRONGARM
bool
+ select PXA2XX
+
+config COLLIE
+ bool
+ select PFLASH_CFI01
+ select ZAURUS # scoop
+ select STRONGARM
+
+config SX1
+ bool
+ select OMAP
config VERSATILE
bool
+ select ARM_TIMER # sp804
+ select PFLASH_CFI01
+ select LSI_SCSI_PCI
+ select PL050 # keyboard/mouse
+ select PL080 # DMA controller
+ select PL190 # Vector PIC
+ select REALVIEW
+ select USB_OHCI
+
+config VEXPRESS
+ bool
+ select A9MPCORE
+ select A15MPCORE
+ select ARM_MPTIMER
+ select ARM_TIMER # sp804
+ select LAN9118
+ select PFLASH_CFI01
+ select PL011 # UART
+ select PL041 # audio codec
+ select PL181 # display
+ select REALVIEW
+ select SII9022
+ select VIRTIO_MMIO
config ZYNQ
bool
+ select A9MPCORE
+ select CADENCE # UART
+ select PFLASH_CFI02
+ select PL330
+ select SDHCI
+ select SSI_M25P80
+ select USB_EHCI_SYSBUS
+ select XILINX # UART
+ select XILINX_AXI
+ select XILINX_SPI
+ select XILINX_SPIPS
+ select ZYNQ_DEVCFG
config ARM_V7M
bool
config ALLWINNER_A10
bool
+ select AHCI
+ select ALLWINNER_A10_PIT
+ select ALLWINNER_A10_PIC
+ select ALLWINNER_EMAC
+ select SERIAL
config RASPI
bool
+ select FRAMEBUFFER
+ select PL011 # UART
+ select SDHCI
config STM32F205_SOC
bool
+ select ARM_V7M
+ select STM32F2XX_TIMER
+ select STM32F2XX_USART
+ select STM32F2XX_SYSCFG
+ select STM32F2XX_ADC
+ select STM32F2XX_SPI
config XLNX_ZYNQMP_ARM
bool
+ select AHCI
+ select ARM_GIC
+ select CADENCE
+ select DDC
+ select DPCD
+ select SDHCI
+ select SSI
+ select SSI_M25P80
+ select XILINX_AXI
+ select XILINX_SPIPS
+ select XLNX_ZYNQMP
config XLNX_VERSAL
bool
+ select ARM_GIC
+ select PL011
+ select CADENCE
+ select VIRTIO_MMIO
config FSL_IMX25
bool
+ select IMX
+ select IMX_FEC
+ select IMX_I2C
+ select DS1338
config FSL_IMX31
bool
+ select SERIAL
+ select IMX
+ select IMX_I2C
+ select LAN9118
config FSL_IMX6
bool
+ select A9MPCORE
+ select IMX
+ select IMX_FEC
+ select IMX_I2C
+ select SDHCI
config ASPEED_SOC
bool
+ select DS1338
+ select FTGMAC100
+ select I2C
+ select PCA9552
+ select SERIAL
+ select SMBUS_EEPROM
+ select SSI
+ select SSI_M25P80
+ select TMP105
+ select TMP421
config MPS2
bool
+ select ARMSSE
+ select LAN9118
+ select MPS2_FPGAIO
+ select MPS2_SCC
+ select PL022 # Serial port
+ select PL080 # DMA controller
config FSL_IMX7
bool
+ imply PCI_DEVICES
+ imply TEST_DEVICES
+ select A15MPCORE
+ select PCI
+ select IMX
+ select IMX_FEC
+ select IMX_I2C
+ select PCI_EXPRESS_DESIGNWARE
+ select SDHCI
config ARM_SMMUV3
bool
config FSL_IMX6UL
bool
+ select A15MPCORE
+ select IMX
+ select IMX_FEC
+ select IMX_I2C
+ select SDHCI
+
+config MICROBIT
+ bool
+ select NRF51_SOC
config NRF51_SOC
bool
+ select I2C
+ select ARM_V7M
+
+config EMCRAFT_SF2
+ bool
+ select MSF2
+ select SSI_M25P80
config MSF2
bool
+ select ARM_V7M
select PTIMER
+ select SERIAL
+ select SSI
config ZAURUS
bool
+ select NAND
+ select ECC
config A9MPCORE
bool
+ select A9_GTIMER
+ select A9SCU # snoop control unit
+ select ARM_GIC
+ select ARM_MPTIMER
config A15MPCORE
bool
+ select ARM_GIC
config ARM11MPCORE
bool
+ select ARM11SCU
config ARMSSE
bool
+ select ARM_V7M
+ select ARMSSE_CPUID
+ select ARMSSE_MHU
+ select CMSDK_APB_TIMER
+ select CMSDK_APB_DUALTIMER
+ select CMSDK_APB_UART
+ select CMSDK_APB_WATCHDOG
+ select IOTKIT_SECCTL
+ select IOTKIT_SYSCTL
+ select IOTKIT_SYSINFO
+ select TZ_MPC
+ select TZ_MSC
+ select TZ_PPC
config ARMSSE_CPUID
bool
config ARMSSE_MHU
bool
-
-config MUSCA
- bool
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index fa57c7c770..994e67dd0d 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -1,21 +1,30 @@
-obj-y += boot.o sysbus-fdt.o
+obj-y += boot.o
+obj-$(CONFIG_PLATFORM_BUS) += sysbus-fdt.o
obj-$(CONFIG_ARM_VIRT) += virt.o
obj-$(CONFIG_ACPI) += virt-acpi-build.o
obj-$(CONFIG_DIGIC) += digic_boards.o
obj-$(CONFIG_EXYNOS4) += exynos4_boards.o
+obj-$(CONFIG_EMCRAFT_SF2) += msf2-som.o
obj-$(CONFIG_HIGHBANK) += highbank.o
obj-$(CONFIG_INTEGRATOR) += integratorcp.o
obj-$(CONFIG_MAINSTONE) += mainstone.o
+obj-$(CONFIG_MICROBIT) += microbit.o
obj-$(CONFIG_MUSICPAL) += musicpal.o
obj-$(CONFIG_NETDUINO2) += netduino2.o
obj-$(CONFIG_NSERIES) += nseries.o
-obj-$(CONFIG_OMAP) += omap_sx1.o palm.o
-obj-$(CONFIG_PXA2XX) += gumstix.o spitz.o tosa.o z2.o
+obj-$(CONFIG_SX1) += omap_sx1.o
+obj-$(CONFIG_CHEETAH) += palm.o
+obj-$(CONFIG_GUMSTIX) += gumstix.o
+obj-$(CONFIG_SPITZ) += spitz.o
+obj-$(CONFIG_TOSA) += tosa.o
+obj-$(CONFIG_Z2) += z2.o
obj-$(CONFIG_REALVIEW) += realview.o
obj-$(CONFIG_STELLARIS) += stellaris.o
-obj-$(CONFIG_STRONGARM) += collie.o
-obj-$(CONFIG_VERSATILE) += vexpress.o versatilepb.o
+obj-$(CONFIG_COLLIE) += collie.o
+obj-$(CONFIG_VERSATILE) += versatilepb.o
+obj-$(CONFIG_VEXPRESS) += vexpress.o
obj-$(CONFIG_ZYNQ) += xilinx_zynq.o
+obj-$(CONFIG_SABRELITE) += sabrelite.o
obj-$(CONFIG_ARM_V7M) += armv7m.o
obj-$(CONFIG_EXYNOS4) += exynos4210.o
@@ -30,14 +39,14 @@ obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zynqmp.o xlnx-zcu102.o
obj-$(CONFIG_XLNX_VERSAL) += xlnx-versal.o xlnx-versal-virt.o
obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o
obj-$(CONFIG_FSL_IMX31) += fsl-imx31.o kzm.o
-obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o sabrelite.o
+obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o
obj-$(CONFIG_ASPEED_SOC) += aspeed_soc.o aspeed.o
obj-$(CONFIG_MPS2) += mps2.o
obj-$(CONFIG_MPS2) += mps2-tz.o
-obj-$(CONFIG_MSF2) += msf2-soc.o msf2-som.o
+obj-$(CONFIG_MSF2) += msf2-soc.o
obj-$(CONFIG_MUSCA) += musca.o
obj-$(CONFIG_ARMSSE) += armsse.o
obj-$(CONFIG_FSL_IMX7) += fsl-imx7.o mcimx7d-sabre.o
obj-$(CONFIG_ARM_SMMUV3) += smmu-common.o smmuv3.o
obj-$(CONFIG_FSL_IMX6UL) += fsl-imx6ul.o mcimx6ul-evk.o
-obj-$(CONFIG_NRF51_SOC) += nrf51_soc.o microbit.o
+obj-$(CONFIG_NRF51_SOC) += nrf51_soc.o
diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h
index 19540f8f41..b160289cd1 100644
--- a/hw/arm/smmuv3-internal.h
+++ b/hw/arm/smmuv3-internal.h
@@ -18,8 +18,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef HW_ARM_SMMU_V3_INTERNAL_H
-#define HW_ARM_SMMU_V3_INTERNAL_H
+#ifndef HW_ARM_SMMUV3_INTERNAL_H
+#define HW_ARM_SMMUV3_INTERNAL_H
#include "hw/arm/smmu-common.h"
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index c236cd2d0a..dc1f113df2 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -26,10 +26,12 @@ config JAZZ_LED
config PL110
bool
+ select FRAMEBUFFER
config SII9022
bool
depends on I2C
+ select DDC
config SSD0303
bool
@@ -111,6 +113,7 @@ config VIRTIO_VGA
config DPCD
bool
+ select AUX
config ATI_VGA
bool
diff --git a/hw/display/ati.c b/hw/display/ati.c
index db409be3c9..75716dd944 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -16,6 +16,7 @@
* No 3D at all yet (maybe after 2D works, but feel free to improve it)
*/
+#include "qemu/osdep.h"
#include "ati_int.h"
#include "ati_regs.h"
#include "vga_regs.h"
diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
index fe3ae14864..d83c29c6d9 100644
--- a/hw/display/ati_2d.c
+++ b/hw/display/ati_2d.c
@@ -7,6 +7,7 @@
* This work is licensed under the GNU GPL license version 2 or later.
*/
+#include "qemu/osdep.h"
#include "ati_int.h"
#include "ati_regs.h"
#include "qemu/log.h"
diff --git a/hw/display/ati_dbg.c b/hw/display/ati_dbg.c
index 1e6c32624e..b045f81d06 100644
--- a/hw/display/ati_dbg.c
+++ b/hw/display/ati_dbg.c
@@ -1,3 +1,4 @@
+#include "qemu/osdep.h"
#include "ati_int.h"
#ifdef DEBUG_ATI
diff --git a/hw/display/ati_int.h b/hw/display/ati_int.h
index a6f3e20e63..2f426064cf 100644
--- a/hw/display/ati_int.h
+++ b/hw/display/ati_int.h
@@ -9,7 +9,6 @@
#ifndef ATI_INT_H
#define ATI_INT_H
-#include "qemu/osdep.h"
#include "hw/pci/pci.h"
#include "vga_int.h"
diff --git a/hw/display/vga_regs.h b/hw/display/vga_regs.h
index 16886f5eed..30a98b8736 100644
--- a/hw/display/vga_regs.h
+++ b/hw/display/vga_regs.h
@@ -14,8 +14,8 @@
*
*/
-#ifndef LINUX_VIDEO_VGA_H
-#define LINUX_VIDEO_VGA_H
+#ifndef HW_VGA_REGS_H
+#define HW_VGA_REGS_H
/* Some of the code below is taken from SVGAlib. The original,
unmodified copyright notice for that code is below. */
@@ -156,4 +156,4 @@
/* VGA graphics controller bit masks */
#define VGA_GR06_GRAPHICS_MODE 0x01
-#endif /* LINUX_VIDEO_VGA_H */
+#endif /* HW_VGA_REGS_H */
diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig
index 78a2008e3a..2bbd395813 100644
--- a/hw/i2c/Kconfig
+++ b/hw/i2c/Kconfig
@@ -7,7 +7,7 @@ config SMBUS_EEPROM
config VERSATILE_I2C
bool
- select I2C
+ select BITBANG_I2C
config ACPI_SMBUS
bool
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index a6aed7c131..9817888216 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -80,7 +80,7 @@ config Q35
select PC_ACPI
select PCI_EXPRESS_Q35
select LPC_ICH9
- select AHCI
+ select AHCI_ICH9
select DIMM
select SMBIOS
select VMPORT
diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h
index 0ff9095f32..3a694b186b 100644
--- a/hw/i386/amd_iommu.h
+++ b/hw/i386/amd_iommu.h
@@ -18,8 +18,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AMD_IOMMU_H_
-#define AMD_IOMMU_H_
+#ifndef AMD_IOMMU_H
+#define AMD_IOMMU_H
#include "hw/hw.h"
#include "hw/pci/pci.h"
diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
index ab47b6a7a3..5d9106b1ac 100644
--- a/hw/ide/Kconfig
+++ b/hw/ide/Kconfig
@@ -44,9 +44,13 @@ config MICRODRIVE
config AHCI
bool
+ select IDE_QDEV
+
+config AHCI_ICH9
+ bool
default y if PCI_DEVICES
depends on PCI
- select IDE_QDEV
+ select AHCI
config IDE_SII3112
bool
diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs
index a142add90e..faf04e0209 100644
--- a/hw/ide/Makefile.objs
+++ b/hw/ide/Makefile.objs
@@ -9,6 +9,6 @@ common-obj-$(CONFIG_IDE_MMIO) += mmio.o
common-obj-$(CONFIG_IDE_VIA) += via.o
common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
common-obj-$(CONFIG_AHCI) += ahci.o
-common-obj-$(CONFIG_AHCI) += ich.o
+common-obj-$(CONFIG_AHCI_ICH9) += ich.o
common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o
common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h
index 9b7fa8fc7d..95ecddcd3c 100644
--- a/hw/ide/ahci_internal.h
+++ b/hw/ide/ahci_internal.h
@@ -394,4 +394,4 @@ void ahci_reset(AHCIState *s);
#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
-#endif /* HW_IDE_AHCI_H */
+#endif /* HW_IDE_AHCI_INTERNAL_H */
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index e2e66f0858..889363d8ae 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -27,7 +27,12 @@ config VIRTIO_INPUT
config VIRTIO_INPUT_HOST
bool
default y
- depends on VIRTIO && LINUX
+ depends on VIRTIO_INPUT && LINUX
+
+config VHOST_USER_INPUT
+ bool
+ default y
+ depends on VIRTIO_INPUT && VHOST_USER
config TSC210X
bool
diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs
index c8b00f71ec..d1de307708 100644
--- a/hw/input/Makefile.objs
+++ b/hw/input/Makefile.objs
@@ -9,9 +9,8 @@ common-obj-$(CONFIG_TSC2005) += tsc2005.o
common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input.o
common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o
-ifeq ($(CONFIG_LINUX),y)
-common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-host.o
-endif
+common-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host.o
+common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o
obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o
diff --git a/hw/input/vhost-user-input.c b/hw/input/vhost-user-input.c
new file mode 100644
index 0000000000..6da497b1a8
--- /dev/null
+++ b/hw/input/vhost-user-input.c
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/error-report.h"
+#include "qapi/error.h"
+#include "qemu-common.h"
+
+#include "hw/qdev.h"
+#include "hw/virtio/virtio-input.h"
+
+static int vhost_input_config_change(struct vhost_dev *dev)
+{
+ error_report("vhost-user-input: unhandled backend config change");
+ return -1;
+}
+
+static const VhostDevConfigOps config_ops = {
+ .vhost_dev_config_notifier = vhost_input_config_change,
+};
+
+static void vhost_input_realize(DeviceState *dev, Error **errp)
+{
+ VHostUserInput *vhi = VHOST_USER_INPUT(dev);
+ VirtIOInput *vinput = VIRTIO_INPUT(dev);
+ VirtIODevice *vdev = VIRTIO_DEVICE(dev);
+
+ vhost_dev_set_config_notifier(&vhi->vhost->dev, &config_ops);
+ vinput->cfg_size = sizeof_field(virtio_input_config, u);
+ if (vhost_user_backend_dev_init(vhi->vhost, vdev, 2, errp) == -1) {
+ return;
+ }
+}
+
+static void vhost_input_change_active(VirtIOInput *vinput)
+{
+ VHostUserInput *vhi = VHOST_USER_INPUT(vinput);
+
+ if (vinput->active) {
+ vhost_user_backend_start(vhi->vhost);
+ } else {
+ vhost_user_backend_stop(vhi->vhost);
+ }
+}
+
+static void vhost_input_get_config(VirtIODevice *vdev, uint8_t *config_data)
+{
+ VirtIOInput *vinput = VIRTIO_INPUT(vdev);
+ VHostUserInput *vhi = VHOST_USER_INPUT(vdev);
+ int ret;
+
+ memset(config_data, 0, vinput->cfg_size);
+
+ ret = vhost_dev_get_config(&vhi->vhost->dev, config_data, vinput->cfg_size);
+ if (ret) {
+ error_report("vhost-user-input: get device config space failed");
+ return;
+ }
+}
+
+static void vhost_input_set_config(VirtIODevice *vdev,
+ const uint8_t *config_data)
+{
+ VHostUserInput *vhi = VHOST_USER_INPUT(vdev);
+ int ret;
+
+ ret = vhost_dev_set_config(&vhi->vhost->dev, config_data,
+ 0, sizeof(virtio_input_config),
+ VHOST_SET_CONFIG_TYPE_MASTER);
+ if (ret) {
+ error_report("vhost-user-input: set device config space failed");
+ return;
+ }
+
+ virtio_notify_config(vdev);
+}
+
+static const VMStateDescription vmstate_vhost_input = {
+ .name = "vhost-user-input",
+ .unmigratable = 1,
+};
+
+static void vhost_input_class_init(ObjectClass *klass, void *data)
+{
+ VirtIOInputClass *vic = VIRTIO_INPUT_CLASS(klass);
+ VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
+ DeviceClass *dc = DEVICE_CLASS(klass);
+
+ dc->vmsd = &vmstate_vhost_input;
+ vdc->get_config = vhost_input_get_config;
+ vdc->set_config = vhost_input_set_config;
+ vic->realize = vhost_input_realize;
+ vic->change_active = vhost_input_change_active;
+}
+
+static void vhost_input_init(Object *obj)
+{
+ VHostUserInput *vhi = VHOST_USER_INPUT(obj);
+
+ vhi->vhost = VHOST_USER_BACKEND(object_new(TYPE_VHOST_USER_BACKEND));
+ object_property_add_alias(obj, "chardev",
+ OBJECT(vhi->vhost), "chardev", &error_abort);
+}
+
+static void vhost_input_finalize(Object *obj)
+{
+ VHostUserInput *vhi = VHOST_USER_INPUT(obj);
+
+ object_unref(OBJECT(vhi->vhost));
+}
+
+static const TypeInfo vhost_input_info = {
+ .name = TYPE_VHOST_USER_INPUT,
+ .parent = TYPE_VIRTIO_INPUT,
+ .instance_size = sizeof(VHostUserInput),
+ .instance_init = vhost_input_init,
+ .instance_finalize = vhost_input_finalize,
+ .class_init = vhost_input_class_init,
+};
+
+static void vhost_input_register_types(void)
+{
+ type_register_static(&vhost_input_info);
+}
+
+type_init(vhost_input_register_types)
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 5f67d0d6d9..385e1b0cec 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -76,6 +76,8 @@ config ECCMEMCTL
config IMX
bool
select PTIMER
+ select SSI
+ select USB_EHCI_SYSBUS
config STM32F2XX_SYSCFG
bool
diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c
index b941a0e842..c04a5df651 100644
--- a/hw/pci/pci-stub.c
+++ b/hw/pci/pci-stub.c
@@ -53,3 +53,14 @@ uint16_t pci_requester_id(PCIDevice *dev)
g_assert(false);
return 0;
}
+
+/* Required by ahci.c */
+bool msi_enabled(const PCIDevice *dev)
+{
+ return false;
+}
+
+void msi_notify(PCIDevice *dev, unsigned int vector)
+{
+ g_assert_not_reached();
+}
diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h
index 2d42249691..e7babe96cb 100644
--- a/hw/rdma/rdma_utils.h
+++ b/hw/rdma/rdma_utils.h
@@ -20,7 +20,6 @@
#include "qemu/error-report.h"
#include "hw/pci/pci.h"
#include "sysemu/dma.h"
-#include "stdio.h"
#define rdma_error_report(fmt, ...) \
error_report("%s: " fmt, "rdma", ## __VA_ARGS__)
diff --git a/hw/rdma/vmw/pvrdma_qp_ops.h b/hw/rdma/vmw/pvrdma_qp_ops.h
index 82e720a76f..bf2b15c5ce 100644
--- a/hw/rdma/vmw/pvrdma_qp_ops.h
+++ b/hw/rdma/vmw/pvrdma_qp_ops.h
@@ -13,8 +13,8 @@
*
*/
-#ifndef PVRDMA_QP_H
-#define PVRDMA_QP_H
+#ifndef PVRDMA_QP_OPS_H
+#define PVRDMA_QP_OPS_H
#include "pvrdma.h"
diff --git a/hw/sd/sdmmc-internal.h b/hw/sd/sdmmc-internal.h
index 9aa04766fc..d8bf17d204 100644
--- a/hw/sd/sdmmc-internal.h
+++ b/hw/sd/sdmmc-internal.h
@@ -7,8 +7,9 @@
* See the COPYING file in the top-level directory.
* SPDX-License-Identifier: GPL-2.0-or-later
*/
-#ifndef SD_INTERNAL_H
-#define SD_INTERNAL_H
+
+#ifndef SDMMC_INTERNAL_H
+#define SDMMC_INTERNAL_H
#define SDMMC_CMD_MAX 64
diff --git a/hw/timer/m48t59-internal.h b/hw/timer/m48t59-internal.h
index d0f0caf3c7..4d4f2a6fed 100644
--- a/hw/timer/m48t59-internal.h
+++ b/hw/timer/m48t59-internal.h
@@ -22,8 +22,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
#ifndef HW_M48T59_INTERNAL_H
-#define HW_M48T59_INTERNAL_H 1
+#define HW_M48T59_INTERNAL_H
#define M48T59_DEBUG 0
diff --git a/hw/tpm/tpm_ioctl.h b/hw/tpm/tpm_ioctl.h
index 59a0b0595d..f5f5c553a9 100644
--- a/hw/tpm/tpm_ioctl.h
+++ b/hw/tpm/tpm_ioctl.h
@@ -5,8 +5,9 @@
*
* This file is licensed under the terms of the 3-clause BSD license
*/
-#ifndef _TPM_IOCTL_H_
-#define _TPM_IOCTL_H_
+
+#ifndef TPM_IOCTL_H
+#define TPM_IOCTL_H
#include <sys/uio.h>
#include <sys/ioctl.h>
@@ -267,4 +268,4 @@ enum {
CMD_SET_BUFFERSIZE,
};
-#endif /* _TPM_IOCTL_H */
+#endif /* TPM_IOCTL_H */
diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index f2ab667a21..5570ea8df8 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -17,6 +17,7 @@ obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
ifeq ($(CONFIG_VIRTIO_PCI),y)
obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-pci.o
obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
+obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input-pci.o
obj-$(CONFIG_VHOST_USER_SCSI) += vhost-user-scsi-pci.o
obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-pci.o
obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
diff --git a/hw/virtio/vhost-user-input-pci.c b/hw/virtio/vhost-user-input-pci.c
new file mode 100644
index 0000000000..ae9cff9aed
--- /dev/null
+++ b/hw/virtio/vhost-user-input-pci.c
@@ -0,0 +1,50 @@
+/*
+ * This work is licensed under the terms of the GNU LGPL, version 2 or
+ * later. See the COPYING.LIB file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+
+#include "hw/virtio/virtio.h"
+#include "hw/virtio/virtio-input.h"
+#include "qapi/error.h"
+#include "qemu/error-report.h"
+#include "virtio-pci.h"
+
+typedef struct VHostUserInputPCI VHostUserInputPCI;
+
+#define TYPE_VHOST_USER_INPUT_PCI "vhost-user-input-pci"
+
+#define VHOST_USER_INPUT_PCI(obj) \
+ OBJECT_CHECK(VHostUserInputPCI, (obj), TYPE_VHOST_USER_INPUT_PCI)
+
+struct VHostUserInputPCI {
+ VirtIOPCIProxy parent_obj;
+ VHostUserInput vhi;
+};
+
+static void vhost_user_input_pci_instance_init(Object *obj)
+{
+ VHostUserInputPCI *dev = VHOST_USER_INPUT_PCI(obj);
+
+ virtio_instance_init_common(obj, &dev->vhi, sizeof(dev->vhi),
+ TYPE_VHOST_USER_INPUT);
+
+ object_property_add_alias(obj, "chardev",
+ OBJECT(&dev->vhi), "chardev",
+ &error_abort);
+}
+
+static const VirtioPCIDeviceTypeInfo vhost_user_input_pci_info = {
+ .generic_name = TYPE_VHOST_USER_INPUT_PCI,
+ .parent = TYPE_VIRTIO_INPUT_PCI,
+ .instance_size = sizeof(VHostUserInputPCI),
+ .instance_init = vhost_user_input_pci_instance_init,
+};
+
+static void vhost_user_input_pci_register(void)
+{
+ virtio_pci_types_register(&vhost_user_input_pci_info);
+}
+
+type_init(vhost_user_input_pci_register)
diff --git a/hw/virtio/virtio-input-host-pci.c b/hw/virtio/virtio-input-host-pci.c
index 725a51ad30..124c4f3447 100644
--- a/hw/virtio/virtio-input-host-pci.c
+++ b/hw/virtio/virtio-input-host-pci.c
@@ -13,7 +13,7 @@
typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
-#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci-base"
+#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
#define VIRTIO_INPUT_HOST_PCI(obj) \
OBJECT_CHECK(VirtIOInputHostPCI, (obj), TYPE_VIRTIO_INPUT_HOST_PCI)
@@ -31,10 +31,7 @@ static void virtio_host_initfn(Object *obj)
}
static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
- .base_name = TYPE_VIRTIO_INPUT_HOST_PCI,
- .generic_name = "virtio-input-host-pci",
- .transitional_name = "virtio-input-host-pci-transitional",
- .non_transitional_name = "virtio-input-host-pci-non-transitional",
+ .generic_name = TYPE_VIRTIO_INPUT_HOST_PCI,
.parent = TYPE_VIRTIO_INPUT_PCI,
.instance_size = sizeof(VirtIOInputHostPCI),
.instance_init = virtio_host_initfn,
diff --git a/hw/xtensa/xtensa_memory.h b/hw/xtensa/xtensa_memory.h
index e9aa08749d..89125c4a0d 100644
--- a/hw/xtensa/xtensa_memory.h
+++ b/hw/xtensa/xtensa_memory.h
@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _XTENSA_MEMORY_H
-#define _XTENSA_MEMORY_H
+#ifndef XTENSA_MEMORY_H
+#define XTENSA_MEMORY_H
#include "qemu-common.h"
#include "cpu.h"