]> git.proxmox.com Git - qemu.git/log
qemu.git
10 years agopc: disable pci-info for 1.6
Michael S. Tsirkin [Thu, 1 Aug 2013 12:39:11 +0000 (15:39 +0300)]
pc: disable pci-info for 1.6

The BIOS that we ship in 1.6 does not use pci info
from host (yet). Several issues turned up
(e.g. around winXP boot crashes). So it's safest to disable that
interface for 1.6 machine types for now, leave it on for 1.7
as we have enough time to fix issues if any.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
10 years agofw_cfg: the I/O port variant expects little-endian
Paolo Bonzini [Sun, 28 Jul 2013 12:35:54 +0000 (14:35 +0200)]
fw_cfg: the I/O port variant expects little-endian

The I/O port variant of fw_cfg is used by sparc64, which is a big-endian machine.
Firmware swaps bytes before sending them to fw_cfg, so we need to unswap them in
the device.

This is only used on sparc64 and on (little-endian) x86, so it does not affect
any other target.  32-bit Sparc and PPC all use memory-mapped fw_cfg.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 1375014954-31916-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agopo: Update all *.po files
Stefan Weil [Mon, 5 Aug 2013 19:45:22 +0000 (21:45 +0200)]
po: Update all *.po files

Running "make install" modified the *.po files because
they were no longer up to date.

Synchronize them with latest ui/gtk.c and modified build
rules which use paths relative to the project root.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1375731922-24259-1-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc: Add POWER5+ v2.1 CPU model
Andreas Färber [Thu, 1 Aug 2013 01:42:03 +0000 (03:42 +0200)]
target-ppc: Add POWER5+ v2.1 CPU model

Let's avoid -cpu host barfing at this PVR.
Linux recognizes it as "POWER5+ (gs) v2.1".

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375321323-29954-5-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc: Prepare POWER5P CPU family
Andreas Färber [Thu, 1 Aug 2013 01:42:02 +0000 (03:42 +0200)]
target-ppc: Prepare POWER5P CPU family

It is ISA 2.03. Modelled as 970FX minus AltiVec flag.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375321323-29954-4-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc: Turn POWER5gr CPU into alias for POWER5
Andreas Färber [Thu, 1 Aug 2013 01:42:01 +0000 (03:42 +0200)]
target-ppc: Turn POWER5gr CPU into alias for POWER5

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375321323-29954-3-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc: Turn POWER5gs CPU into alias for POWER5+
Andreas Färber [Thu, 1 Aug 2013 01:42:00 +0000 (03:42 +0200)]
target-ppc: Turn POWER5gs CPU into alias for POWER5+

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375321323-29954-2-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc: Fix POWER7+ model
Andreas Färber [Mon, 5 Aug 2013 20:59:46 +0000 (22:59 +0200)]
target-ppc: Fix POWER7+ model

Commit 03a15a5436ed7723f406f15cc3798aa9991e75b5 claimed to add a POWER7+
model but instead added a "POWER7P" model, with an unhelpful "POWER7P"
description on top. Fix this to "POWER7+" as we already have "POWER3+",
"POWER4+" and "POWER5+" and there being no reason to deviate with the
user-visible command line -cpu POWER7P from the marketing name POWER7+.

Further, don't needlessly deviate from the scheme of naming PVR constant,
QOM type and device description after the exact revision that is in fact
encoded in the PVR used.
That way, we can change the user-friendly alias -cpu POWER7+ to point to a
different revision if we so desire, while not polluting the type namespace.

This naming scheme is sensible and completely orthogonal to how PVRs may
or may not get matched to CPU types.

Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375736387-8429-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoBugfix for loading multiboot kernels
Martijn van den Broek [Tue, 6 Aug 2013 18:45:39 +0000 (20:45 +0200)]
Bugfix for loading multiboot kernels

This patch fixes a bug in rom_copy introduced by
commit d60fa42e8bae39440f997ebfe8fe328269a57d16.

rom_copy failed to load roms with a "datasize" of 0.
As a result, multiboot kernels were not loaded correctly
when they contain a segment with a "file size" of 0.

https://bugs.launchpad.net/qemu/+bug/1208944

Signed-off-by: Martijn van den Broek <martijn.vdbrk@gmail.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: CAG1x_oET1u3TMPu3r_zzd3ZXsTWQLiaM0zAc+RkHFCwvJjGOvg@mail.gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
Anthony Liguori [Wed, 7 Aug 2013 17:43:34 +0000 (12:43 -0500)]
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

* Clean up X86CPU error handling

# gpg: Signature made Tue 06 Aug 2013 01:57:34 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Andreas Färber
# Via Andreas Färber
* afaerber/tags/qom-cpu-for-anthony:
  target-i386: Fix X86CPU error handling

10 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Wed, 7 Aug 2013 17:43:27 +0000 (12:43 -0500)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

# By Fam Zheng (8) and others
# Via Kevin Wolf
* kwolf/for-anthony:
  vmdk: rename num_gtes_per_gte to num_gtes_per_gt
  vmdk: use heap allocation for whole_grain
  vmdk: check l1 size before opening image
  vmdk: check l2 table size when opening
  vmdk: check granularity field in opening
  qemu-iotests: add empty test case for vmdk
  qemu-iotests: add poke_file utility function
  vmdk: use unsigned values for on disk header fields
  vmdk: Make VMDK3Header and VmdkGrainMarker QEMU_PACKED
  sheepdog: add missing .bdrv_has_zero_init
  qemu-iotests: filter QEMU version in monitor banner
  iov: handle EOF in iov_send_recv
  ignore SIGPIPE in qemu-img and qemu-io
  qemu-img: Error out for excess arguments

