mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
* Linux header upgrade (Peter)
* firmware.json definition (Laszlo) * IPMI migration fix (Corey) * QOM improvements (Alexey, Philippe, me) * Memory API cleanups (Jay, me, Tristan, Peter) * WHPX fixes and improvements (Lucian) * Chardev fixes (Marc-André) * IOMMU documentation improvements (Peter) * Coverity fixes (Peter, Philippe) * Include cleanup (Philippe) * -clock deprecation (Thomas) * Disable -sandbox unless CONFIG_SECCOMP (Yi Min Zhao) * Configurability improvements (me) -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAlsRd2UUHHBib256aW5p QHJlZGhhdC5jb20ACgkQv/vSX3jHroPG8Qf+M85E8xAQ/bhs90tAymuXkUUsTIFF uI76K8eM0K3b2B+vGckxh1gyN5O3GQaMEDL7vITfqbX+EOH5U2lv8V9JRzf2YvbG Zahjd4pOCYzR0b9JENA1r5U/J8RntNrBNXlKmGTaXOaw9VCXlZyvgVd9CE3z/e2M 0jSXMBdF4LB3UzECI24Va8ejJxdSiJcqXA2j3J+pJFxI698i+Z5eBBKnRdo5TVe5 jl0TYEsbS6CLwhmbLXmt3Qhq+ocZn7YH9X3HjkHEdqDUeYWyT9jwUpa7OHFrIEKC ikWm9er4YDzG/vOC0dqwKbShFzuTpTJuMz5Mj4v8JjM/iQQFrp4afjcW2g== =RS/B -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging * Linux header upgrade (Peter) * firmware.json definition (Laszlo) * IPMI migration fix (Corey) * QOM improvements (Alexey, Philippe, me) * Memory API cleanups (Jay, me, Tristan, Peter) * WHPX fixes and improvements (Lucian) * Chardev fixes (Marc-André) * IOMMU documentation improvements (Peter) * Coverity fixes (Peter, Philippe) * Include cleanup (Philippe) * -clock deprecation (Thomas) * Disable -sandbox unless CONFIG_SECCOMP (Yi Min Zhao) * Configurability improvements (me) # gpg: Signature made Fri 01 Jun 2018 17:42:13 BST # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (56 commits) hw: make virtio devices configurable via default-configs/ hw: allow compiling out SCSI memory: Make operations using MemoryRegionIoeventfd struct pass by pointer. char: Remove unwanted crlf conversion qdev: Remove DeviceClass::init() and ::exit() qdev: Simplify the SysBusDeviceClass::init path hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init hw/i2c/smbus: Use DeviceClass::realize instead of SMBusDeviceClass::init target/i386/kvm.c: Remove compatibility shim for KVM_HINTS_REALTIME Update Linux headers to 4.17-rc6 target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED scripts/update-linux-headers: Handle kernel license no longer being one file scripts/update-linux-headers: Handle __aligned_u64 virtio-gpu-3d: Define VIRTIO_GPU_CAPSET_VIRGL2 elsewhere gdbstub: Prevent fd leakage docs/interop: add "firmware.json" ipmi: Use proper struct reference for KCS vmstate vmstate: Add a VSTRUCT type tcg: remove softfloat from --disable-tcg builds qemu-options: Mark the non-functional -clock option as deprecated ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
afd76ffba9
215 changed files with 1713 additions and 901 deletions
|
@ -1,3 +1,4 @@
|
|||
ifeq ($(call lor,$(CONFIG_VIRTIO_9P),$(CONFIG_XEN)),y)
|
||||
common-obj-y = 9p.o 9p-util.o
|
||||
common-obj-y += 9p-local.o 9p-xattr.o
|
||||
common-obj-y += 9p-xattr-user.o 9p-posix-acl.o
|
||||
|
@ -5,6 +6,7 @@ common-obj-y += coth.o cofs.o codir.o cofile.o
|
|||
common-obj-y += coxattr.o 9p-synth.o
|
||||
common-obj-$(CONFIG_OPEN_BY_HANDLE) += 9p-handle.o
|
||||
common-obj-y += 9p-proxy.o
|
||||
common-obj-$(CONFIG_XEN) += xen-9p-backend.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_VIRTIO) += virtio-9p-device.o
|
||||
common-obj-$(CONFIG_XEN) += xen-9p-backend.o
|
||||
obj-$(CONFIG_VIRTIO_9P) += virtio-9p-device.o
|
||||
|
|
|
@ -23,7 +23,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += nvram/
|
|||
devices-dirs-$(CONFIG_SOFTMMU) += pci/
|
||||
devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
|
||||
devices-dirs-$(CONFIG_SOFTMMU) += pcmcia/
|
||||
devices-dirs-$(CONFIG_SOFTMMU) += scsi/
|
||||
devices-dirs-$(CONFIG_SCSI) += scsi/
|
||||
devices-dirs-$(CONFIG_SOFTMMU) += sd/
|
||||
devices-dirs-$(CONFIG_SOFTMMU) += ssi/
|
||||
devices-dirs-$(CONFIG_SOFTMMU) += timer/
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#include "hw/acpi/acpi.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "exec/ioport.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/pci/pci_bus.h"
|
||||
#include "qapi/error.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "sysemu/sysemu.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/range.h"
|
||||
#include "exec/ioport.h"
|
||||
#include "hw/nvram/fw_cfg.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/acpi/piix4.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "hw/boards.h"
|
||||
#include "qemu/log.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "hw/loader.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "hw/arm/bcm2836.h"
|
||||
#include "hw/arm/raspi_platform.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
/* Peripheral base address seen by the CPU */
|
||||
#define BCM2836_PERI_BASE 0x3F000000
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "strongarm.h"
|
||||
#include "hw/arm/arm.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "cpu.h"
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "hw/block/flash.h"
|
||||
#include "hw/devices.h"
|
||||
#include "hw/boards.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "cpu.h"
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "hw/devices.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/qtest.h"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/bt.h"
|
||||
#include "hw/loader.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "qemu/log.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
#include "hw/arm/omap.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/arm/soc_dma.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "qemu/range.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/hw.h"
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "hw/boards.h"
|
||||
#include "hw/arm/arm.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "cpu.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "hw/i2c/i2c.h"
|
||||
#include "hw/ssi/ssi.h"
|
||||
#include "chardev/char-fe.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "qemu/cutils.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "hw/audio/wm8750.h"
|
||||
#include "audio/audio.h"
|
||||
#include "hw/boards.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "cpu.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "hw/boards.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "hw/boards.h"
|
||||
#include "hw/loader.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/device_tree.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "hw/vfio/vfio-amd-xgbe.h"
|
||||
#include "hw/devices.h"
|
||||
#include "net/net.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/device_tree.h"
|
||||
#include "sysemu/numa.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "sysemu/sysemu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/loader.h"
|
||||
#include "hw/misc/zynq-xadc.h"
|
||||
#include "hw/ssi/ssi.h"
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "hw/arm/xlnx-zynqmp.h"
|
||||
#include "hw/boards.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/log.h"
|
||||
#include "sysemu/qtest.h"
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "hw/boards.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "ui/console.h"
|
||||
#include "hw/audio/wm8750.h"
|
||||
#include "audio/audio.h"
|
||||
|
|
|
@ -617,14 +617,12 @@ static const VMStateDescription vmstate_wm8750 = {
|
|||
}
|
||||
};
|
||||
|
||||
static int wm8750_init(I2CSlave *i2c)
|
||||
static void wm8750_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
WM8750State *s = WM8750(i2c);
|
||||
WM8750State *s = WM8750(dev);
|
||||
|
||||
AUD_register_card(CODEC, &s->card);
|
||||
wm8750_reset(I2C_SLAVE(s));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -707,7 +705,7 @@ static void wm8750_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
I2CSlaveClass *sc = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
sc->init = wm8750_init;
|
||||
dc->realize = wm8750_realize;
|
||||
sc->event = wm8750_event;
|
||||
sc->recv = wm8750_rx;
|
||||
sc->send = wm8750_tx;
|
||||
|
|
|
@ -11,8 +11,6 @@ common-obj-$(CONFIG_NVME_PCI) += nvme.o
|
|||
|
||||
obj-$(CONFIG_SH4) += tc58128.o
|
||||
|
||||
obj-$(CONFIG_VIRTIO) += virtio-blk.o
|
||||
obj-$(CONFIG_VIRTIO) += dataplane/
|
||||
ifeq ($(CONFIG_VIRTIO),y)
|
||||
obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o
|
||||
obj-$(CONFIG_VIRTIO_BLK) += dataplane/
|
||||
obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o
|
||||
endif
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "qemu/thread.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/virtio/virtio-access.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/virtio/virtio-blk.h"
|
||||
#include "virtio-blk.h"
|
||||
#include "block/aio.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "hw/hw.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "hw/ssi/ssi.h"
|
||||
#include "qemu/bitops.h"
|
||||
#include "qemu/log.h"
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "sysemu/block-backend.h"
|
||||
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "trace.h"
|
||||
#include "nvme.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef HW_NVME_H
|
||||
#define HW_NVME_H
|
||||
#include "qemu/cutils.h"
|
||||
#include "block/nvme.h"
|
||||
|
||||
typedef struct NvmeAsyncEvent {
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include "hw/block/flash.h"
|
||||
#include "hw/irq.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "exec/memory.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "qapi/error.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/bitops.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/host-utils.h"
|
||||
#include "qemu/log.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "qapi/error.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/host-utils.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "qemu/error-report.h"
|
||||
#include "trace.h"
|
||||
#include "hw/block/block.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "hw/virtio/virtio-blk.h"
|
||||
#include "dataplane/virtio-blk.h"
|
||||
|
|
|
@ -6,7 +6,7 @@ common-obj-$(CONFIG_PL011) += pl011.o
|
|||
common-obj-$(CONFIG_SERIAL) += serial.o
|
||||
common-obj-$(CONFIG_SERIAL_ISA) += serial-isa.o
|
||||
common-obj-$(CONFIG_SERIAL_PCI) += serial-pci.o
|
||||
common-obj-$(CONFIG_VIRTIO) += virtio-console.o
|
||||
common-obj-$(CONFIG_VIRTIO_SERIAL) += virtio-console.o
|
||||
common-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
|
||||
common-obj-$(CONFIG_XEN) += xen_console.o
|
||||
common-obj-$(CONFIG_CADENCE) += cadence_uart.o
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "hw/sysbus.h"
|
||||
#include "hw/m68k/mcf.h"
|
||||
#include "chardev/char-fe.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
typedef struct {
|
||||
SysBusDevice parent_obj;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "chardev/char-serial.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
//#define DEBUG_SERIAL
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/sh4/sh.h"
|
||||
#include "chardev/char-fe.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
//#define DEBUG_SERIAL
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "exec/memory.h"
|
||||
#include "hw/loader.h"
|
||||
#include "hw/loader-fit.h"
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/platform-bus.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/block/block.h"
|
||||
#include "net/hub.h"
|
||||
#include "qapi/visitor.h"
|
||||
|
|
|
@ -208,32 +208,6 @@ void device_listener_unregister(DeviceListener *listener)
|
|||
QTAILQ_REMOVE(&device_listeners, listener, link);
|
||||
}
|
||||
|
||||
static void device_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_GET_CLASS(dev);
|
||||
|
||||
if (dc->init) {
|
||||
int rc = dc->init(dev);
|
||||
if (rc < 0) {
|
||||
error_setg(errp, "Device initialization failed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void device_unrealize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_GET_CLASS(dev);
|
||||
|
||||
if (dc->exit) {
|
||||
int rc = dc->exit(dev);
|
||||
if (rc < 0) {
|
||||
error_setg(errp, "Device exit failed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id,
|
||||
int required_for_version)
|
||||
{
|
||||
|
@ -1065,8 +1039,6 @@ static void device_class_init(ObjectClass *class, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(class);
|
||||
|
||||
class->unparent = device_unparent;
|
||||
dc->realize = device_realize;
|
||||
dc->unrealize = device_unrealize;
|
||||
|
||||
/* by default all devices were considered as hotpluggable,
|
||||
* so with intent to check it in generic qdev_unplug() /
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "monitor/monitor.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
@ -200,15 +201,18 @@ void sysbus_init_ioports(SysBusDevice *dev, uint32_t ioport, uint32_t size)
|
|||
}
|
||||
}
|
||||
|
||||
static int sysbus_device_init(DeviceState *dev)
|
||||
/* TODO remove once all sysbus devices have been converted to realize */
|
||||
static void sysbus_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
SysBusDevice *sd = SYS_BUS_DEVICE(dev);
|
||||
SysBusDeviceClass *sbc = SYS_BUS_DEVICE_GET_CLASS(sd);
|
||||
|
||||
if (!sbc->init) {
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
if (sbc->init(sd) < 0) {
|
||||
error_setg(errp, "Device initialization failed");
|
||||
}
|
||||
return sbc->init(sd);
|
||||
}
|
||||
|
||||
DeviceState *sysbus_create_varargs(const char *name,
|
||||
|
@ -324,7 +328,7 @@ MemoryRegion *sysbus_address_space(SysBusDevice *dev)
|
|||
static void sysbus_device_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *k = DEVICE_CLASS(klass);
|
||||
k->init = sysbus_device_init;
|
||||
k->realize = sysbus_realize;
|
||||
k->bus_type = TYPE_SYSTEM_BUS;
|
||||
/*
|
||||
* device_add plugs devices into a suitable bus. For "real" buses,
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "hw/loader.h"
|
||||
#include "elf.h"
|
||||
#include "boot.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
|
|
@ -36,8 +36,8 @@ obj-$(CONFIG_VGA) += vga.o
|
|||
|
||||
common-obj-$(CONFIG_QXL) += qxl.o qxl-logger.o qxl-render.o
|
||||
|
||||
obj-$(CONFIG_VIRTIO) += virtio-gpu.o virtio-gpu-3d.o
|
||||
obj-$(CONFIG_VIRTIO_PCI) += virtio-gpu-pci.o
|
||||
obj-$(CONFIG_VIRTIO_GPU) += virtio-gpu.o virtio-gpu-3d.o
|
||||
obj-$(call land,$(CONFIG_VIRTIO_GPU),$(CONFIG_VIRTIO_PCI)) += virtio-gpu-pci.o
|
||||
obj-$(CONFIG_VIRTIO_VGA) += virtio-vga.o
|
||||
virtio-gpu.o-cflags := $(VIRGL_CFLAGS)
|
||||
virtio-gpu.o-libs += $(VIRGL_LIBS)
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#include "qemu/range.h"
|
||||
#include "ui/pixel_ops.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
/*
|
||||
* Status: 2010/05/07
|
||||
|
|
|
@ -297,13 +297,12 @@ static const GraphicHwOps ssd0303_ops = {
|
|||
.gfx_update = ssd0303_update_display,
|
||||
};
|
||||
|
||||
static int ssd0303_init(I2CSlave *i2c)
|
||||
static void ssd0303_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
ssd0303_state *s = SSD0303(i2c);
|
||||
ssd0303_state *s = SSD0303(dev);
|
||||
|
||||
s->con = graphic_console_init(DEVICE(i2c), 0, &ssd0303_ops, s);
|
||||
s->con = graphic_console_init(dev, 0, &ssd0303_ops, s);
|
||||
qemu_console_resize(s->con, 96 * MAGNIFY, 16 * MAGNIFY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ssd0303_class_init(ObjectClass *klass, void *data)
|
||||
|
@ -311,7 +310,7 @@ static void ssd0303_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
k->init = ssd0303_init;
|
||||
dc->realize = ssd0303_realize;
|
||||
k->event = ssd0303_event;
|
||||
k->recv = ssd0303_recv;
|
||||
k->send = ssd0303_send;
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "hw/block/flash.h"
|
||||
#include "ui/console.h"
|
||||
#include "ui/pixel_ops.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
|
||||
#define IRQ_TC6393_NAND 0
|
||||
|
|
|
@ -182,14 +182,13 @@ static void max7310_gpio_set(void *opaque, int line, int level)
|
|||
|
||||
/* MAX7310 is SMBus-compatible (can be used with only SMBus protocols),
|
||||
* but also accepts sequences that are not SMBus so return an I2C device. */
|
||||
static int max7310_init(I2CSlave *i2c)
|
||||
static void max7310_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
MAX7310State *s = MAX7310(i2c);
|
||||
I2CSlave *i2c = I2C_SLAVE(dev);
|
||||
MAX7310State *s = MAX7310(dev);
|
||||
|
||||
qdev_init_gpio_in(&i2c->qdev, max7310_gpio_set, 8);
|
||||
qdev_init_gpio_out(&i2c->qdev, s->handler, 8);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void max7310_class_init(ObjectClass *klass, void *data)
|
||||
|
@ -197,7 +196,7 @@ static void max7310_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
k->init = max7310_init;
|
||||
dc->realize = max7310_realize;
|
||||
k->event = max7310_event;
|
||||
k->recv = max7310_rx;
|
||||
k->send = max7310_tx;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#ifndef HW_HPPA_SYS_H
|
||||
#define HW_HPPA_SYS_H
|
||||
|
||||
#include "target/hppa/cpu-qom.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/pci/pci_host.h"
|
||||
#include "hw/ide.h"
|
||||
|
|
|
@ -258,18 +258,6 @@ const VMStateDescription vmstate_i2c_slave = {
|
|||
}
|
||||
};
|
||||
|
||||
static int i2c_slave_qdev_init(DeviceState *dev)
|
||||
{
|
||||
I2CSlave *s = I2C_SLAVE(dev);
|
||||
I2CSlaveClass *sc = I2C_SLAVE_GET_CLASS(s);
|
||||
|
||||
if (sc->init) {
|
||||
return sc->init(s);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr)
|
||||
{
|
||||
DeviceState *dev;
|
||||
|
@ -283,7 +271,6 @@ DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr)
|
|||
static void i2c_slave_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *k = DEVICE_CLASS(klass);
|
||||
k->init = i2c_slave_qdev_init;
|
||||
set_bit(DEVICE_CATEGORY_MISC, k->categories);
|
||||
k->bus_type = TYPE_I2C_BUS;
|
||||
k->props = i2c_props;
|
||||
|
|
|
@ -202,14 +202,6 @@ static int smbus_i2c_send(I2CSlave *s, uint8_t data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int smbus_device_init(I2CSlave *i2c)
|
||||
{
|
||||
SMBusDevice *dev = SMBUS_DEVICE(i2c);
|
||||
SMBusDeviceClass *sc = SMBUS_DEVICE_GET_CLASS(dev);
|
||||
|
||||
return sc->init(dev);
|
||||
}
|
||||
|
||||
/* Master device commands. */
|
||||
int smbus_quick_command(I2CBus *bus, uint8_t addr, int read)
|
||||
{
|
||||
|
@ -350,7 +342,6 @@ static void smbus_device_class_init(ObjectClass *klass, void *data)
|
|||
{
|
||||
I2CSlaveClass *sc = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
sc->init = smbus_device_init;
|
||||
sc->event = smbus_i2c_event;
|
||||
sc->recv = smbus_i2c_recv;
|
||||
sc->send = smbus_i2c_send;
|
||||
|
|
|
@ -97,12 +97,11 @@ static uint8_t eeprom_read_data(SMBusDevice *dev, uint8_t cmd, int n)
|
|||
return eeprom_receive_byte(dev);
|
||||
}
|
||||
|
||||
static int smbus_eeprom_initfn(SMBusDevice *dev)
|
||||
static void smbus_eeprom_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
SMBusEEPROMDevice *eeprom = (SMBusEEPROMDevice *)dev;
|
||||
|
||||
eeprom->offset = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Property smbus_eeprom_properties[] = {
|
||||
|
@ -115,7 +114,7 @@ static void smbus_eeprom_class_initfn(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
SMBusDeviceClass *sc = SMBUS_DEVICE_CLASS(klass);
|
||||
|
||||
sc->init = smbus_eeprom_initfn;
|
||||
dc->realize = smbus_eeprom_realize;
|
||||
sc->quick_cmd = eeprom_quick_cmd;
|
||||
sc->send_byte = eeprom_send_byte;
|
||||
sc->receive_byte = eeprom_receive_byte;
|
||||
|
|
|
@ -293,7 +293,7 @@ static void kvm_pit_realizefn(DeviceState *dev, Error **errp)
|
|||
return;
|
||||
}
|
||||
|
||||
memory_region_init_reservation(&pit->ioports, NULL, "kvm-pit", 4);
|
||||
memory_region_init_io(&pit->ioports, OBJECT(dev), NULL, NULL, "kvm-pit", 4);
|
||||
|
||||
qdev_init_gpio_in(dev, kvm_pit_irq_control, 1);
|
||||
|
||||
|
|
|
@ -121,8 +121,8 @@ static void kvm_pic_realize(DeviceState *dev, Error **errp)
|
|||
PICCommonState *s = PIC_COMMON(dev);
|
||||
KVMPICClass *kpc = KVM_PIC_GET_CLASS(dev);
|
||||
|
||||
memory_region_init_reservation(&s->base_io, NULL, "kvm-pic", 2);
|
||||
memory_region_init_reservation(&s->elcr_io, NULL, "kvm-elcr", 1);
|
||||
memory_region_init_io(&s->base_io, OBJECT(dev), NULL, NULL, "kvm-pic", 2);
|
||||
memory_region_init_io(&s->elcr_io, OBJECT(dev), NULL, NULL, "kvm-elcr", 1);
|
||||
|
||||
kpc->parent_realize(dev, errp);
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ static void kvm_ioapic_realize(DeviceState *dev, Error **errp)
|
|||
{
|
||||
IOAPICCommonState *s = IOAPIC_COMMON(dev);
|
||||
|
||||
memory_region_init_reservation(&s->io_memory, NULL, "kvm-ioapic", 0x1000);
|
||||
memory_region_init_io(&s->io_memory, OBJECT(dev), NULL, NULL, "kvm-ioapic", 0x1000);
|
||||
/*
|
||||
* KVM ioapic only supports 0x11 now. This will only be used when
|
||||
* we want to dump ioapic version.
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#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/hw_accel.h"
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#include "hw/acpi/acpi.h"
|
||||
#include "hw/acpi/cpu_hotplug.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/pci/pci_host.h"
|
||||
#include "acpi-build.h"
|
||||
#include "hw/mem/pc-dimm.h"
|
||||
#include "qapi/error.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <sys/resource.h>
|
||||
|
||||
#include "hw/xen/xen_backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "qemu/bitmap.h"
|
||||
|
||||
#include <xen/hvm/params.h>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/timer.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/ide/pci.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/dma.h"
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ common-obj-y += ps2.o
|
|||
common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
|
||||
common-obj-$(CONFIG_TSC2005) += tsc2005.o
|
||||
|
||||
common-obj-$(CONFIG_VIRTIO) += virtio-input.o
|
||||
common-obj-$(CONFIG_VIRTIO) += virtio-input-hid.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) += virtio-input-host.o
|
||||
common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-host.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
|
||||
|
|
|
@ -464,20 +464,19 @@ static const VMStateDescription vmstate_lm_kbd = {
|
|||
};
|
||||
|
||||
|
||||
static int lm8323_init(I2CSlave *i2c)
|
||||
static void lm8323_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
LM823KbdState *s = LM8323(i2c);
|
||||
LM823KbdState *s = LM8323(dev);
|
||||
|
||||
s->model = 0x8323;
|
||||
s->pwm.tm[0] = timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm0_tick, s);
|
||||
s->pwm.tm[1] = timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm1_tick, s);
|
||||
s->pwm.tm[2] = timer_new_ns(QEMU_CLOCK_VIRTUAL, lm_kbd_pwm2_tick, s);
|
||||
qdev_init_gpio_out(DEVICE(i2c), &s->nirq, 1);
|
||||
qdev_init_gpio_out(dev, &s->nirq, 1);
|
||||
|
||||
lm_kbd_reset(s);
|
||||
|
||||
qemu_register_reset((void *) lm_kbd_reset, s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void lm832x_key_event(DeviceState *dev, int key, int state)
|
||||
|
@ -505,7 +504,7 @@ static void lm8323_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
k->init = lm8323_init;
|
||||
dc->realize = lm8323_realize;
|
||||
k->event = lm_i2c_event;
|
||||
k->recv = lm_i2c_rx;
|
||||
k->send = lm_i2c_tx;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/ipmi/ipmi.h"
|
||||
|
@ -422,24 +423,69 @@ static void ipmi_isa_realize(DeviceState *dev, Error **errp)
|
|||
isa_register_ioport(isadev, &iik->kcs.io, iik->kcs.io_base);
|
||||
}
|
||||
|
||||
const VMStateDescription vmstate_ISAIPMIKCSDevice = {
|
||||
static int ipmi_kcs_vmstate_post_load(void *opaque, int version)
|
||||
{
|
||||
IPMIKCS *ik = opaque;
|
||||
|
||||
/* Make sure all the values are sane. */
|
||||
if (ik->outpos >= MAX_IPMI_MSG_SIZE || ik->outlen >= MAX_IPMI_MSG_SIZE ||
|
||||
ik->outpos >= ik->outlen) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"ipmi:kcs: vmstate transfer received bad out values: %d %d\n",
|
||||
ik->outpos, ik->outlen);
|
||||
ik->outpos = 0;
|
||||
ik->outlen = 0;
|
||||
}
|
||||
|
||||
if (ik->inlen >= MAX_IPMI_MSG_SIZE) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"ipmi:kcs: vmstate transfer received bad in value: %d\n",
|
||||
ik->inlen);
|
||||
ik->inlen = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool vmstate_kcs_before_version2(void *opaque, int version)
|
||||
{
|
||||
return version <= 1;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_IPMIKCS = {
|
||||
.name = TYPE_IPMI_INTERFACE_PREFIX "kcs",
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = ipmi_kcs_vmstate_post_load,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_BOOL(obf_irq_set, IPMIKCS),
|
||||
VMSTATE_BOOL(atn_irq_set, IPMIKCS),
|
||||
VMSTATE_UNUSED_TEST(vmstate_kcs_before_version2, 1), /* Was use_irq */
|
||||
VMSTATE_BOOL(irqs_enabled, IPMIKCS),
|
||||
VMSTATE_UINT32(outpos, IPMIKCS),
|
||||
VMSTATE_UINT32_V(outlen, IPMIKCS, 2),
|
||||
VMSTATE_UINT8_ARRAY(outmsg, IPMIKCS, MAX_IPMI_MSG_SIZE),
|
||||
VMSTATE_UINT32_V(inlen, IPMIKCS, 2),
|
||||
VMSTATE_UINT8_ARRAY(inmsg, IPMIKCS, MAX_IPMI_MSG_SIZE),
|
||||
VMSTATE_BOOL(write_end, IPMIKCS),
|
||||
VMSTATE_UINT8(status_reg, IPMIKCS),
|
||||
VMSTATE_UINT8(data_out_reg, IPMIKCS),
|
||||
VMSTATE_INT16(data_in_reg, IPMIKCS),
|
||||
VMSTATE_INT16(cmd_reg, IPMIKCS),
|
||||
VMSTATE_UINT8(waiting_rsp, IPMIKCS),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_ISAIPMIKCSDevice = {
|
||||
.name = TYPE_IPMI_INTERFACE,
|
||||
.version_id = 1,
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_BOOL(kcs.obf_irq_set, ISAIPMIKCSDevice),
|
||||
VMSTATE_BOOL(kcs.atn_irq_set, ISAIPMIKCSDevice),
|
||||
VMSTATE_BOOL(kcs.use_irq, ISAIPMIKCSDevice),
|
||||
VMSTATE_BOOL(kcs.irqs_enabled, ISAIPMIKCSDevice),
|
||||
VMSTATE_UINT32(kcs.outpos, ISAIPMIKCSDevice),
|
||||
VMSTATE_UINT8_ARRAY(kcs.outmsg, ISAIPMIKCSDevice, MAX_IPMI_MSG_SIZE),
|
||||
VMSTATE_UINT8_ARRAY(kcs.inmsg, ISAIPMIKCSDevice, MAX_IPMI_MSG_SIZE),
|
||||
VMSTATE_BOOL(kcs.write_end, ISAIPMIKCSDevice),
|
||||
VMSTATE_UINT8(kcs.status_reg, ISAIPMIKCSDevice),
|
||||
VMSTATE_UINT8(kcs.data_out_reg, ISAIPMIKCSDevice),
|
||||
VMSTATE_INT16(kcs.data_in_reg, ISAIPMIKCSDevice),
|
||||
VMSTATE_INT16(kcs.cmd_reg, ISAIPMIKCSDevice),
|
||||
VMSTATE_UINT8(kcs.waiting_rsp, ISAIPMIKCSDevice),
|
||||
VMSTATE_VSTRUCT_TEST(kcs, ISAIPMIKCSDevice, vmstate_kcs_before_version2,
|
||||
0, vmstate_IPMIKCS, IPMIKCS, 1),
|
||||
VMSTATE_VSTRUCT_V(kcs, ISAIPMIKCSDevice, 2, vmstate_IPMIKCS,
|
||||
IPMIKCS, 2),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
@ -450,6 +496,11 @@ static void isa_ipmi_kcs_init(Object *obj)
|
|||
|
||||
ipmi_bmc_find_and_link(obj, (Object **) &iik->kcs.bmc);
|
||||
|
||||
/*
|
||||
* Version 1 had an incorrect name, it clashed with the BT
|
||||
* IPMI device, so receive it, but transmit a different
|
||||
* version.
|
||||
*/
|
||||
vmstate_register(NULL, 0, &vmstate_ISAIPMIKCSDevice, iik);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "chardev/char.h"
|
||||
#include "hw/isa/superio.h"
|
||||
|
@ -43,7 +42,7 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
|
|||
if (!k->parallel.is_enabled || k->parallel.is_enabled(sio, i)) {
|
||||
/* FIXME use a qdev chardev prop instead of parallel_hds[] */
|
||||
chr = parallel_hds[i];
|
||||
if (chr == NULL || chr->be) {
|
||||
if (chr == NULL) {
|
||||
name = g_strdup_printf("discarding-parallel%d", i);
|
||||
chr = qemu_chr_new(name, "null");
|
||||
} else {
|
||||
|
@ -83,7 +82,7 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
|
|||
if (!k->serial.is_enabled || k->serial.is_enabled(sio, i)) {
|
||||
/* FIXME use a qdev chardev prop instead of serial_hd() */
|
||||
chr = serial_hd(i);
|
||||
if (chr == NULL || chr->be) {
|
||||
if (chr == NULL) {
|
||||
name = g_strdup_printf("discarding-serial%d", i);
|
||||
chr = qemu_chr_new(name, "null");
|
||||
} else {
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "hw/devices.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/loader.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "elf.h"
|
||||
#include "lm32_hwsetup.h"
|
||||
#include "lm32.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "hw/boards.h"
|
||||
#include "hw/loader.h"
|
||||
#include "elf.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "milkymist-hw.h"
|
||||
#include "lm32.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "qemu/timer.h"
|
||||
#include "hw/ptimer.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
/* General purpose timer module. */
|
||||
typedef struct {
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/m68k/mcf.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
#define TYPE_MCF_INTC "mcf-intc"
|
||||
#define MCF_INTC(obj) OBJECT_CHECK(mcf_intc_state, (obj), TYPE_MCF_INTC)
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "sysemu/sysemu.h"
|
||||
#include "hw/devices.h"
|
||||
#include "hw/boards.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/ssi/ssi.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "sysemu/sysemu.h"
|
||||
#include "hw/devices.h"
|
||||
#include "hw/boards.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/char/xilinx_uartlite.h"
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#include "elf.h"
|
||||
#include "hw/timer/mc146818rtc.h"
|
||||
#include "hw/timer/i8254.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/sysbus.h" /* SysBusDevice */
|
||||
#include "qemu/host-utils.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "hw/timer/mc146818rtc.h"
|
||||
#include "hw/input/i8042.h"
|
||||
#include "hw/timer/i8254.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/misc/arm_integrator_debug.h"
|
||||
#include "qemu/log.h"
|
||||
|
||||
|
|
|
@ -18,13 +18,10 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/log.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"
|
||||
#include "hw/misc/mips_itu.h"
|
||||
|
||||
#define ITC_TAG_ADDRSPACE_SZ (ITC_ADDRESSMAP_NUM * 8)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "hw/loader.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
|
|
|
@ -229,15 +229,14 @@ static void tmp105_reset(I2CSlave *i2c)
|
|||
tmp105_interrupt_update(s);
|
||||
}
|
||||
|
||||
static int tmp105_init(I2CSlave *i2c)
|
||||
static void tmp105_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
I2CSlave *i2c = I2C_SLAVE(dev);
|
||||
TMP105State *s = TMP105(i2c);
|
||||
|
||||
qdev_init_gpio_out(&i2c->qdev, &s->pin, 1);
|
||||
|
||||
tmp105_reset(&s->i2c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tmp105_initfn(Object *obj)
|
||||
|
@ -252,7 +251,7 @@ static void tmp105_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
k->init = tmp105_init;
|
||||
dc->realize = tmp105_realize;
|
||||
k->event = tmp105_event;
|
||||
k->recv = tmp105_rx;
|
||||
k->send = tmp105_tx;
|
||||
|
|
|
@ -335,13 +335,11 @@ static void tmp421_reset(I2CSlave *i2c)
|
|||
s->status = 0;
|
||||
}
|
||||
|
||||
static int tmp421_init(I2CSlave *i2c)
|
||||
static void tmp421_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
TMP421State *s = TMP421(i2c);
|
||||
TMP421State *s = TMP421(dev);
|
||||
|
||||
tmp421_reset(&s->i2c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tmp421_initfn(Object *obj)
|
||||
|
@ -366,7 +364,7 @@ static void tmp421_class_init(ObjectClass *klass, void *data)
|
|||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||
TMP421Class *sc = TMP421_CLASS(klass);
|
||||
|
||||
k->init = tmp421_init;
|
||||
dc->realize = tmp421_realize;
|
||||
k->event = tmp421_event;
|
||||
k->recv = tmp421_rx;
|
||||
k->send = tmp421_tx;
|
||||
|
|
|
@ -36,7 +36,7 @@ obj-$(CONFIG_MILKYMIST) += milkymist-minimac2.o
|
|||
obj-$(CONFIG_PSERIES) += spapr_llan.o
|
||||
obj-$(CONFIG_XILINX_ETHLITE) += xilinx_ethlite.o
|
||||
|
||||
obj-$(CONFIG_VIRTIO) += virtio-net.o
|
||||
obj-$(CONFIG_VIRTIO_NET) += virtio-net.o
|
||||
obj-y += vhost_net.o
|
||||
|
||||
obj-$(CONFIG_ETSEC) += fsl_etsec/etsec.o fsl_etsec/registers.o \
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "hw/sysbus.h"
|
||||
/* For crc32 */
|
||||
#include <zlib.h>
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
//#define DEBUG_FEC 1
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "hw/qdev.h"
|
||||
#include "ne2000.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/visitor.h"
|
||||
|
||||
|
|
|
@ -116,31 +116,29 @@ int at24c_eeprom_send(I2CSlave *s, uint8_t data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
int at24c_eeprom_init(I2CSlave *i2c)
|
||||
static void at24c_eeprom_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
EEPROMState *ee = AT24C_EE(i2c);
|
||||
|
||||
ee->mem = g_malloc0(ee->rsize);
|
||||
EEPROMState *ee = AT24C_EE(dev);
|
||||
|
||||
if (ee->blk) {
|
||||
int64_t len = blk_getlength(ee->blk);
|
||||
|
||||
if (len != ee->rsize) {
|
||||
ERR(TYPE_AT24C_EE " : Backing file size %lu != %u\n",
|
||||
(unsigned long)len, (unsigned)ee->rsize);
|
||||
exit(1);
|
||||
error_setg(errp, "%s: Backing file size %" PRId64 " != %u",
|
||||
TYPE_AT24C_EE, len, ee->rsize);
|
||||
return;
|
||||
}
|
||||
|
||||
if (blk_set_perm(ee->blk, BLK_PERM_CONSISTENT_READ | BLK_PERM_WRITE,
|
||||
BLK_PERM_ALL, &error_fatal) < 0)
|
||||
{
|
||||
ERR(TYPE_AT24C_EE
|
||||
" : Backing file incorrect permission\n");
|
||||
exit(1);
|
||||
error_setg(errp, "%s: Backing file incorrect permission",
|
||||
TYPE_AT24C_EE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
ee->mem = g_malloc0(ee->rsize);
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -178,7 +176,7 @@ void at24c_eeprom_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
k->init = &at24c_eeprom_init;
|
||||
dc->realize = &at24c_eeprom_realize;
|
||||
k->event = &at24c_eeprom_event;
|
||||
k->recv = &at24c_eeprom_recv;
|
||||
k->send = &at24c_eeprom_send;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#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
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "qemu/log.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/loader.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
#define BIOS_FILENAME "ppc405_rom.bin"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/hw.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "hw/boards.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "kvm_ppc.h"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "elf.h"
|
||||
#include "net/net.h"
|
||||
#include "sysemu/device_tree.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "sysemu/hw_accel.h"
|
||||
#include "kvm_ppc.h"
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
#include "hw/ppc/ppc4xx.h"
|
||||
#include "ppc405.h"
|
||||
|
||||
#include "sysemu/block-backend.h"
|
||||
|
||||
#define EPAPR_MAGIC (0x45504150)
|
||||
#define FLASH_SIZE (16 * 1024 * 1024)
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "chardev/char-fe.h"
|
||||
#include "hw/riscv/riscv_htif.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
#define RISCV_DEBUG_HTIF 0
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/hw.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "net/net.h"
|
||||
|
|
|
@ -8,7 +8,7 @@ common-obj-$(CONFIG_ESP) += esp.o
|
|||
common-obj-$(CONFIG_ESP_PCI) += esp-pci.o
|
||||
obj-$(CONFIG_PSERIES) += spapr_vscsi.o
|
||||
|
||||
ifeq ($(CONFIG_VIRTIO),y)
|
||||
ifeq ($(CONFIG_VIRTIO_SCSI),y)
|
||||
obj-y += virtio-scsi.o virtio-scsi-dataplane.o
|
||||
obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-common.o vhost-scsi.o
|
||||
obj-$(CONFIG_VHOST_USER_SCSI) += vhost-scsi-common.o vhost-user-scsi.o
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "hw/hw.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "hw/pci/msi.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "hw/scsi/scsi.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "qemu/error-report.h"
|
||||
#include "hw/scsi/scsi.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/sd/sd.h"
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/hw.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "sysemu/dma.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/bitops.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "hw/ssi/ssi.h"
|
||||
#include "hw/sd/sd.h"
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "hw/loader.h"
|
||||
#include "hw/usb.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
#define FLASH_BASE 0x00000000
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "hw/sh4/sh_intc.h"
|
||||
#include "cpu.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
#define NB_DEVICES 4
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "hw/sh4/sh.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/ptimer.h"
|
||||
|
||||
//#define DEBUG_TIMER
|
||||
|
|
|
@ -853,10 +853,9 @@ static const VMStateDescription vmstate_menelaus = {
|
|||
}
|
||||
};
|
||||
|
||||
static int twl92230_init(I2CSlave *i2c)
|
||||
static void twl92230_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
DeviceState *dev = DEVICE(i2c);
|
||||
MenelausState *s = TWL92230(i2c);
|
||||
MenelausState *s = TWL92230(dev);
|
||||
|
||||
s->rtc.hz_tm = timer_new_ms(rtc_clock, menelaus_rtc_hz, s);
|
||||
/* Three output pins plus one interrupt pin. */
|
||||
|
@ -865,9 +864,7 @@ static int twl92230_init(I2CSlave *i2c)
|
|||
/* Three input pins plus one power-button pin. */
|
||||
qdev_init_gpio_in(dev, menelaus_gpio_set, 4);
|
||||
|
||||
menelaus_reset(i2c);
|
||||
|
||||
return 0;
|
||||
menelaus_reset(I2C_SLAVE(dev));
|
||||
}
|
||||
|
||||
static void twl92230_class_init(ObjectClass *klass, void *data)
|
||||
|
@ -875,7 +872,7 @@ static void twl92230_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
I2CSlaveClass *sc = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
sc->init = twl92230_init;
|
||||
dc->realize = twl92230_realize;
|
||||
sc->event = menelaus_event;
|
||||
sc->recv = menelaus_rx;
|
||||
sc->send = menelaus_tx;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "monitor/monitor.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "qemu/cutils.h"
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "hw/vfio/vfio-common.h"
|
||||
#include "hw/s390x/s390-ccw.h"
|
||||
#include "hw/s390x/ccw-device.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
#define TYPE_VFIO_CCW "vfio-ccw"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "qemu/range.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "exec/memory.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/queue.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "trace.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue