cpu: Move nr_{cores,threads} fields to CPUState
To facilitate the field movements, pass MIPSCPU to malta_mips_config();avoid that for mips_cpu_map_tc() since callers only access MIPS ThreadContexts, inside TCG helpers.
Signed-off-by: Andreas Färber <afaerber@suse.de>
target-mips: Clean up mips_cpu_map_tc() documentation
This function will be touched again soon, so a good understanding of envvs. other helps. Adopt gtk-doc style.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Eric Johnson <ericj@mips.com>
cpu: Move numa_node field to CPUState
virtio-9p: fix compilation error.
Fix the compilation error introduced by msg new field.
CC hw/9pfs/virtio-9p.oIn file included from /home/konradf/Documents/safe/greensocs/virtio-project/x86-qemu/qemu/hw/9pfs/virtio-9p.c:17:0:/home/konradf/Documents/safe/greensocs/virtio-project/x86-qemu/qemu/hw/virtio-pci.h:30:16: erreur: field ‘msg’ has incomplete type...
virtio-pci: build for uninitialized return value in vq_vector_unmask
Fixes the following:
/home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function‘kvm_virtio_pci_vector_unmask’:/home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: ‘ret’ may beused uninitialized in this function [-Werror=uninitialized]...
dataplane: fix build breakage on set_guest_notifiers()
virtio_pci_set_guest_notifiers() now takes an additional argument tospecify the number of virtqueues to assign a guest notifier for. Thiscauses a build breakage for CONFIG_VIRTIO_BLK_DATA_PLANE builds:...
Add TEWS TPCI200 IndustryPack emulation
The TPCI200 is a PCI board that supports up to 4 IndustryPack modules.
A new bus type called 'IndustryPack' has been created so anycompatible module can be attached to this board.
Reviewed-by: Andreas Färber <afaerber@suse.de>...
Add GE IP-Octal 232 IndustryPack emulation
The GE IP-Octal 232 is an IndustryPack module that implements eightRS-232 serial ports, each one of which can be redirected to acharacter device in the host.
Signed-off-by: Alberto Garcia <agarcia@igalia.com>...
Merge remote-tracking branch 'kraxel/pixman.v6' into staging
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'kraxel/usb.76' into staging
Merge remote-tracking branch 'spice/spice.v67' into staging
Merge remote-tracking branch 'kraxel/testdev.2' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci,virtio
This further optimizes MSIX handling in virtio-pci.Also included is pci cleanup by Paolo, and pci deviceassignment fix by Alex.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
Merge remote-tracking branch 'bonzini/stub' into staging
Merge remote-tracking branch 'qmp/queue/qmp' into staging
pixman: pass extra cflags and ldflags
Store --extra-cflags and --extra-ldflags in config-host.mak,then pass them on to the pixman configure script.
Cc: Scott Wood <scottwood@freescale.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ehci: Assert state machine is sane w.r.t. EHCIQueue
Coverity worries the EHCIQueue pointer could be null when we pass itto functions that reference it. The state machine ensures it can't benull then. Assert that, to hush the checker.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
usb-host: Drop superfluous null test from usb_host_auto_scan()
Coverity points out that port is later passed to usb_host_open(),which dereferences it. It actually can't be null: it always points tousb_host_scan()'s auto port[]. Drop the superfluous port == NULL...
usb-host: Initialize dev->port the obviously safe way
Coverity worries the strcpy() could overrun the destination. Itcan't, because the source always points to usb_host_scan()'s autoport[], which has the same size. Use pstrcpy() anyway, to hush thechecker....
dataplane: extract virtio-blk read/write processing into do_rdwr_cmd()
Extract code for read/write command processing into do_rdwr_cmd(). Thisbrings together pieces that are spread across process_request().
The real motivation is to set the stage for handling misaligned...
dataplane: handle misaligned virtio-blk requests
O_DIRECT on Linux has alignment requirements on I/O buffers andmisaligned requests result in -EINVAL. The Linux virtio_blk guestdriver usually submits aligned requests so I forgot to handle misalignedrequests....
block: do not probe zero-sized disks
A blank CD or DVD is visible as a zero-sized disks. Probing suchdisks will lead to an EIO and a failure to start the VM. Treatingthem as raw is a better solution.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
sheepdog: implement direct write semantics
Sheepdog supports both writeback/writethrough write but has not yet supportedDIRECTIO semantics which bypass the cache completely even if Sheepdog daemon isset up with cache enabled.
Suppose cache is enabled on Sheepdog daemon size, the new cache control is...
raw-posix: fix bdrv_aio_ioctl
When the raw-posix aio=thread code was moved from posix-aio-compat.cto block/raw-posix.c, there was an unintended change to the ioctl code.The code used to return the ioctl command, which posix_aio_read()would later morph into a zero. This hack is not necessary anymore,...
block: make qiov_is_aligned() public
The qiov_is_aligned() function checks whether a QEMUIOVector meets aBlockDriverState's alignment requirements. This is needed byvirtio-blk-data-plane so:
1. Move the function from block/raw-posix.c to block/block.c....
xhci: create xhci_detach_slot helper function
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci: call xhci_detach_slot on root port detach too
xhci: nuke transfe5rs on detach
pc-testdev: use typedefs
qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check
The pointer arithmetic there is safe, but ugly. Coverity grousesabout it. However, the actual comparison is off by one: <= endinstead of < end. Fix by rewriting the check in a cleaner way....
qxl: Don't drop client capability bits
interface_set_client_capabilities() copies only the first few bits,because it falls into a Classic C trap: you can declare a parameteruint8_t caps58, but the resulting parameter type is uint8_t *, notuint8_t58. In particular, sizeof(caps) is sizeof(uint8_t *), not...
build: move QAPI definitions for QEMU out of qapi-obj-y
There is no reason why for example qemu-ga should include all thedefinitions for the QEMU monitor. However, there are a fewthat are needed (qapi_free_SocketAddress, qapi_free_InetSocketAddress,ErrorClass_lookup). These should be moved to a separate "core"...
build: move base QAPI files to libqemuutil.a
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: move version-obj-y to the generic LINK rule
There is no reason for it to be in block-obj-y, in particular.
build: remove coroutine-obj-y
Just fold it into block-obj-y.
build: some simplifications for "trace/Makefile.objs"
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: fold trace-obj-y into libqemuutil.a
build: improve quiet output for .stp rules
Mention the directory in which the .stp file is being generated.
libcacard: list oslib-obj-y file explicitly
We will grow the list of files in the next patches, but libcacardshould remain slim.
build: rename oslib-obj-y to util-obj-y
This prepares the creation of libqemuutil.a in the next patch.
build: move util-obj-y to libqemuutil.a
Use a static library to eliminate repetition in the linking rules.
build: move files away from tools-obj-y, common-obj-y, user-obj-y
Split them between libqemuutil.a and, for those used by qemu-img/io/nbd,block-obj-y.
Static libraries ensure that binaries such as qemu-ga do not includeunused modules.
build: move libqemuutil.a components to util/
build: move qobject files to qobject/ and libqemuutil.a
build: consolidate multiple variables into universal-obj-y
The directory descent mechanism, and a less-flat tree both helpedin making some *-obj-y definitions very short. Many of theseoften end up in universal-obj-y, and used to be separate onlybecause of libuser (which is now part of history...)....
libcacard: rewrite Makefile in non-recursive style
libcacard: link vscclient to dynamic library
There is no reason for vscclient to duplicate the code. rules.maktakes care of invoking libtool to do the link.
libcacard: use per-target variable definitions
This lets the libcacard Makefile use more rules.mak magic.
libcacard: add list of exported symbols
Do not export internal QEMU symbols.
build: remove CONFIG_SMARTCARD
The passthru smartcard does not have the shared library dependency, buildit unconditionally.
libcacard: fix missing symbol in libcacard.so
Before patch:$ make libcacard.la$ nm ./libcacard/.libs/libcacard.so.0.0.0 | grep " U " | \ egrep -v "(g_)|(GLIBC)|(SECMOD)|(PK11)|(CERT)|(NSS)|(PORT)|(PR)" U error_set
Signed-off-by: Alon Levy <alevy@redhat.com>...
libcacard: require libtool to build it
Do not fail at build time, instead just disable the library if libtoolis not present.
libcacard: prepare to use -y trick in the Makefile
Rename variables to follow the conventions of the rest of the buildsystems.
build: support linking with libtool objects/libraries
This patch moves the complication of using libtool to the genericrules.mak file.
build: move dtrace rules to rules.mak
stubs: fully replace qemu-tool.c and qemu-user.c
build: make libtool verbose when making with V=1
qemu-option: move standard option definitions out of qemu-config.c
Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm
Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf
Merge branch 's390-reorg' of git://repo.or.cz/qemu/rth
hw/pc.c: add ULL suffix in ioport80_read and ioportF0_read return value
The commit c02e1eac887b1b0aee7361b1fcf889e7d47fed9d broke the compilationfor i386. ULL need to be specify for uint64_t value.
Signed-off-by: Julien Grall <julien.grall@citrix.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg-i386: use LEA for 3-operand 64-bit addition
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pixman: fix warning
Cc: afaerber@suse.deCc: agraf@suse.deSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
optionrom: build with discrete CPP and AS steps
Build option ROM .S files with separate preprocessor andassembler steps because the C compiler could be unsuitable.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
slirp: remove unused field tt
user: Consider symbolic links as possible directories
Commit 2296f194dfde4c0a54f249d3fdb8c8ca21dc611b reduced the numberof syscalls performed during user emulation startup, but failed toconsider the use of symbolic links in creating directory structures....
alpha-linux-user: Fix sigaction
Unconditional bswap replaced by _get_user/_put_user.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
linux-user: Rewrite _get_user/_put_user with __builtin_choose_expr
The previous formuation with multiple assignments to __typeof(*hptr) fallsdown when hptr is qualified const. E.g. with const struct S *p, p->f isalso qualified const.
With this formulation, there's no assignment to any local variable....
bswap: Rewrite cpu_to_<endian><type>u with {ld,st}<type>_<endian>_p
We've now optimized the ld/st versions; reuse that for the "legacy" versions. Always use inlines so that we get the type checking thatwe expect.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
bswap: Rewrite all ld<type>_<endian>_p functions
Use the new host endian unaligned access functions instead ofopen coding byte-by-byte references. Remove assembly specialcases for i386 and ppc -- we've now exposed the operation tothe compiler sufficiently for these to be optimized automatically....
bswap: Add host endian unaligned access functions
bswap: Tidy base definitions of bswapN
Move the bswap_N -> bswapN wrappers inside CONFIG_BYTESWAP_H.
Change the ultimate fallback defintions from macros to inline functions.The proper types recieved by the function arguments means we can removeunnecessary casts, making the code more readable....
fdt: Use bswapN instead of bswap_N
Fixes the libfdt enabled build for hosts that have <machine/bswap.h>.
The code at the beginning of qemu/bswap.h is attempting to standardizeon bswapN. In the case of CONFIG_MACHINE_BSWAP_H, this is all we get.In the case of CONFIG_BYTESWAP_H, we get bswap_N from the system header...
target-arm: use type_register() instead of type_register_static()
The type_register_static() interface is documented as:
type_register_static: @info: The #TypeInfo of the new type.
@info and all of the strings it points to should exist for the life...
target-arm: Fix SWI (SVC) instruction in M profile.
When do_interrupt_v7m is called with EXCP_SWI, the PC alreadypoints to the next instruction. Don't modify it here.
Signed-off-by: Alex Rozenman <Alex_Rozenman@mentor.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'kraxel/q35.1' into staging
Conflicts:...
Merge remote-tracking branch 'afaerber-or/prep-up' into staging
hw/pc.c: Fix converting of ioport_register* to MemoryRegion
The commit 258711 introduced MemoryRegion to replace ioport_region*for ioport 80h and F0h.A MemoryRegion needs to have both read and write callback otherwise a segfaultwill occur when an access is made....
Replace remaining gmtime, localtime by gmtime_r, localtime_r
This allows removing of MinGW specific code and improvesreentrancy for POSIX hosts.
[Removed unused ret variable in qemu_get_timedate() to fix warning:vl.c: In function ‘qemu_get_timedate’:vl.c:451:16: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]...
savevm: Remove MinGW specific code which is no longer needed
QEMU provides a portable function qemu_gettimeofday instead ofgettimeofday and also an implementation of localtime_r for MinGW.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qga/channel-posix.c: Explicitly include string.h
Explicitly include string.h to avoid warnings under MacOS X/clangabout implicit declarations of strerror() and strlen().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Stefan Weil <sw@weilnetz.de>...
configure: Fix comment (copy+paste bug)
q35: add ich9 intel hda controller
q35: document chipset devices
pc: rename machine types
Starting with release 1.4 we have a fully functional q35 machine type,i.e. "qemu -M q35" JustWorks[tm]. Update machine type names to reflectthat:
The pc-1.3 (+older) names are maintained for compatibility reasons....
Makefile: install the "acpi-dsdt.aml" and "q35-acpi-dsdt.aml" blobs too
The WARNING message from commit f7e4dd6c made me notice.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qdev: add qbus_reset_all
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-scsi: abort in-flight I/O when the device is reset
When the device is reset, the SCSI bus should also be reset sothat in-flight I/O is cancelled.
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register alltypes natively through QEMU Object Model), TypeInfo as used inthe common, non-iterative pattern is no longer amended with informationand should therefore be const....
Merge branch 'master' of git://git.qemu.org/qemu into prep-up
Conflicts: hw/Makefile.objs hw/ppc_prep.c
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Merge remote-tracking branch 'kraxel/build.1' into staging
Merge remote-tracking branch 'awilliam/tags/qemu-1.4-vfio-20130109.0' into staging
vfio-pci: Fixes for qemu 1.4 & stable
monitor: assert monitor_puts()'s loop invariant
Chiefly to hush up Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
rtc-test: skip year-2038 overflow check in case time_t is 32bit only
m48t59-test: don't touch watchdog
target-i386: fix bits 39:32 of the final physical address when using 4M page
((pde & 0x1fe000) << 19) is the bits 39:32 of the final physical address, andwe shouldn't use unit32_t to calculate it. Convert the type to hwaddr to fixthis problem.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>...