Message-id: 1375799990-995-1-git-send-email-kwolf@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-i386: Fix X86CPU error handling
Andreas Färber [Fri, 2 Aug 2013 16:56:05 +0000 (18:56 +0200)]
target-i386: Fix X86CPU error handling

Error **errp argument is not for emitting warnings, it means an error
has occurred and the caller should not make any assumptions about the
state of other return values (unless otherwise documented).

Therefore cpu_x86_create() must unref the new X86CPU itself, and
pc_new_cpu() must check for an Error rather than NULL return value.

While at it, clean up a superfluous NULL check.

Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-stable@nongnu.org
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agovmdk: rename num_gtes_per_gte to num_gtes_per_gt
Fam Zheng [Tue, 6 Aug 2013 07:44:55 +0000 (15:44 +0800)]
vmdk: rename num_gtes_per_gte to num_gtes_per_gt

num_gtes_per_gte is a historical typo, rename it to a more sensible
name. It means "number of GrainTableEntries per GrainTable".

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agovmdk: use heap allocation for whole_grain
Fam Zheng [Tue, 6 Aug 2013 07:44:54 +0000 (15:44 +0800)]
vmdk: use heap allocation for whole_grain

We should never grow the stack beyond 1 MB, otherwise we'll fall off the
end.  Thread stacks and coroutine stacks (1 MB) do not grow.
get_cluster_offset() allocates a big stack offset, it will fail for big
cluster images, change to heap allocated buffer.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agovmdk: check l1 size before opening image
Fam Zheng [Tue, 6 Aug 2013 07:44:53 +0000 (15:44 +0800)]
vmdk: check l1 size before opening image

L1 table size is calculated from capacity, granularity and l2 table
size. If capacity is too big or later two are too small, the L1 table
will be too big to allocate in memory. Limit it to a reasonable range.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agovmdk: check l2 table size when opening
Fam Zheng [Tue, 6 Aug 2013 07:44:52 +0000 (15:44 +0800)]
vmdk: check l2 table size when opening

header.num_gtes_per_gte determines size for L2 table. Check for too big
value before using it. Limit to 512M entries (2GB per one L2 table).

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agovmdk: check granularity field in opening
Fam Zheng [Tue, 6 Aug 2013 07:44:51 +0000 (15:44 +0800)]
vmdk: check granularity field in opening

Granularity is used to calculate the cluster size and allocate r/w
buffer. Check the value from image before using it, so we don't abort()
for unbounded memory allocation.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agoqemu-iotests: add empty test case for vmdk
Fam Zheng [Tue, 6 Aug 2013 07:44:50 +0000 (15:44 +0800)]
qemu-iotests: add empty test case for vmdk

Will add vmdk specific tests later here.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agoqemu-iotests: add poke_file utility function
Stefan Hajnoczi [Tue, 6 Aug 2013 07:44:49 +0000 (15:44 +0800)]
qemu-iotests: add poke_file utility function

The new poke_file function sets bytes at an offset in a file given a
printf-style format string.  It can be used to corrupt an image file for
test coverage of error paths.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agovmdk: use unsigned values for on disk header fields
Fam Zheng [Tue, 6 Aug 2013 07:44:48 +0000 (15:44 +0800)]
vmdk: use unsigned values for on disk header fields

The size and offset fields are all non-negative values, use uint64_t for
them to avoid getting negative in memory value by int overflow.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agovmdk: Make VMDK3Header and VmdkGrainMarker QEMU_PACKED
Fam Zheng [Tue, 6 Aug 2013 07:44:47 +0000 (15:44 +0800)]
vmdk: Make VMDK3Header and VmdkGrainMarker QEMU_PACKED

It's best to make it consistent that all on disk structures are
QEMU_PACKED.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agotarget-mips: fix decoding of microMIPS POOL32Axf instructions
Leon Alrae [Tue, 6 Aug 2013 10:59:25 +0000 (11:59 +0100)]
target-mips: fix decoding of microMIPS POOL32Axf instructions

Fix incorrect assumption that DSP and non-DSP versions of the following
instructions have the same encoding:
MULT, MULTU, MADD, MADDU, MSUB, MSUBU, MFHI, MFLO, MTHI, MTLO.
Correct the existing (non-DSP) instructions and add DSP equivalents.

Reference:
MIPS Architecture for Programmers Volume II-B: The microMIPS32
Instruction Set
MIPS Architecture for Programmers Volume IV-e: The MIPS DSP Module for
the microMIPS32 Architecture

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
10 years agosheepdog: add missing .bdrv_has_zero_init
Liu Yuan [Tue, 6 Aug 2013 06:44:37 +0000 (14:44 +0800)]
sheepdog: add missing .bdrv_has_zero_init

Commit 3ac21627 changed the behaviour of bdrv_has_zero_init() to default
to 0. In the review for Sheepdog it turned out that enabling it is safe,
so that commit updated one BlockDriver definition of sheepdog to use
bdrv_has_zero_init_1, missed however that there are more BlockDrivers in
the driver. Fix these now.

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agoqemu-iotests: filter QEMU version in monitor banner
Stefan Hajnoczi [Mon, 5 Aug 2013 12:40:34 +0000 (14:40 +0200)]
qemu-iotests: filter QEMU version in monitor banner

Filter out the QEMU monitor version banner so that tests do not break
when the QEMU version number is changed.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agoiov: handle EOF in iov_send_recv
MORITA Kazutaka [Tue, 23 Jul 2013 08:30:12 +0000 (17:30 +0900)]
iov: handle EOF in iov_send_recv

