aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-01-11libqos: allow zero-size allocationsJohn Snow
As part of streamlining the AHCI tests interface, it'd be nice if specying a size of zero could be handled without special branches and the allocator could handle this special case gracefully. This lets me use the "ahci_io" macros for non-data commands, too, which moves me forward towards shepherding all AHCI qtests into a common set of commands in a unified pipeline. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1452282920-21550-6-git-send-email-jsnow@redhat.com
2016-01-11libqos/ahci: Switch to mutable propertiesJohn Snow
ATAPI commands are, unfortunately, weird in that they can be either DMA or PIO depending on a header bit. In order to accommodate them, I'll need to make AHCI command properties mutable so we can toggle between which "flavor" of ATAPI command we want to test. The default ATAPI transfer mechanism is PIO and the default properties are adjusted accordingly. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1452282920-21550-5-git-send-email-jsnow@redhat.com
2016-01-11libqos/ahci: ATAPI identifyJohn Snow
We need to say "hello!" to our ATAPI friends in a slightly different manner. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1452282920-21550-4-git-send-email-jsnow@redhat.com
2016-01-11libqos/ahci: ATAPI supportJohn Snow
Add pathways to tolerate ATAPI commands. Notably, unlike ATA, each SCSI command's layout is a little different, so support will have to be patched in for each command as we want to test them in e.g. ahci_command_set_sizes and ahci_command_set_offset. For now, I'm adding support for 0x28, READ (10). [Maintainer edit: replaced type-punning with stl_be_p(). --js] Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1452282920-21550-3-git-send-email-jsnow@redhat.com
2016-01-11ahci-test: fix memory leakJohn Snow
Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1452282920-21550-2-git-send-email-jsnow@redhat.com
2016-01-11ide: ahci: reset ncq object to unused on errorPrasad J Pandit
When processing NCQ commands, AHCI device emulation prepares a NCQ transfer object; To which an aio control block(aiocb) object is assigned in 'execute_ncq_command'. In case, when the NCQ command is invalid, the 'aiocb' object is not assigned, and NCQ transfer object is left as 'used'. This leads to a use after free kind of error in 'bdrv_aio_cancel_async' via 'ahci_reset_port'. Reset NCQ transfer object to 'unused' to avoid it. [Maintainer edit: s/ACHI/AHCI/ in the commit message. --js] Reported-by: Qinghao Tang <luodalongde@gmail.com> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1452282511-4116-1-git-send-email-ppandit@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
2016-01-11macio: fix overflow in lba to offset conversion for ATAPI devicesMark Cave-Ayland
As the IDEState lba field is an int32_t, make sure we cast to int64_t before shifting to calculate the offset. Otherwise we end up with an overflow when trying to access sectors beyond 2GB as can occur when using DVD images. [Maintainer edit: fixed extraneous parentheses. --js] Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1451928613-29476-1-git-send-email-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow <jsnow@redhat.com>
2016-01-11Merge remote-tracking branch ↵Peter Maydell
'remotes/pmaydell/tags/pull-target-arm-20160111-1' into staging target-arm queue: * i.MX: move i.MX31 CCM object to register array * xilinx_axidma: remove dead code * disas/libvixl: Update to upstream VIXL 1.12 * virt: Support legacy -nic command line syntax # gpg: Signature made Mon 11 Jan 2016 16:05:58 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" * remotes/pmaydell/tags/pull-target-arm-20160111-1: hw/arm/virt: Support legacy -nic command line syntax disas/libvixl: Update to upstream VIXL 1.12 hw/dma/xilinx_axidma: remove dead code i.MX: move i.MX31 CCM object to register array Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11hw/arm/virt: Support legacy -nic command line syntaxAshok Kumar
Support the legacy -nic syntax for creating PCI network devices as well as the new-style -device options. This makes life easier for people moving from x86 KVM virtualization to ARM KVM virtualization and expecting their network configuration options to work the same way for both setups. We use "virtio" as the default NIC model if the user doesn't specify one. Signed-off-by: Ashok Kumar <ashoks@broadcom.com> Message-id: 1452091659-17698-1-git-send-email-ashoks@broadcom.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: expanded and clarified commit message] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11disas/libvixl: Update to upstream VIXL 1.12Peter Maydell
Update our copy of libvixl to upstream's 1.12 release. The major benefit from QEMU's point of view is that some instructions previously disassembled as "unimplemented (System)" are now displayed as something more useful. It also fixes some warnings about format strings that newer w64-mingw32 compilers were emitting. We didn't have any local changes to libvixl so nothing needed to be forward-ported. Although this is a large commit (due to upstream renaming most of the files), only a few of the files changed in this commit are not just straight copies of upstream libvixl files: disas/arm-a64.cc disas/libvixl/Makefile.objs disas/libvixl/README Note that this commit introduces some signed-unsigned comparison warnings on the old mingw compilers. Those compilers have broken TLS support anyway so have only ever been much use for compile tests; anybody still using them should add -Wno-sign-compare to their --extra-cflags. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11hw/dma/xilinx_axidma: remove dead codeAndrew Jones
stream_desc_show() (and DEBUG_ENET) appear to be unused, as the function isn't compilable (there are broken PRI format strings). Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 1452084792-17424-1-git-send-email-drjones@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11i.MX: move i.MX31 CCM object to register arrayJean-Christophe DUBOIS
With this i.MX25 and i.MX31 will have closer implementations. Moreover all i.MX31 CCM registers are now present. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160111' ↵Peter Maydell
into staging January 2016 Linux-user queque # gpg: Signature made Mon 11 Jan 2016 14:13:57 GMT using RSA key ID DE3C9BC0 # gpg: Good signature from "Riku Voipio <riku.voipio@iki.fi>" # gpg: aka "Riku Voipio <riku.voipio@linaro.org>" * remotes/riku/tags/pull-linux-user-20160111: linux-user/mmap.c: Use end instead of real_end in target_mmap linux-user: Add SOCKOP_sendmmsg and SOCKOP_recvmmsg socket call, wire them up. linux-user: Update m68k syscall definitions to match Linux 4.4. linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt() linux-user: enable sigaltstack for all architectures unicore32: convert get_sp_from_cpustate from macro to inline linux-user/mmap.c: Always zero MAP_ANONYMOUS memory in mmap_frag() linux-user,sh4: fix signal retcode address linux-user: check fd is >= 0 in fd_trans_host_to_target_data/fd_trans_host_to_target_addr linux-user: manage bind with a socket of SOCK_PACKET type. linux-user: add a function hook to translate sockaddr linux-user: rename TargetFdFunc to TargetFdDataFunc, and structure fields accordingly linux-user: SOCK_PACKET uses network endian to encode protocol in socket() linux-user/syscall.c: malloc()/calloc() to g_malloc()/g_try_malloc()/g_new0() linux-user: in poll(), if nfds is 0, pfd can be NULL linux-user: correctly align target_epoll_event linux-user: add signalfd/signalfd4 syscalls Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11linux-user/mmap.c: Use end instead of real_end in target_mmapChen Gang
The fragment must effectively be mapped only to "end" not to "real_end" (which is a host page aligned address, and thus this is not a fragment). It is consistent with what it is done in the case of one single page. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2016-01-11Merge remote-tracking branch ↵Peter Maydell
'remotes/mjt/tags/pull-trivial-patches-2016-01-11' into staging trivial patches for 2016-01-11 # gpg: Signature made Mon 11 Jan 2016 08:39:32 GMT using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2016-01-11: hw/s390x: Remove superfluous return statements hw/core/qdev: Remove superfluous return statement hw/acpi: Remove superfluous return statement hw/ide: Remove superfluous return statements osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.h scripts/checkpatch.pl: Don't allow special cases of unspaced operators PCI Bonito: QOMify and cleanup SH PCI Host: convert to realize() gt64120: convert to realize() Add missing syscall nrs. according to more recent Linux kernels hw/misc/edu: Convert to realize() configure: fix trace backend check xen/Makefile.objs: simplify crypto: Fix typo in example MAINTAINERS: Add the correct device_tree.h file iscsi: fix readcapacity error message net: convert qemu_log to error_report, fix message linux-user: enable sigaltstack for all architectures unicore32: convert get_sp_from_cpustate from macro to inline Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11linux-user: Add SOCKOP_sendmmsg and SOCKOP_recvmmsg socket call, wire them up.John Paul Adrian Glaubitz
Adds the definitions for the socket calls SOCKOP_sendmmsg and SOCKOP_recvmmsg and wires them up with the rest of the code. The necessary function do_sendrecvmmsg() is already present in linux-user/syscall.c. After adding these two definitions and wiring them up, I no longer receive an error message about the unimplemented socket calls when running "apt-get update" on Debian unstable running on qemu with glibc_2.21 on m68k. Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2016-01-11linux-user: Update m68k syscall definitions to match Linux 4.4.John Paul Adrian Glaubitz
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2016-01-11Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into ↵Peter Maydell
staging # gpg: Signature made Mon 11 Jan 2016 05:22:16 GMT using RSA key ID 398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: (24 commits) ether/slirp: Avoid redefinition of the same constants l2tpv3: fix cookie decoding net: ne2000: fix bounds check in ioport operations net: rocker: fix an incorrect array bounds check vmxnet3: Introduce 'x-disable-pcie' back-compat property vmxnet3: Report the Device Serial Number capability vmxnet3: The vmxnet3 device is a PCIE endpoint vmxnet3: coding: Introduce VMXNET3Class vmxnet3: Introduce 'x-old-msi-offsets' back-compat property vmxnet3: Change the offset of the MSIX PBA table vmxnet3: Change offsets of msi/msix pci capabilities net/filter: fix nf->netdev_id leak net/dump: fix nfds->filename leak net/vmxnet3: rename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION net/vmxnet3: return 0 on unknown command net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command net/vmxnet3: return 1 on device activation failure MAINTAINERS: Add an entry for the net/slirp.c file net: vmxnet3: avoid memory leakage in activate_device ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.6-20160111' ↵Peter Maydell
into staging ppc patch queue 2016-01-11 Biggest content is a thorough cleanups of spapr machine type handling. Also contains several other minor cleanups, bugfixes and extensions. # gpg: Signature made Mon 11 Jan 2016 04:34:38 GMT using RSA key ID 20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.6-20160111: hw/ppc/spapr: fix spapr->kvm_type leak spapr vio: fix to incomplete QOMify hw/ppc/spapr: Use XHCI as host controller for new spapr machines pseries: Add pseries-2.6 machine type pseries: Improve setting of default machine version pseries: Restructure class_options functions pseries: DEFINE_SPAPR_MACHINE pseries: Use SET_MACHINE_COMPAT Move SET_MACHINE_COMPAT macro to boards.h pseries: Remove versions from mc->desc pseries: Remove redundant calls to spapr_machine_initfn() pseries: Rearrange versioned machine type code pseries: Remove redundant setting of mc->name for pseries-2.5 machine spapr: Add /system-id target-ppc: Define kvmppc_read_int_dt() hw/ppc/spapr_rtc: Remove bad class_size value Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt()Chen Gang
In this case, level is TARGET_SOL_SOCKET, but we need SOL_SOCKET for setsockopt(). Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2016-01-11Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell
acpi dsdt rework, misc fixes This completes the dsdt rewrite, and includes misc fixes all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sat 09 Jan 2016 21:20:34 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (59 commits) virtio: fix error message for number of queues ivshmem: Store file descriptor for vhost-user negotiation migration/virtio: Remove simple .get/.put use Add VMSTATE_STRUCT_VARRAY_KNOWN i386/pc: expose identifying the floppy controller pc: acpi: remove unused ASL templates and related blobs/utils pc: acpi: switch to AML API composed DSDT pc: acpi: q35: PCST, PCSB opregions and PCIB field into SSDT pc: acpi: q35: move PCI0 device definition into SSDT pc: acpi: q35: move PCI0._OSC() method into SSDT pc: acpi: q35: move _PIC() method into SSDT pc: acpi: q35: move PRTP routing table into SSDT pc: acpi: q35: move PRTA routing table into SSDT pc: acpi: q35: move _PRT() into SSDT pc: acpi: q35: move ISA bridge into SSDT pc: acpi: q35: move IQST() into SSDT pc: acpi: q35: move IQCR() into SSDT pc: acpi: q35: move link devices to SSDT pc: acpi: q35: move GSI links to SSDT pc: acpi: piix4: acpi move PCI0 device to SSDT ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11hw/s390x: Remove superfluous return statementsThomas Huth
The "return;" statements at the end of functions do not make much sense, so let's remove them. Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Alexander Graf <agraf@suse.de> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11hw/core/qdev: Remove superfluous return statementThomas Huth
The "return;" statement at the end of device_set_realized() does not make much sense, so let's remove it. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11hw/acpi: Remove superfluous return statementThomas Huth
The "return;" statement at the end of acpi_memory_plug_cb() does not make much sense, so let's remove it. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11hw/ide: Remove superfluous return statementsThomas Huth
The "return;" statements at the end of functions do not make much sense, so let's remove them. Cc: qemu-block@nongnu.org Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11osdep.h: Include glib-compat.h in osdep.h rather than qemu-common.hPeter Maydell
Our use of glib is now pervasive across QEMU. Move the include of glib-compat.h from qemu-common.h to osdep.h so that it is more widely accessible and doesn't get forgotten by accident. (Failure to include it will result in build failure on old versions of glib which is likely to be unnoticed by most developers.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11scripts/checkpatch.pl: Don't allow special cases of unspaced operatorsPeter Maydell
The checkpatch.pl script has a special case to permit the following operators to have no spaces around them: << >> & ^ | + - * / % QEMU style prefers all operators to consistently have spacing around them, so remove this special case handling. This avoids reviewers having to manually note it during code review. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11PCI Bonito: QOMify and cleanupCao jin
Also clear the code Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11SH PCI Host: convert to realize()Cao jin
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11gt64120: convert to realize()Cao jin
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11Add missing syscall nrs. according to more recent Linux kernelsJohan Ouwerkerk
This change covers arm, aarch64, mips. Others to follow? The change was prompted by QEMU warning about a syscall 384 (get_random()) with Debian armhf binaries (ARMv7). Signed-off-by: Johan Ouwerkerk <jm.ouwerkerk@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11hw/misc/edu: Convert to realize()Cao jin
for educational PCI device Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11configure: fix trace backend checkMarc-André Lureau
Found thanks to shellcheck! Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11xen/Makefile.objs: simplifyCao jin
merge last two lines, keep alphabetic order. Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11crypto: Fix typo in exampleEric Blake
The example code wouldn't even compile, since it did not use a consistent spelling for the Error ** parameter. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11MAINTAINERS: Add the correct device_tree.h fileThomas Huth
device_tree.h is not in the main directory, but under include/sysemu/ nowadays. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11iscsi: fix readcapacity error messageZhu Lingshan
fix:The error message for readcapacity 16 incorrectly mentioned a readcapacity 10 failure, fixed the error message. Signed-off-by: Zhu Lingshan <lszhu@suse.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11net: convert qemu_log to error_report, fix messagePaolo Bonzini
Ensure that the error is printed with the proper timestamp. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-01-11linux-user: enable sigaltstack for all architecturesMichael Tokarev
There is no reason to limit sigaltstack syscall to just a few architectures and pretend it is not implemented for others. If some architecture is not ready for this, that architecture should be fixed instead. This fixes LP#1516408. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2016-01-11hw/ppc/spapr: fix spapr->kvm_type leakDavid Gibson
Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> [fixed return type of spapr_machine_finalizefn()] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-11spapr vio: fix to incomplete QOMifyCao jin
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-11hw/ppc/spapr: Use XHCI as host controller for new spapr machinesThomas Huth
The OHCI has some bugs and performance issues, so for newer machines it's preferable to use XHCI instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-11pseries: Add pseries-2.6 machine typeDavid Gibson
Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Improve setting of default machine versionDavid Gibson
This tweaks the way the default machine version is controlled, so that there will be a bit less churn when each new version is introduced. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Restructure class_options functionsDavid Gibson
Currently each of the *_class_options() functions for the pseries-2.1 .. pseries-2.5 machine types are standalone. This will become harder to maintain as new versions are added. This patch restructures them similarly to x86 where each function calls the one from the next version, then overrides anything necessary for compatibility with the specific version and older. The default behaviour - that for the most recent machine are set up in the base class initializer spapr_machine_class_init(). Previously it had some things set up to default to older behaviour with the more recent machines overriding it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: DEFINE_SPAPR_MACHINEDavid Gibson
At the moment all the class_init functions and TypeInfo structures for the various versioned pseries machine types are open-coded. As more versions are created this is getting increasingly clumsy. This patch borrows the approach used in PC, using a DEFINE_SPAPR_MACHINE() macro to construct most of the boilerplate from simpler 'class_options' and 'instance_options' functions. This patch makes a small semantic change - the versioned machine types are now registered through machine_init() instead of type_init(). Since the new way is how PC already did it, I'm assuming that's correct. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Use SET_MACHINE_COMPATDavid Gibson
To make the spapr_machine_*_class_init() functions a little less bulky. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11Move SET_MACHINE_COMPAT macro to boards.hDavid Gibson
pc.h defines a SET_MACHINE_COMPAT macro to make setting up compat_props for the various PC machine versions less verbose. There's nothing inherently PC specific about it, though, so move it to boards.h where other versioned machine types (like pseries-*) can use it. While we're doing that, change it's indentation to be a bit more regular. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Remove versions from mc->descDavid Gibson
Currently, the versioned spapr machine types put the machine type version into the description string. PC does not do this, using just the name itself to distinguish. Doing the same lets us move setting the description into the common base class, simplifying the code slightly. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-01-11pseries: Remove redundant calls to spapr_machine_initfn()David Gibson
The instance_init() functions for several of the pseries-x.y versioned machine types explicitly call spapr_machine_initfn(). But that's the instance_init function for the common parent of all those machine types, so will already have been called beforehand by the QOM infrastructure. Remove the redundant calls. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>