* 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
@ -97,7 +97,7 @@ obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/tcg-op-vec.o tcg/tcg-op-gvec.o
|
||||
obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o
|
||||
obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
|
||||
obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
|
||||
obj-y += fpu/softfloat.o
|
||||
obj-$(CONFIG_TCG) += fpu/softfloat.o
|
||||
obj-y += target/$(TARGET_BASE_ARCH)/
|
||||
obj-y += disas.o
|
||||
obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "qemu/atomic.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "exec/tb-hash.h"
|
||||
#include "exec/tb-lookup.h"
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "qemu.h"
|
||||
#include "qemu-common.h"
|
||||
#include "bsd-mman.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
||||
//#define DEBUG_MMAP
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
|
||||
#include "cpu.h"
|
||||
#include "exec/exec-all.h"
|
||||
#include "exec/cpu_ldst.h"
|
||||
|
||||
#undef DEBUG_REMAP
|
||||
|
@ -304,6 +304,7 @@ void mux_set_focus(Chardev *chr, int focus)
|
||||
}
|
||||
|
||||
d->focus = focus;
|
||||
chr->be = d->backends[focus];
|
||||
mux_chr_send_event(d, d->focus, CHR_EVENT_MUX_IN);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ static void tty_serial_init(int fd, int speed,
|
||||
|
||||
tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
|
||||
| INLCR | IGNCR | ICRNL | IXON);
|
||||
tty.c_oflag |= OPOST;
|
||||
tty.c_oflag &= ~OPOST;
|
||||
tty.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN | ISIG);
|
||||
tty.c_cflag &= ~(CSIZE | PARENB | PARODD | CRTSCTS | CSTOPB);
|
||||
switch (data_bits) {
|
||||
|
@ -59,7 +59,7 @@ static void qemu_chr_set_echo_stdio(Chardev *chr, bool echo)
|
||||
if (!echo) {
|
||||
tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
|
||||
| INLCR | IGNCR | ICRNL | IXON);
|
||||
tty.c_oflag |= OPOST;
|
||||
tty.c_oflag &= ~OPOST;
|
||||
tty.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN);
|
||||
tty.c_cflag &= ~(CSIZE | PARENB);
|
||||
tty.c_cflag |= CS8;
|
||||
|
15
configure
vendored
15
configure
vendored
@ -2529,20 +2529,7 @@ fi
|
||||
##########################################
|
||||
# Windows Hypervisor Platform accelerator (WHPX) check
|
||||
if test "$whpx" != "no" ; then
|
||||
cat > $TMPC << EOF
|
||||
#include <windows.h>
|
||||
#include <WinHvPlatform.h>
|
||||
#include <WinHvEmulation.h>
|
||||
int main(void) {
|
||||
WHV_CAPABILITY whpx_cap;
|
||||
UINT32 writtenSize;
|
||||
WHvGetCapability(WHvCapabilityCodeFeatures, &whpx_cap, sizeof(whpx_cap),
|
||||
&writtenSize);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "-lWinHvPlatform -lWinHvEmulation" ; then
|
||||
libs_softmmu="$libs_softmmu -lWinHvPlatform -lWinHvEmulation"
|
||||
if check_include "WinHvPlatform.h" && check_include "WinHvEmulation.h"; then
|
||||
whpx="yes"
|
||||
else
|
||||
if test "$whpx" = "yes"; then
|
||||
|
@ -41,6 +41,7 @@ CONFIG_USB=y
|
||||
CONFIG_USB_MUSB=y
|
||||
CONFIG_USB_EHCI_SYSBUS=y
|
||||
CONFIG_PLATFORM_BUS=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
|
||||
CONFIG_ARM11MPCORE=y
|
||||
CONFIG_A9MPCORE=y
|
||||
|
@ -4,8 +4,6 @@ CONFIG_SERIAL=y
|
||||
CONFIG_SERIAL_ISA=y
|
||||
CONFIG_ISA_BUS=y
|
||||
CONFIG_I8259=y
|
||||
CONFIG_VIRTIO_PCI=$(CONFIG_PCI)
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_E1000_PCI=y
|
||||
CONFIG_IDE_ISA=y
|
||||
CONFIG_IDE_CMD646=y
|
||||
|
@ -4,6 +4,7 @@ include pci.mak
|
||||
include sound.mak
|
||||
include usb.mak
|
||||
CONFIG_ESP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_VGA_ISA=y
|
||||
CONFIG_VGA_ISA_MM=y
|
||||
CONFIG_VGA_CIRRUS=y
|
||||
|
@ -2,7 +2,7 @@ CONFIG_PCI=y
|
||||
# For now, CONFIG_IDE_CORE requires ISA, so we enable it here
|
||||
CONFIG_ISA_BUS=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO=y
|
||||
include virtio.mak
|
||||
CONFIG_USB_UHCI=y
|
||||
CONFIG_USB_OHCI=y
|
||||
CONFIG_USB_EHCI=y
|
||||
@ -15,6 +15,7 @@ CONFIG_PCNET_COMMON=y
|
||||
CONFIG_AC97=y
|
||||
CONFIG_HDA=y
|
||||
CONFIG_ES1370=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_LSI_SCSI_PCI=y
|
||||
CONFIG_VMW_PVSCSI_SCSI_PCI=y
|
||||
CONFIG_MEGASAS_SCSI_PCI=y
|
||||
@ -45,5 +46,3 @@ CONFIG_VGA=y
|
||||
CONFIG_VGA_PCI=y
|
||||
CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
|
||||
CONFIG_ROCKER=y
|
||||
CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
|
@ -1,4 +1,5 @@
|
||||
# Default configuration for riscv-softmmu
|
||||
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
include virtio.mak
|
||||
|
@ -1,4 +1,5 @@
|
||||
# Default configuration for riscv-softmmu
|
||||
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
include virtio.mak
|
||||
|
@ -1,8 +1,6 @@
|
||||
CONFIG_PCI=y
|
||||
CONFIG_VIRTIO_PCI=$(CONFIG_PCI)
|
||||
CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
CONFIG_VIRTIO=y
|
||||
include virtio.mak
|
||||
CONFIG_SCLPCONSOLE=y
|
||||
CONFIG_TERMINAL3270=y
|
||||
CONFIG_S390_FLIC=y
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
CONFIG_ISA_BUS=y
|
||||
CONFIG_ECC=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_ESP=y
|
||||
CONFIG_ESCC=y
|
||||
CONFIG_M48T59=y
|
||||
|
@ -3,6 +3,7 @@ CONFIG_USB_TABLET_WACOM=y
|
||||
CONFIG_USB_STORAGE_BOT=y
|
||||
CONFIG_USB_STORAGE_UAS=y
|
||||
CONFIG_USB_STORAGE_MTP=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_USB_SMARTCARD=y
|
||||
CONFIG_USB_AUDIO=y
|
||||
CONFIG_USB_SERIAL=y
|
||||
|
14
default-configs/virtio.mak
Normal file
14
default-configs/virtio.mak
Normal file
@ -0,0 +1,14 @@
|
||||
CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_9P=y
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_VIRTIO_CRYPTO=y
|
||||
CONFIG_VIRTIO_GPU=y
|
||||
CONFIG_VIRTIO_INPUT=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_RNG=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_VIRTIO_SCSI=y
|
||||
CONFIG_VIRTIO_SERIAL=y
|
@ -77,9 +77,8 @@ MemoryRegion):
|
||||
- reservation region: a reservation region is primarily for debugging.
|
||||
It claims I/O space that is not supposed to be handled by QEMU itself.
|
||||
The typical use is to track parts of the address space which will be
|
||||
handled by the host kernel when KVM is enabled.
|
||||
You initialize these with memory_region_init_reservation(), or by
|
||||
passing a NULL callback parameter to memory_region_init_io().
|
||||
handled by the host kernel when KVM is enabled. You initialize these
|
||||
by passing a NULL callback parameter to memory_region_init_io().
|
||||
|
||||
It is valid to add subregions to a region which is not a pure container
|
||||
(that is, to an MMIO, RAM or ROM region). This means that the region
|
||||
|
540
docs/interop/firmware.json
Normal file
540
docs/interop/firmware.json
Normal file
@ -0,0 +1,540 @@
|
||||
# -*- Mode: Python -*-
|
||||
#
|
||||
# Copyright (C) 2018 Red Hat, Inc.
|
||||
#
|
||||
# Authors:
|
||||
# Daniel P. Berrange <berrange@redhat.com>
|
||||
# Laszlo Ersek <lersek@redhat.com>
|
||||
#
|
||||
# This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
# later. See the COPYING file in the top-level directory.
|
||||
|
||||
##
|
||||
# = Firmware
|
||||
##
|
||||
|
||||
{ 'include' : 'common.json' }
|
||||
{ 'include' : 'block-core.json' }
|
||||
|
||||
##
|
||||
# @FirmwareOSInterface:
|
||||
#
|
||||
# Lists the firmware-OS interface types provided by various firmware
|
||||
# that is commonly used with QEMU virtual machines.
|
||||
#
|
||||
# @bios: Traditional x86 BIOS interface. For example, firmware built
|
||||
# from the SeaBIOS project usually provides this interface.
|
||||
#
|
||||
# @openfirmware: The interface is defined by the (historical) IEEE
|
||||
# 1275-1994 standard. Examples for firmware projects that
|
||||
# provide this interface are: OpenBIOS, OpenHackWare,
|
||||
# SLOF.
|
||||
#
|
||||
# @uboot: Firmware interface defined by the U-Boot project.
|
||||
#
|
||||
# @uefi: Firmware interface defined by the UEFI specification. For
|
||||
# example, firmware built from the edk2 (EFI Development Kit II)
|
||||
# project usually provides this interface.
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'enum' : 'FirmwareOSInterface',
|
||||
'data' : [ 'bios', 'openfirmware', 'uboot', 'uefi' ] }
|
||||
|
||||
##
|
||||
# @FirmwareDevice:
|
||||
#
|
||||
# Defines the device types that firmware can be mapped into.
|
||||
#
|
||||
# @flash: The firmware executable and its accompanying NVRAM file are to
|
||||
# be mapped into a pflash chip each.
|
||||
#
|
||||
# @kernel: The firmware is to be loaded like a Linux kernel. This is
|
||||
# similar to @memory but may imply additional processing that
|
||||
# is specific to the target architecture and machine type.
|
||||
#
|
||||
# @memory: The firmware is to be mapped into memory.
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'enum' : 'FirmwareDevice',
|
||||
'data' : [ 'flash', 'kernel', 'memory' ] }
|
||||
|
||||
##
|
||||
# @FirmwareTarget:
|
||||
#
|
||||
# Defines the machine types that firmware may execute on.
|
||||
#
|
||||
# @architecture: Determines the emulation target (the QEMU system
|
||||
# emulator) that can execute the firmware.
|
||||
#
|
||||
# @machines: Lists the machine types (known by the emulator that is
|
||||
# specified through @architecture) that can execute the
|
||||
# firmware. Elements of @machines are supposed to be concrete
|
||||
# machine types, not aliases. Glob patterns are understood,
|
||||
# which is especially useful for versioned machine types.
|
||||
# (For example, the glob pattern "pc-i440fx-*" matches
|
||||
# "pc-i440fx-2.12".) On the QEMU command line, "-machine
|
||||
# type=..." specifies the requested machine type (but that
|
||||
# option does not accept glob patterns).
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'struct' : 'FirmwareTarget',
|
||||
'data' : { 'architecture' : 'SysEmuTarget',
|
||||
'machines' : [ 'str' ] } }
|
||||
|
||||
##
|
||||
# @FirmwareFeature:
|
||||
#
|
||||
# Defines the features that firmware may support, and the platform
|
||||
# requirements that firmware may present.
|
||||
#
|
||||
# @acpi-s3: The firmware supports S3 sleep (suspend to RAM), as defined
|
||||
# in the ACPI specification. On the "pc-i440fx-*" machine
|
||||
# types of the @i386 and @x86_64 emulation targets, S3 can be
|
||||
# enabled with "-global PIIX4_PM.disable_s3=0" and disabled
|
||||
# with "-global PIIX4_PM.disable_s3=1". On the "pc-q35-*"
|
||||
# machine types of the @i386 and @x86_64 emulation targets, S3
|
||||
# can be enabled with "-global ICH9-LPC.disable_s3=0" and
|
||||
# disabled with "-global ICH9-LPC.disable_s3=1".
|
||||
#
|
||||
# @acpi-s4: The firmware supports S4 hibernation (suspend to disk), as
|
||||
# defined in the ACPI specification. On the "pc-i440fx-*"
|
||||
# machine types of the @i386 and @x86_64 emulation targets, S4
|
||||
# can be enabled with "-global PIIX4_PM.disable_s4=0" and
|
||||
# disabled with "-global PIIX4_PM.disable_s4=1". On the
|
||||
# "pc-q35-*" machine types of the @i386 and @x86_64 emulation
|
||||
# targets, S4 can be enabled with "-global
|
||||
# ICH9-LPC.disable_s4=0" and disabled with "-global
|
||||
# ICH9-LPC.disable_s4=1".
|
||||
#
|
||||
# @amd-sev: The firmware supports running under AMD Secure Encrypted
|
||||
# Virtualization, as specified in the AMD64 Architecture
|
||||
# Programmer's Manual. QEMU command line options related to
|
||||
# this feature are documented in
|
||||
# "docs/amd-memory-encryption.txt".
|
||||
#
|
||||
# @enrolled-keys: The variable store (NVRAM) template associated with
|
||||
# the firmware binary has the UEFI Secure Boot
|
||||
# operational mode turned on, with certificates
|
||||
# enrolled.
|
||||
#
|
||||
# @requires-smm: The firmware requires the platform to emulate SMM
|
||||
# (System Management Mode), as defined in the AMD64
|
||||
# Architecture Programmer's Manual, and in the Intel(R)64
|
||||
# and IA-32 Architectures Software Developer's Manual. On
|
||||
# the "pc-q35-*" machine types of the @i386 and @x86_64
|
||||
# emulation targets, SMM emulation can be enabled with
|
||||
# "-machine smm=on". (On the "pc-q35-*" machine types of
|
||||
# the @i386 emulation target, @requires-smm presents
|
||||
# further CPU requirements; one combination known to work
|
||||
# is "-cpu coreduo,-nx".) If the firmware is marked as
|
||||
# both @secure-boot and @requires-smm, then write
|
||||
# accesses to the pflash chip (NVRAM) that holds the UEFI
|
||||
# variable store must be restricted to code that executes
|
||||
# in SMM, using the additional option "-global
|
||||
# driver=cfi.pflash01,property=secure,value=on".
|
||||
# Furthermore, a large guest-physical address space
|
||||
# (comprising guest RAM, memory hotplug range, and 64-bit
|
||||
# PCI MMIO aperture), and/or a high VCPU count, may
|
||||
# present high SMRAM requirements from the firmware. On
|
||||
# the "pc-q35-*" machine types of the @i386 and @x86_64
|
||||
# emulation targets, the SMRAM size may be increased
|
||||
# above the default 16MB with the "-global
|
||||
# mch.extended-tseg-mbytes=uint16" option. As a rule of
|
||||
# thumb, the default 16MB size suffices for 1TB of
|
||||
# guest-phys address space and a few tens of VCPUs; for
|
||||
# every further TB of guest-phys address space, add 8MB
|
||||
# of SMRAM. 48MB should suffice for 4TB of guest-phys
|
||||
# address space and 2-3 hundred VCPUs.
|
||||
#
|
||||
# @secure-boot: The firmware implements the software interfaces for UEFI
|
||||
# Secure Boot, as defined in the UEFI specification. Note
|
||||
# that without @requires-smm, guest code running with
|
||||
# kernel privileges can undermine the security of Secure
|
||||
# Boot.
|
||||
#
|
||||
# @verbose-dynamic: When firmware log capture is enabled, the firmware
|
||||
# logs a large amount of debug messages, which may
|
||||
# impact boot performance. With log capture disabled,
|
||||
# there is no boot performance impact. On the
|
||||
# "pc-i440fx-*" and "pc-q35-*" machine types of the
|
||||
# @i386 and @x86_64 emulation targets, firmware log
|
||||
# capture can be enabled with the QEMU command line
|
||||
# options "-chardev file,id=fwdebug,path=LOGFILEPATH
|
||||
# -device isa-debugcon,iobase=0x402,chardev=fwdebug".
|
||||
# @verbose-dynamic is mutually exclusive with
|
||||
# @verbose-static.
|
||||
#
|
||||
# @verbose-static: The firmware unconditionally produces a large amount
|
||||
# of debug messages, which may impact boot performance.
|
||||
# This feature may typically be carried by certain UEFI
|
||||
# firmware for the "virt-*" machine types of the @arm
|
||||
# and @aarch64 emulation targets, where the debug
|
||||
# messages are written to the first (always present)
|
||||
# PL011 UART. @verbose-static is mutually exclusive
|
||||
# with @verbose-dynamic.
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'enum' : 'FirmwareFeature',
|
||||
'data' : [ 'acpi-s3', 'acpi-s4', 'amd-sev', 'enrolled-keys',
|
||||
'requires-smm', 'secure-boot', 'verbose-dynamic',
|
||||
'verbose-static' ] }
|
||||
|
||||
##
|
||||
# @FirmwareFlashFile:
|
||||
#
|
||||
# Defines common properties that are necessary for loading a firmware
|
||||
# file into a pflash chip. The corresponding QEMU command line option is
|
||||
# "-drive file=@filename,format=@format". Note however that the
|
||||
# option-argument shown here is incomplete; it is completed under
|
||||
# @FirmwareMappingFlash.
|
||||
#
|
||||
# @filename: Specifies the filename on the host filesystem where the
|
||||
# firmware file can be found.
|
||||
#
|
||||
# @format: Specifies the block format of the file pointed-to by
|
||||
# @filename, such as @raw or @qcow2.
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'struct' : 'FirmwareFlashFile',
|
||||
'data' : { 'filename' : 'str',
|
||||
'format' : 'BlockdevDriver' } }
|
||||
|
||||
##
|
||||
# @FirmwareMappingFlash:
|
||||
#
|
||||
# Describes loading and mapping properties for the firmware executable
|
||||
# and its accompanying NVRAM file, when @FirmwareDevice is @flash.
|
||||
#
|
||||
# @executable: Identifies the firmware executable. The firmware
|
||||
# executable may be shared by multiple virtual machine
|
||||
# definitions. The corresponding QEMU command line option
|
||||
# is "-drive
|
||||
# if=pflash,unit=0,readonly=on,file=@executable.@filename,format=@executable.@format".
|
||||
#
|
||||
# @nvram-template: Identifies the NVRAM template compatible with
|
||||
# @executable. Management software instantiates an
|
||||
# individual copy -- a specific NVRAM file -- from
|
||||
# @nvram-template.@filename for each new virtual
|
||||
# machine definition created. @nvram-template.@filename
|
||||
# itself is never mapped into virtual machines, only
|
||||
# individual copies of it are. An NVRAM file is
|
||||
# typically used for persistently storing the
|
||||
# non-volatile UEFI variables of a virtual machine
|
||||
# definition. The corresponding QEMU command line
|
||||
# option is "-drive
|
||||
# if=pflash,unit=1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format".
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'struct' : 'FirmwareMappingFlash',
|
||||
'data' : { 'executable' : 'FirmwareFlashFile',
|
||||
'nvram-template' : 'FirmwareFlashFile' } }
|
||||
|
||||
##
|
||||
# @FirmwareMappingKernel:
|
||||
#
|
||||
# Describes loading and mapping properties for the firmware executable,
|
||||
# when @FirmwareDevice is @kernel.
|
||||
#
|
||||
# @filename: Identifies the firmware executable. The firmware executable
|
||||
# may be shared by multiple virtual machine definitions. The
|
||||
# corresponding QEMU command line option is "-kernel
|
||||
# @filename".
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'struct' : 'FirmwareMappingKernel',
|
||||
'data' : { 'filename' : 'str' } }
|
||||
|
||||
##
|
||||
# @FirmwareMappingMemory:
|
||||
#
|
||||
# Describes loading and mapping properties for the firmware executable,
|
||||
# when @FirmwareDevice is @memory.
|
||||
#
|
||||
# @filename: Identifies the firmware executable. The firmware executable
|
||||
# may be shared by multiple virtual machine definitions. The
|
||||
# corresponding QEMU command line option is "-bios
|
||||
# @filename".
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'struct' : 'FirmwareMappingMemory',
|
||||
'data' : { 'filename' : 'str' } }
|
||||
|
||||
##
|
||||
# @FirmwareMapping:
|
||||
#
|
||||
# Provides a discriminated structure for firmware to describe its
|
||||
# loading / mapping properties.
|
||||
#
|
||||
# @device: Selects the device type that the firmware must be mapped
|
||||
# into.
|
||||
#
|
||||
# Since: 3.0
|
||||
##
|
||||
{ 'union' : 'FirmwareMapping',
|
||||
'base' : { 'device' : 'FirmwareDevice' },
|
||||
'discriminator' : 'device',
|
||||
'data' : { 'flash' : 'FirmwareMappingFlash',
|
||||
'kernel' : 'FirmwareMappingKernel',
|
||||
'memory' : 'FirmwareMappingMemory' } }
|
||||
|
||||
##
|
||||
# @Firmware:
|
||||
#
|
||||
# Describes a firmware (or a firmware use case) to management software.
|
||||
#
|
||||
# It is possible for multiple @Firmware elements to match the search
|
||||
# criteria of management software. Applications thus need rules to pick
|
||||
# one of the many matches, and users need the ability to override distro
|
||||
# defaults.
|
||||
#
|
||||
# It is recommended to create firmware JSON files (each containing a
|
||||
# single @Firmware root element) with a double-digit prefix, for example
|
||||
# "50-ovmf.json", "50-seabios-256k.json", etc, so they can be sorted in
|
||||
# predictable order. The firmware JSON files should be searched for in
|
||||
# three directories:
|
||||
#
|
||||
# - /usr/share/qemu/firmware -- populated by distro-provided firmware
|
||||
# packages (XDG_DATA_DIRS covers
|
||||
# /usr/share by default),
|
||||
#
|
||||
# - /etc/qemu/firmware -- exclusively for sysadmins' local additions,
|
||||
#
|
||||
# - $XDG_CONFIG_HOME/qemu/firmware -- exclusively for per-user local
|
||||
# additions (XDG_CONFIG_HOME
|
||||
# defaults to $HOME/.config).
|
||||
#
|
||||
# Top-down, the list of directories goes from general to specific.
|
||||
#
|
||||
# Management software should build a list of files from all three
|
||||
# locations, then sort the list by filename (i.e., last pathname
|
||||
# component). Management software should choose the first JSON file on
|
||||
# the sorted list that matches the search criteria. If a more specific
|
||||
# directory has a file with same name as a less specific directory, then
|
||||
# the file in the more specific directory takes effect. If the more
|
||||
# specific file is zero length, it hides the less specific one.
|
||||
#
|
||||
# For example, if a distro ships
|
||||
#
|
||||
# - /usr/share/qemu/firmware/50-ovmf.json
|
||||
#
|
||||
# - /usr/share/qemu/firmware/50-seabios-256k.json
|
||||
#
|
||||
# then the sysadmin can prevent the default OVMF being used at all with
|
||||
#
|
||||
# $ touch /etc/qemu/firmware/50-ovmf.json
|
||||
#
|
||||
# The sysadmin can replace/alter the distro default OVMF with
|
||||
#
|
||||
# $ vim /etc/qemu/firmware/50-ovmf.json
|
||||
#
|
||||
# or they can provide a parallel OVMF with higher priority
|
||||
#
|
||||
# $ vim /etc/qemu/firmware/10-ovmf.json
|
||||
#
|
||||
# or they can provide a parallel OVMF with lower priority
|
||||
#
|
||||
# $ vim /etc/qemu/firmware/99-ovmf.json
|
||||
#
|
||||
# @description: Provides a human-readable description of the firmware.
|
||||
# Management software may or may not display @description.
|
||||
#
|
||||
# @interface-types: Lists the types of interfaces that the firmware can
|
||||
# expose to the guest OS. This is a non-empty, ordered
|
||||
# list; entries near the beginning of @interface-types
|
||||
# are considered more native to the firmware, and/or
|
||||
# to have a higher quality implementation in the
|
||||
# firmware, than entries near the end of
|
||||
# @interface-types.
|
||||
#
|
||||
# @mapping: Describes the loading / mapping properties of the firmware.
|
||||
#
|
||||
# @targets: Collects the target architectures (QEMU system emulators)
|
||||
# and their machine types that may execute the firmware.
|
||||
#
|
||||
# @features: Lists the features that the firmware supports, and the
|
||||
# platform requirements it presents.
|
||||
#
|
||||
# @tags: A list of auxiliary strings associated with the firmware for
|
||||
# which @description is not appropriate, due to the latter's
|
||||
# possible exposure to the end-user. @tags serves development and
|
||||
# debugging purposes only, and management software shall
|
||||
# explicitly ignore it.
|
||||
#
|
||||
# Since: 3.0
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# {
|
||||
# "description": "SeaBIOS",
|
||||
# "interface-types": [
|
||||
# "bios"
|
||||
# ],
|
||||
# "mapping": {
|
||||
# "device": "memory",
|
||||
# "filename": "/usr/share/seabios/bios-256k.bin"
|
||||
# },
|
||||
# "targets": [
|
||||
# {
|
||||
# "architecture": "i386",
|
||||
# "machines": [
|
||||
# "pc-i440fx-*",
|
||||
# "pc-q35-*"
|
||||
# ]
|
||||
# },
|
||||
# {
|
||||
# "architecture": "x86_64",
|
||||
# "machines": [
|
||||
# "pc-i440fx-*",
|
||||
# "pc-q35-*"
|
||||
# ]
|
||||
# }
|
||||
# ],
|
||||
# "features": [
|
||||
# "acpi-s3",
|
||||
# "acpi-s4"
|
||||
# ],
|
||||
# "tags": [
|
||||
# "CONFIG_BOOTSPLASH=n",
|
||||
# "CONFIG_ROM_SIZE=256",
|
||||
# "CONFIG_USE_SMM=n"
|
||||
# ]
|
||||
# }
|
||||
#
|
||||
# {
|
||||
# "description": "OVMF with SB+SMM, empty varstore",
|
||||
# "interface-types": [
|
||||
# "uefi"
|
||||
# ],
|
||||
# "mapping": {
|
||||
# "device": "flash",
|
||||
# "executable": {
|
||||
# "filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd",
|
||||
# "format": "raw"
|
||||
# },
|
||||
# "nvram-template": {
|
||||
# "filename": "/usr/share/OVMF/OVMF_VARS.fd",
|
||||
# "format": "raw"
|
||||
# }
|
||||
# },
|
||||
# "targets": [
|
||||
# {
|
||||
# "architecture": "x86_64",
|
||||
# "machines": [
|
||||
# "pc-q35-*"
|
||||
# ]
|
||||
# }
|
||||
# ],
|
||||
# "features": [
|
||||
# "acpi-s3",
|
||||
# "amd-sev",
|
||||
# "requires-smm",
|
||||
# "secure-boot",
|
||||
# "verbose-dynamic"
|
||||
# ],
|
||||
# "tags": [
|
||||
# "-a IA32",
|
||||
# "-a X64",
|
||||
# "-p OvmfPkg/OvmfPkgIa32X64.dsc",
|
||||
# "-t GCC48",
|
||||
# "-b DEBUG",
|
||||
# "-D SMM_REQUIRE",
|
||||
# "-D SECURE_BOOT_ENABLE",
|
||||
# "-D FD_SIZE_4MB"
|
||||
# ]
|
||||
# }
|
||||
#
|
||||
# {
|
||||
# "description": "OVMF with SB+SMM, SB enabled, MS certs enrolled",
|
||||
# "interface-types": [
|
||||
# "uefi"
|
||||
# ],
|
||||
# "mapping": {
|
||||
# "device": "flash",
|
||||
# "executable": {
|
||||
# "filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd",
|
||||
# "format": "raw"
|
||||
# },
|
||||
# "nvram-template": {
|
||||
# "filename": "/usr/share/OVMF/OVMF_VARS.secboot.fd",
|
||||
# "format": "raw"
|
||||
# }
|
||||
# },
|
||||
# "targets": [
|
||||
# {
|
||||
# "architecture": "x86_64",
|
||||
# "machines": [
|
||||
# "pc-q35-*"
|
||||
# ]
|
||||
# }
|
||||
# ],
|
||||
# "features": [
|
||||
# "acpi-s3",
|
||||
# "amd-sev",
|
||||
# "enrolled-keys",
|
||||
# "requires-smm",
|
||||
# "secure-boot",
|
||||
# "verbose-dynamic"
|
||||
# ],
|
||||
# "tags": [
|
||||
# "-a IA32",
|
||||
# "-a X64",
|
||||
# "-p OvmfPkg/OvmfPkgIa32X64.dsc",
|
||||
# "-t GCC48",
|
||||
# "-b DEBUG",
|
||||
# "-D SMM_REQUIRE",
|
||||
# "-D SECURE_BOOT_ENABLE",
|
||||
# "-D FD_SIZE_4MB"
|
||||
# ]
|
||||
# }
|
||||
#
|
||||
# {
|
||||
# "description": "UEFI firmware for ARM64 virtual machines",
|
||||
# "interface-types": [
|
||||
# "uefi"
|
||||
# ],
|
||||
# "mapping": {
|
||||
# "device": "flash",
|
||||
# "executable": {
|
||||
# "filename": "/usr/share/AAVMF/AAVMF_CODE.fd",
|
||||
# "format": "raw"
|
||||
# },
|
||||
# "nvram-template": {
|
||||
# "filename": "/usr/share/AAVMF/AAVMF_VARS.fd",
|
||||
# "format": "raw"
|
||||
# }
|
||||
# },
|
||||
# "targets": [
|
||||
# {
|
||||
# "architecture": "aarch64",
|
||||
# "machines": [
|
||||
# "virt-*"
|
||||
# ]
|
||||
# }
|
||||
# ],
|
||||
# "features": [
|
||||
#
|
||||
# ],
|
||||
# "tags": [
|
||||
# "-a AARCH64",
|
||||
# "-p ArmVirtPkg/ArmVirtQemu.dsc",
|
||||
# "-t GCC48",
|
||||
# "-b DEBUG",
|
||||
# "-D DEBUG_PRINT_ERROR_LEVEL=0x80000000"
|
||||
# ]
|
||||
# }
|
||||
##
|
||||
{ 'struct' : 'Firmware',
|
||||
'data' : { 'description' : 'str',
|
||||
'interface-types' : [ 'FirmwareOSInterface' ],
|
||||
'mapping' : 'FirmwareMapping',
|
||||
'targets' : [ 'FirmwareTarget' ],
|
||||
'features' : [ 'FirmwareFeature' ],
|
||||
'tags' : [ 'str' ] } }
|
1
exec.c
1
exec.c
@ -1130,6 +1130,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...)
|
||||
struct sigaction act;
|
||||
sigfillset(&act.sa_mask);
|
||||
act.sa_handler = SIG_DFL;
|
||||
act.sa_flags = 0;
|
||||
sigaction(SIGABRT, &act, NULL);
|
||||
}
|
||||
#endif
|
||||
|
@ -1842,6 +1842,7 @@ static bool gdb_accept(void)
|
||||
/* set short latency */
|
||||
if (socket_set_nodelay(fd)) {
|
||||
perror("setsockopt");
|
||||
close(fd);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user