Without this patch, iov_send_recv() never returns when do_send_recv()
returns zero.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agoignore SIGPIPE in qemu-img and qemu-io
MORITA Kazutaka [Tue, 23 Jul 2013 08:30:11 +0000 (17:30 +0900)]
ignore SIGPIPE in qemu-img and qemu-io

This prevents the tools from being stopped when they write data to a
closed connection in the other side.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
10 years agoqemu-img: Error out for excess arguments
Kevin Wolf [Mon, 5 Aug 2013 08:53:04 +0000 (10:53 +0200)]
qemu-img: Error out for excess arguments

Don't silently ignore excess arguments at the end of the command line,
but error out instead. This can catch typos like 'resize test.img + 1G',
which doesn't increase the image size by 1G as intended, but truncates
the image to 1G. Even for less dangerous commands, the old behaviour is
confusing.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agosemaphore: fix a hangup problem under load on NetBSD hosts.
Izumi Tsutsui [Wed, 3 Jul 2013 08:58:14 +0000 (17:58 +0900)]
semaphore: fix a hangup problem under load on NetBSD hosts.

Fix following bugs in "fallback implementation of counting semaphores
with mutex+condvar" added in c166cb72f1676855816340666c3b618beef4b976:
 - waiting threads are not restarted properly if more than one threads
   are waiting unblock signals in qemu_sem_timedwait()
 - possible missing pthread_cond_signal(3) calls when waiting threads
   are returned by ETIMEDOUT
 - fix an uninitialized variable
The problem is analyzed by and fix is provided by Noriyuki Soda.

Also put additional cleanup suggested by Laszlo Ersek:
 - make QemuSemaphore.count unsigned (it won't be negative)
 - check a return value of in pthread_cond_wait() in qemu_sem_wait()

Signed-off-by: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 1372841894-10634-1-git-send-email-tsutsui@ceres.dti.ne.jp
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agordma: memory leak RDMAContext::host
Isaku Yamahata [Sun, 4 Aug 2013 02:54:54 +0000 (22:54 -0400)]
rdma: memory leak RDMAContext::host

It is allocated by g_strdup(), so needs to be freed.

Reviewed-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Message-id: 1375584894-9917-8-git-send-email-mrhines@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agordma: use RDMA_WRID_READY
Isaku Yamahata [Sun, 4 Aug 2013 02:54:53 +0000 (22:54 -0400)]
rdma: use RDMA_WRID_READY

Reviewed-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Message-id: 1375584894-9917-7-git-send-email-mrhines@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agordma: qemu_rdma_post_send_control uses wrongly RDMA_WRID_MAX
Isaku Yamahata [Sun, 4 Aug 2013 02:54:52 +0000 (22:54 -0400)]
rdma: qemu_rdma_post_send_control uses wrongly RDMA_WRID_MAX

RDMA_WRID_CONTROL should be used. And remove related work around.

Reviewed-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Message-id: 1375584894-9917-6-git-send-email-mrhines@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agordma: don't use negative index to array
Isaku Yamahata [Sun, 4 Aug 2013 02:54:51 +0000 (22:54 -0400)]
rdma: don't use negative index to array

Reviewed-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Message-id: 1375584894-9917-5-git-send-email-mrhines@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agordma: correct newlines in error statements
Michael R. Hines [Sun, 4 Aug 2013 02:54:50 +0000 (22:54 -0400)]
rdma: correct newlines in error statements

Don't print newlines on the error_setg() function,
but still allow newlines on fprintf().

Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Message-id: 1375584894-9917-4-git-send-email-mrhines@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agordma: forgot to turn off the debugging flag
Michael R. Hines [Sun, 4 Aug 2013 02:54:49 +0000 (22:54 -0400)]
rdma: forgot to turn off the debugging flag

Ooops. We forgot to turn off the flag.

Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Message-id: 1375584894-9917-3-git-send-email-mrhines@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agordma: bugfix: make IPv6 support work
Michael R. Hines [Sun, 4 Aug 2013 02:54:48 +0000 (22:54 -0400)]
rdma: bugfix: make IPv6 support work

RDMA does not use sockets, so we cannot use many of the socket
helper functions, but we *do* use inet_parse() which gives
RDMA all the necessary details of the connection parameters.

However, when testing with libvirt, a simple IPv6 migration test failed
because we were not using getaddrinfo() properly.

This makes IPv6 migration over RDMA work.

Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Message-id: 1375584894-9917-2-git-send-email-mrhines@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agopxa2xx: Avoid object_get_link_property() assertion for "parent_bus"
Andreas Färber [Sun, 4 Aug 2013 13:05:01 +0000 (15:05 +0200)]
pxa2xx: Avoid object_get_link_property() assertion for "parent_bus"

pxa2xx_i2c_init() creates a pxa2xx-i2c-slave device on a second i2c-bus,
which has a NULL parent device. This causes an assertion in
object_get_canonical_path() when accessing pxa2xx-i2c-slave's
"parent_bus" link<bus> property in tosa and likely other PXA2xx machines.

Fix this by using the pxa2xx_i2c device, created just before, as parent.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375621501-5564-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc: Add POWER7+ CPU model
Alexey Kardashevskiy [Fri, 2 Aug 2013 02:59:34 +0000 (12:59 +1000)]
target-ppc: Add POWER7+ CPU model

This patch adds CPU PVR definition for POWER7+.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1375412374-24701-1-git-send-email-aik@ozlabs.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'filippov/tags/20130729-xtensa' into staging
Anthony Liguori [Mon, 5 Aug 2013 13:06:25 +0000 (08:06 -0500)]
Merge remote-tracking branch 'filippov/tags/20130729-xtensa' into staging

xtensa queue 2013-07-29

* filippov/tags/20130729-xtensa:
  target-xtensa: check register window inline
  target-xtensa: don't generate dead code to access invalid SRs
  tests/tcg/xtensa: Fix out-of-tree build
  target-xtensa: avoid double-stopping at breakpoints
  target-xtensa: add fallthrough markers
  target-xtensa: add extui unit test

Conflicts:
configure

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'mcayland/qemu-openbios' into staging
Anthony Liguori [Mon, 5 Aug 2013 13:03:01 +0000 (08:03 -0500)]
Merge remote-tracking branch 'mcayland/qemu-openbios' into staging

* mcayland/qemu-openbios:
  Update OpenBIOS images

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'stefanha/net' into staging
Anthony Liguori [Mon, 5 Aug 2013 13:01:48 +0000 (08:01 -0500)]
Merge remote-tracking branch 'stefanha/net' into staging

# By Jan Kiszka
# Via Stefan Hajnoczi
* stefanha/net:
  pcnet: Flush queued packets on end of STOP state

Message-id: 1375704975-19128-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'stefanha/block' into staging
Anthony Liguori [Mon, 5 Aug 2013 13:01:39 +0000 (08:01 -0500)]
Merge remote-tracking branch 'stefanha/block' into staging

# By Kevin Wolf
# Via Stefan Hajnoczi
* stefanha/block:
  block: Disable driver-specific options for 1.6

Message-id: 1375461379-20277-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'mjt/trivial-patches' into staging
Anthony Liguori [Mon, 5 Aug 2013 13:01:32 +0000 (08:01 -0500)]
Merge remote-tracking branch 'mjt/trivial-patches' into staging

# By Fam Zheng (1) and others
# Via Michael Tokarev
* mjt/trivial-patches:
  vmdk: fix comment for vmdk_co_write_zeroes
  memory.c: drop kvm.h dependency
  block/iscsi.c: Fix printf format error.
  qemu-ga: build it even if !system

Message-id: 1375453248-7178-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'kraxel/usb.86' into staging
Anthony Liguori [Mon, 5 Aug 2013 13:01:25 +0000 (08:01 -0500)]
Merge remote-tracking branch 'kraxel/usb.86' into staging

# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/usb.86:
  usb-redir: fix use-after-free
  xhci: fix segfault

Message-id: 1375362669-14815-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agopcnet: Flush queued packets on end of STOP state
Jan Kiszka [Fri, 2 Aug 2013 19:48:18 +0000 (21:48 +0200)]
pcnet: Flush queued packets on end of STOP state

Analogously to other NICs, we have to inform the network layer when
the can_receive handler will no longer report 0. Without this, we may
get stuck waiting on queued incoming packets.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agotarget-mips: fix 34Kf configuration for DSP ASE
Yongbok Kim [Fri, 2 Aug 2013 09:33:43 +0000 (10:33 +0100)]
target-mips: fix 34Kf configuration for DSP ASE

34Kf core does support DSP ASE.
CP0_Config3 configuration for 34Kf and description are wrong.

Please refer to MIPS32(R) 34Kf(TM) Processor Core Datasheet

Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
10 years agoblock: Disable driver-specific options for 1.6
Kevin Wolf [Tue, 30 Jul 2013 12:58:27 +0000 (14:58 +0200)]
block: Disable driver-specific options for 1.6

We don't want to commit to the API yet before everything is worked out.
Like already for 1.5, disable it again for the 1.6 release. This commit
is meant to be reverted after the 1.6 release.

The disabling of the driver-specific options is achieved by applying the
old checks while parsing the command line.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agovmdk: fix comment for vmdk_co_write_zeroes
Fam Zheng [Thu, 1 Aug 2013 10:12:17 +0000 (18:12 +0800)]
vmdk: fix comment for vmdk_co_write_zeroes

The comment was truncated. Add the missing parts, especially explain why
we need zero_dry_run.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agomemory.c: drop kvm.h dependency
Michael S. Tsirkin [Thu, 1 Aug 2013 07:55:30 +0000 (10:55 +0300)]
memory.c: drop kvm.h dependency

memory.c does not use any kvm specific interfaces,
don't include kvm.h

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agoblock/iscsi.c: Fix printf format error.
Richard W.M. Jones [Wed, 31 Jul 2013 21:20:26 +0000 (22:20 +0100)]
block/iscsi.c: Fix printf format error.

The error on armv7hl was:

block/iscsi.c: In function ‘is_request_lun_aligned’:
block/iscsi.c:251:26: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Werror=format=]
                          iscsilun->block_size, sector_num, nb_sectors);
                          ^

This also splits the long line to comply with qemu coding guidelines.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agoqemu-ga: build it even if !system
Michael Tokarev [Wed, 31 Jul 2013 10:22:07 +0000 (14:22 +0400)]
qemu-ga: build it even if !system

Move qemu-ga build check out of if softmmu.. into its own section.
We want to build qemu-ga for _guest_ even if system build isn't
done.  It is controlled separately using --enable-guest-agent.
Additionally, give error message if guest agent is requested but
not supported.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agoMerge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
Anthony Liguori [Thu, 1 Aug 2013 22:09:35 +0000 (17:09 -0500)]
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

* Clean up AlphaCPU and OpenRISCCPU migration

# gpg: Signature made Wed 31 Jul 2013 04:57:59 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Andreas Färber
# Via Andreas Färber
* afaerber/tags/qom-cpu-for-anthony:
  cpu: Fix VMSTATE_CPU() semantics

10 years agoMerge remote-tracking branch 'afaerber/tags/prep-for-upstream' into staging
Anthony Liguori [Thu, 1 Aug 2013 22:09:28 +0000 (17:09 -0500)]
Merge remote-tracking branch 'afaerber/tags/prep-for-upstream' into staging

PReP machine and devices

* Fixes for i82378 PCI-ISA bridge endianness handling

# gpg: Signature made Wed 31 Jul 2013 04:25:51 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Hervé Poussineau
# Via Andreas Färber
* afaerber/tags/prep-for-upstream:
  i82378: Cleanup implementation
  pci-host/prep: Set isa_mem_base in the PCI host bridge

10 years agoUpdate version for 1.6.0-rc1 v1.6.0-rc1
Anthony Liguori [Thu, 1 Aug 2013 21:59:32 +0000 (16:59 -0500)]
Update version for 1.6.0-rc1

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agovirtio-console: Use exitfn for virtserialport, too
Andreas Färber [Wed, 31 Jul 2013 23:28:46 +0000 (01:28 +0200)]
virtio-console: Use exitfn for virtserialport, too

virtconsole and virtserialport are identical in every other aspect
except for the distinguishing VirtIOSerialPortClass::is_console field.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375313326-14966-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agovirtio-9p-device: Avoid freeing uninitialized memory
Andreas Färber [Wed, 31 Jul 2013 23:59:47 +0000 (01:59 +0200)]
virtio-9p-device: Avoid freeing uninitialized memory

In virtio_9p_device_init() there are 6x goto out that will lead to
v9fs_path_free() attempting to free unitialized path.data field.
Easiest way to trigger is: qemu-system-x86_64 -device virtio-9p-pci

Fix this by moving v9fs_path_init() before any goto out.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375315187-16534-1-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'luiz/queue/qmp' into staging
Anthony Liguori [Thu, 1 Aug 2013 16:18:04 +0000 (11:18 -0500)]
Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Pawit Pornkitprasan
# Via Luiz Capitulino
* luiz/queue/qmp:
  migration: don't use uninitialized variables
  migration: send total time in QMP at "completed" stage

Message-id: 1375367564-4797-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agomigration: don't use uninitialized variables
Pawit Pornkitprasan [Mon, 29 Jul 2013 23:39:52 +0000 (08:39 +0900)]
migration: don't use uninitialized variables

The qmp_migrate method uses the 'blk' and 'inc' parameter without
checking if they're valid or not (they may be uninitialized if
command is received via QMP)

Signed-off-by: Pawit Pornkitprasan <p.pawit@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agomigration: send total time in QMP at "completed" stage
Pawit Pornkitprasan [Fri, 19 Jul 2013 02:23:45 +0000 (11:23 +0900)]
migration: send total time in QMP at "completed" stage

The "completed" stage sets total_time but not has_total_time and
thus it is not sent via QMP reply (but sent via HMP nevertheless)

Signed-off-by: Pawit Pornkitprasan <p.pawit@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agousb-redir: fix use-after-free
Gerd Hoffmann [Wed, 31 Jul 2013 09:17:58 +0000 (11:17 +0200)]
usb-redir: fix use-after-free

Reinitialize dev->cs to NULL after deleting it, to make sure it isn't
used afterwards.

Reported-by: Martin Cerveny <M.Cerveny@computer.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoxhci: fix segfault
Gerd Hoffmann [Wed, 31 Jul 2013 08:54:11 +0000 (10:54 +0200)]
xhci: fix segfault

Guest trying to reset a endpoint of a disconnected device resulted in
xhci trying to dereference uport while being NULL, thereby crashing
qemu.  Fix that by adding a check.  Drop unused dev variable while
touching that code bit.

Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoi82378: Cleanup implementation
Hervé Poussineau [Tue, 23 Jul 2013 21:16:46 +0000 (23:16 +0200)]
i82378: Cleanup implementation

- i82378 only exists on PCI bus; do not split implementation in 2 structs
- remove BARs, which are not specified in datasheet
- replace custom isa_mmio implementation by PCI bus IO region usage
- use QOM casts when required

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
[AF: Style- and QOM-related changes, dropped no_user, reverted VMSD name]
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
10 years agopci-host/prep: Set isa_mem_base in the PCI host bridge
Hervé Poussineau [Tue, 23 Jul 2013 21:16:45 +0000 (23:16 +0200)]
pci-host/prep: Set isa_mem_base in the PCI host bridge

Currently, it is done by i82378 PCI-ISA bridge, which shouldn't
care about it.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
10 years agocpu: Fix VMSTATE_CPU() semantics
Andreas Färber [Mon, 29 Jul 2013 02:07:50 +0000 (04:07 +0200)]
cpu: Fix VMSTATE_CPU() semantics

Commit 1a1562f5ea3da17d45d3829e35b5f49da9ec2db5 prepared a VMSTATE_CPU()
macro for device-style VMStateDescription registration, but missed to
adapt cpu_exec_init(), so that the "cpu_common" VMStateDescription was
still registered for AlphaCPU (fe31e7374299c0c6172ce618b29bf2fecbd881c7)
and OpenRISCCPU (da69721460e652072b6a3dd52b7693da21ffe237). Fix this.

Cc: Richard Henderson <rth@twiddle.net>
Tested-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoMAINTAINERS: change Igor Mitsyanko's email address
Igor Mitsyanko [Wed, 31 Jul 2013 06:27:35 +0000 (10:27 +0400)]
MAINTAINERS: change Igor Mitsyanko's email address

My email address in samsung.com domain is no longer accessible, change
it to my personal gmail address.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoqdev: Use clz in print_size
Richard Henderson [Tue, 30 Jul 2013 18:20:43 +0000 (08:20 -1000)]
qdev: Use clz in print_size

We can compute a floor log2 value with clz rather than a division loop.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-id: 1375208443-17288-3-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoqdev: Fix 32-bit compilation in print_size
Richard Henderson [Tue, 30 Jul 2013 18:20:42 +0000 (08:20 -1000)]
qdev: Fix 32-bit compilation in print_size

Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-id: 1375208443-17288-2-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'spice/spice.v72' into staging
Anthony Liguori [Tue, 30 Jul 2013 23:48:58 +0000 (18:48 -0500)]
Merge remote-tracking branch 'spice/spice.v72' into staging

# By Gerd Hoffmann
# Via Gerd Hoffmann
* spice/spice.v72:
  spice: fix display initialization

Message-id: 1375173625-3784-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'kraxel/usb.85' into staging
Anthony Liguori [Tue, 30 Jul 2013 23:48:54 +0000 (18:48 -0500)]
Merge remote-tracking branch 'kraxel/usb.85' into staging

# By Gerd Hoffmann (2) and Alexey Kardashevskiy (1)
# Via Gerd Hoffmann
* kraxel/usb.85:
  hcd-ohci: add dma error handling
  uhci: egsm fix
  xhci: handle USB_RET_IOERROR

Message-id: 1375173371-3378-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoMerge remote-tracking branch 'borntraeger/s390-for-1.6' into staging
Anthony Liguori [Tue, 30 Jul 2013 23:48:36 +0000 (18:48 -0500)]
Merge remote-tracking branch 'borntraeger/s390-for-1.6' into staging

* borntraeger/s390-for-1.6:
  s390: Implement dump-guest-memory support for target s390x
  s390x/kvm: Remove redundant return code
  s390x/kvm: Reworked/fixed handling of cc3 in kvm_handle_css_inst()
  s390x/ioinst: Fixed priority of operand exceptions
  s390x/ioinst: Fixed alignment check in SCHM instruction
  s390x/ioinst: Throw addressing exception when memory_map failed
  s390x/ioinst: Add missing alignment checks for IO instructions
  s390/sclpconsole: handle char layer busy conditions

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agomips_r4k: Silence BIOS loading warning for qtest
Andreas Färber [Mon, 29 Jul 2013 14:05:33 +0000 (16:05 +0200)]
mips_r4k: Silence BIOS loading warning for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375106733-832-6-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agomips_jazz: Silence BIOS loading warning for qtest
Andreas Färber [Mon, 29 Jul 2013 14:05:32 +0000 (16:05 +0200)]
mips_jazz: Silence BIOS loading warning for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375106733-832-5-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agomips_malta: Silence BIOS loading warning for qtest
Andreas Färber [Mon, 29 Jul 2013 14:05:31 +0000 (16:05 +0200)]
mips_malta: Silence BIOS loading warning for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375106733-832-4-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agomips_fulong2e: Silence BIOS loading warning for qtest
Andreas Färber [Mon, 29 Jul 2013 14:05:30 +0000 (16:05 +0200)]
mips_fulong2e: Silence BIOS loading warning for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375106733-832-3-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc: Suppress TCG instruction emulation warnings for qtest
Andreas Färber [Mon, 29 Jul 2013 14:05:29 +0000 (16:05 +0200)]
target-ppc: Suppress TCG instruction emulation warnings for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Message-id: 1375106733-832-2-git-send-email-afaerber@suse.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agochardev: fix CHR_EVENT_OPENED events for mux chardevs
Michael Roth [Tue, 30 Jul 2013 18:04:22 +0000 (13:04 -0500)]
chardev: fix CHR_EVENT_OPENED events for mux chardevs

As of bd5c51ee6c4f1c79cae5ad2516d711a27b4ea8ec, chardevs no longer use
bottom-halves to issue CHR_EVENT_OPENED events. To maintain past
semantics, we instead defer the CHR_EVENT_OPENED events toward the end
of chardev initialization.

For muxes, this isn't good enough, since a range of FEs must be able
to attach to the mux prior to any CHR_EVENT_OPENED being issued, else
each FE will immediately print it's initial output (prompts, banners,
etc.) just prior to us switching to the next FE as part of
initialization.

The is new and confusing behavior for users, as they'll see output for
things like the HMP monitor, even though their the current mux focus
may be a guest serial port with potentially no output.

We fix this by further deferring CHR_EVENT_OPENED events for FEs
associated with muxes until after machine init by flagging mux chardevs
with 'explicit_be_open', which suppresses emission of CHR_EVENT_OPENED
events until we explicitly set the mux as opened later.

Currently, we must defer till after machine init since we potentially
associate FEs with muxes as part of realize (for instance,
serial_isa_realizefn).

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Message-id: 1375207462-8141-1-git-send-email-mdroth@linux.vnet.ibm.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotci: Fix broken build (compiler warning caused by redefined macro BIT)
Stefan Weil [Tue, 30 Jul 2013 20:41:23 +0000 (22:41 +0200)]
tci: Fix broken build (compiler warning caused by redefined macro BIT)

The definition of macro BIT in tci/tcg-target.c now conflicts with the
definition of the same macro in includes qemu/bitops.h.

This conflict was triggered by a recent change in the include chain of
tcg.c (probably commit 949fc82314cc84162e64a5323764527a542421ce).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1375216883-23969-1-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoUpdate OpenBIOS images
Mark Cave-Ayland [Tue, 30 Jul 2013 22:11:07 +0000 (23:11 +0100)]
Update OpenBIOS images

Update OpenBIOS images to SVN r1198 built from submodule.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
10 years agotarget-mips: correct the values in the DSP tests
Petar Jovanovic [Mon, 29 Jul 2013 10:49:05 +0000 (12:49 +0200)]
target-mips: correct the values in the DSP tests

Five tests files for DSP instructions had wrong expected values in the tests.
This change fixes this, and this has been cross-checked by running the same
test binaries on Malta 74K board.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
10 years agos390: Implement dump-guest-memory support for target s390x
Ekaterina Tumanova [Wed, 10 Jul 2013 13:26:46 +0000 (15:26 +0200)]
s390: Implement dump-guest-memory support for target s390x

With this patch dump-guest-memory on s390 produces an ELF formatted,
crash-readable dump.
In order to implement this, the arch-specific part of dump-guest-memory
was added:
target-s390x/arch_dump.c contains the whole set of function for writing
Elf note sections of all types for s390x.

Signed-off-by: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
[fixed indentation, use CamelCase, rename note_t to Note, use S390CPU]
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agos390x/kvm: Remove redundant return code
Thomas Huth [Tue, 2 Jul 2013 12:45:16 +0000 (14:45 +0200)]
s390x/kvm: Remove redundant return code

Removed the redundant return code statement from handle_instruction() - it
always returned 0 and never reports any errors to its caller, since errors
from the sub-functions are already reported via program exceptions instead.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agos390x/kvm: Reworked/fixed handling of cc3 in kvm_handle_css_inst()
Thomas Huth [Mon, 24 Jun 2013 13:17:34 +0000 (15:17 +0200)]
s390x/kvm: Reworked/fixed handling of cc3 in kvm_handle_css_inst()

Consolidated the setting of the condition code in kvm_handle_css_inst().
For the (unhandled) instructions EQBS and SQBS, we have to return
an operation exception instead of cc3. Also removed the is_ioinst()
function to avoid decoding the opcode twice.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agos390x/ioinst: Fixed priority of operand exceptions
Thomas Huth [Tue, 25 Jun 2013 12:59:12 +0000 (14:59 +0200)]
s390x/ioinst: Fixed priority of operand exceptions

Operand exceptions have a lower priority than specification and address
exceptions. Thus the checks for operand exceptions must be done later.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agos390x/ioinst: Fixed alignment check in SCHM instruction
Thomas Huth [Fri, 21 Jun 2013 13:57:31 +0000 (15:57 +0200)]
s390x/ioinst: Fixed alignment check in SCHM instruction

Register 2 only has to be aligned to a 32-byte boundary, not a
full page boundary.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agos390x/ioinst: Throw addressing exception when memory_map failed
Thomas Huth [Fri, 21 Jun 2013 11:12:45 +0000 (13:12 +0200)]
s390x/ioinst: Throw addressing exception when memory_map failed

So far, the IO instructions were throwing specification exceptions when
there was a problem with accessing the memory. However, the better way
is to throw an addressing exception instead.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agos390x/ioinst: Add missing alignment checks for IO instructions
Thomas Huth [Fri, 21 Jun 2013 08:13:42 +0000 (10:13 +0200)]
s390x/ioinst: Add missing alignment checks for IO instructions

The IO instructions MSCH, SSCH, STSCH, TSCH, STCRW and TPI require
that the second operand address must be aligned on a word boundary.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agos390/sclpconsole: handle char layer busy conditions
Heinz Graalfs [Tue, 28 May 2013 13:03:55 +0000 (15:03 +0200)]
s390/sclpconsole: handle char layer busy conditions

Handle busy conditions (errno=EAGAIN) in char layer by using
the new char layer in the sclp console.

Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
10 years agohcd-ohci: add dma error handling
Alexey Kardashevskiy [Fri, 26 Jul 2013 10:52:05 +0000 (20:52 +1000)]
hcd-ohci: add dma error handling

Current hcd-ohci does not handle DMA errors. However they may happen
so here we introduce simple error handling.

On such errors, a typical OHCI will stop operating, signal the guest
about the error by sending "UnrecoverableError Event", set itself into
error state and set "Detected Parity Error" in its PCI config space
to signal that it got an error and so does the patch.

This also adds ohci_die() call to ohci_bus_start() to handle possible
failure of qemu_new_timer_ns().

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agouhci: egsm fix
Gerd Hoffmann [Wed, 26 Jun 2013 15:05:06 +0000 (17:05 +0200)]
uhci: egsm fix

When the guest goes suspend the uhci controller while there are
pending resume requests on the ports go signal global resume
instantly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoxhci: handle USB_RET_IOERROR
Gerd Hoffmann [Thu, 25 Jul 2013 11:12:35 +0000 (13:12 +0200)]
xhci: handle USB_RET_IOERROR

https://bugzilla.redhat.com/show_bug.cgi?id=980377

Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agospice: fix display initialization
Gerd Hoffmann [Mon, 22 Jul 2013 13:34:12 +0000 (15:34 +0200)]
spice: fix display initialization

Spice has two display interface implementations:  One integrated into
the qxl graphics card, and one generic which can operate with every
qemu-emulated graphics card.

The generic one is activated in case spice is used without qxl.  The
logic for that only caught the "-vga qxl" case, "-device qxl-vga" goes
unnoticed.  Fix that by adding a check in the spice interface
registration so we'll notice the qxl card no matter how it is created.

https://bugzilla.redhat.com/show_bug.cgi?id=981094

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
10 years agoUpdate version for 1.6.0-rc0 v1.6.0-rc0
Anthony Liguori [Tue, 30 Jul 2013 01:30:29 +0000 (20:30 -0500)]
Update version for 1.6.0-rc0

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoseccomp: add arch_prctl() to the syscall whitelist
Paul Moore [Thu, 18 Jul 2013 13:57:03 +0000 (09:57 -0400)]
seccomp: add arch_prctl() to the syscall whitelist

It appears that even a very simple /etc/qemu-ifup configuration can
require the arch_prctl() syscall, see the example below:

#!/bin/sh
/sbin/ifconfig $1 0.0.0.0 up
/usr/sbin/brctl addif <switch> $1

Signed-off-by: Paul Moore <pmoore@redhat.com>
Reviewed-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Message-id: 20130718135703.8247.19213.stgit@localhost
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoseccomp: add additional asynchronous I/O syscalls
Paul Moore [Mon, 15 Jul 2013 19:32:01 +0000 (15:32 -0400)]
seccomp: add additional asynchronous I/O syscalls

A previous commit, "seccomp: add the asynchronous I/O syscalls to the
whitelist", added several asynchronous I/O syscalls but left out the
io_submit() and io_cancel() syscalls.  This patch corrects this by
adding the two missing asynchronous I/O syscalls.

Signed-off-by: Paul Moore <pmoore@redhat.com>
Reviewed-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Message-id: 20130715193201.943.4913.stgit@localhost
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agolinux-user: Return success from m68k set_thread_area syscall
Peter Maydell [Mon, 29 Jul 2013 10:31:49 +0000 (11:31 +0100)]
linux-user: Return success from m68k set_thread_area syscall

The m68k set_thread_area syscall implementation failed to set the
return value. Correctly set it zero, since this syscall will always
succeed.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1375093909-13653-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agolinux-user/signal.c: Avoid using uninitialized data in ARM sigreturn
Peter Maydell [Mon, 29 Jul 2013 11:00:32 +0000 (12:00 +0100)]
linux-user/signal.c: Avoid using uninitialized data in ARM sigreturn

Rephrase code used in ARM sigreturn functions to avoid using
uninitialized variables. This fixes one genuine problem ('frame'
would not be initialized if we took the error-exit path because
our stackpointer was misaligned) and one which is clang being
alarmist (frame_addr wouldn't be initialized, though this is
harmless since unlock_user_struct ignores its second argument
in these cases; however since we don't generally make use of
this not-really-documented effect it's better avoided).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1375095632-13735-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agolinux-user/signal.c: PPC: Silence clang uninitialized-use warning
Peter Maydell [Mon, 29 Jul 2013 11:00:31 +0000 (12:00 +0100)]
linux-user/signal.c: PPC: Silence clang uninitialized-use warning

Silence a clang warning in a PPC signal return function:

/home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/signal.c:4611:9: error: variable 'sr_addr' is used
      uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
    if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/signal.c:4636:28: note: uninitialized use occurs here
    unlock_user_struct(sr, sr_addr, 1);
                           ^~~~~~~
/home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/qemu.h:442:27: note: expanded from macro 'unlock_user_struct'
    unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
                          ^

This happens when we unlock a user struct which we never
attempted to lock. Strictly, clang is actually wrong here -- it
hasn't been able to spot that unlock_user_struct() doesn't use
its second argument if the first is NULL. However it doesn't
seem too unreasonable to demand that we pass in initialized
values to it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1375095632-13735-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agospapr: Rename 'dprintf' to 'DPRINTF'
Peter Maydell [Mon, 29 Jul 2013 12:16:39 +0000 (13:16 +0100)]
spapr: Rename 'dprintf' to 'DPRINTF'

'dprintf' is the name of a POSIX standard function so we should not be
stealing it for our debug macro. Rename to 'DPRINTF' (in line with
a number of other source files.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Acked-by: Richard Henderson <rth@twiddle.net>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1375100199-13934-5-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agotarget-ppc/kvm.c: Rename 'dprintf' to 'DPRINTF'
Peter Maydell [Mon, 29 Jul 2013 12:16:38 +0000 (13:16 +0100)]
target-ppc/kvm.c: Rename 'dprintf' to 'DPRINTF'

'dprintf' is the name of a POSIX standard function so we should not be
stealing it for our debug macro. Rename to 'DPRINTF' (in line with
a number of other source files.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Acked-by: Richard Henderson <rth@twiddle.net>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1375100199-13934-4-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agos390x: Rename 'dprintf' to 'DPRINTF'
Peter Maydell [Mon, 29 Jul 2013 12:16:37 +0000 (13:16 +0100)]
s390x: Rename 'dprintf' to 'DPRINTF'

'dprintf' is the name of a POSIX standard function so we should not be
stealing it for our debug macro. Rename to 'DPRINTF' (in line with
a number of other source files.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Acked-by: Richard Henderson <rth@twiddle.net>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1375100199-13934-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
10 years agoblock/sheepdog: Rename 'dprintf' to 'DPRINTF'
Peter Maydell [Mon, 29 Jul 2013 12:16:36 +0000 (13:16 +0100)]
block/sheepdog: Rename 'dprintf' to 'DPRINTF'

'dprintf' is the name of a POSIX standard function so we should not be
stealing it for our debug macro. Rename to 'DPRINTF' (in line with
a number of other source files.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Acked-by: Richard Henderson <rth@twiddle.net>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1375100199-13934-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>