]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
11 years agoqcow2: Fix segfault on zero-length write
Kevin Wolf [Mon, 14 Jan 2013 16:31:31 +0000 (17:31 +0100)]
qcow2: Fix segfault on zero-length write

One of the recent refactoring patches (commit f50f88b9) didn't take care
to initialise l2meta properly, so with zero-length writes, which don't
even enter the write loop, qemu just segfaulted.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agovirtio-9p: fix compilation error.
KONRAD Frederic [Mon, 14 Jan 2013 21:52:02 +0000 (22:52 +0100)]
virtio-9p: fix compilation error.

Fix the compilation error introduced by msg new field.

CC    hw/9pfs/virtio-9p.o
In 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
make: *** [hw/9pfs/virtio-9p.o] Erreur 1

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
11 years agodataplane: fix build breakage on set_guest_notifiers()
Michael Roth [Mon, 14 Jan 2013 19:20:13 +0000 (13:20 -0600)]
dataplane: fix build breakage on set_guest_notifiers()

virtio_pci_set_guest_notifiers() now takes an additional argument to
specify the number of virtqueues to assign a guest notifier for. This
causes a build breakage for CONFIG_VIRTIO_BLK_DATA_PLANE builds:

/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function
‘virtio_blk_data_plane_start’:
/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:451:47: error: too
few arguments to function ‘s->vdev->binding->set_guest_notifiers’
/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function
‘virtio_blk_data_plane_stop’:
/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:511:5: error: too few
arguments to function ‘s->vdev->binding->set_guest_notifiers’
make[1]: *** [hw/dataplane/virtio-blk.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [subdir-x86_64-softmmu] Error 2

Fix this by passing 1 as the number of virtqueues to assign notifiers
for.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovirtio-pci: build for uninitialized return value in vq_vector_unmask
Michael Roth [Mon, 14 Jan 2013 19:20:12 +0000 (13:20 -0600)]
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 be
used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
make: *** [hw/virtio-pci.o] Error 1
make: *** Waiting for unfinished jobs....

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoAdd GE IP-Octal 232 IndustryPack emulation
Alberto Garcia [Fri, 11 Jan 2013 17:25:30 +0000 (18:25 +0100)]
Add GE IP-Octal 232 IndustryPack emulation

The GE IP-Octal 232 is an IndustryPack module that implements eight
RS-232 serial ports, each one of which can be redirected to a
character device in the host.

Signed-off-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoAdd TEWS TPCI200 IndustryPack emulation
Alberto Garcia [Fri, 11 Jan 2013 17:25:29 +0000 (18:25 +0100)]
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 any
compatible module can be attached to this board.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/pixman.v6' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:27:41 +0000 (10:27 -0600)]
Merge remote-tracking branch 'kraxel/pixman.v6' into staging

* kraxel/pixman.v6:
  pixman: pass extra cflags and ldflags

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/usb.76' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:27:29 +0000 (10:27 -0600)]
Merge remote-tracking branch 'kraxel/usb.76' into staging

* kraxel/usb.76:
  usb-host: Initialize dev->port the obviously safe way
  usb-host: Drop superfluous null test from usb_host_auto_scan()
  ehci: Assert state machine is sane w.r.t. EHCIQueue
  xhci: nuke transfe5rs on detach
  xhci: call xhci_detach_slot on root port detach too
  xhci: create xhci_detach_slot helper function

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'spice/spice.v67' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:27:08 +0000 (10:27 -0600)]
Merge remote-tracking branch 'spice/spice.v67' into staging

* spice/spice.v67:
  qxl: Don't drop client capability bits
  qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/testdev.2' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:26:57 +0000 (10:26 -0600)]
Merge remote-tracking branch 'kraxel/testdev.2' into staging

* kraxel/testdev.2:
  pc-testdev: use typedefs

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:26:26 +0000 (10:26 -0600)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

* kwolf/for-anthony:
  dataplane: handle misaligned virtio-blk requests
  dataplane: extract virtio-blk read/write processing into do_rdwr_cmd()
  block: make qiov_is_aligned() public
  raw-posix: fix bdrv_aio_ioctl
  sheepdog: implement direct write semantics
  block: do not probe zero-sized disks

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'mst/tags/for_anthony' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:23:50 +0000 (10:23 -0600)]
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 device
assignment fix by Alex.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* mst/tags/for_anthony:
  pci-assign: Enable MSIX on device to match guest
  pci: use constants for devices under the 1B36 device ID, document them
  ivshmem: use symbolic constant for PCI ID, add to pci-ids.txt
  virtio-9p: use symbolic constant, add to pci-ids.txt
  reorganize pci-ids.txt
  docs: move pci-ids.txt to docs/specs/
  vhost: backend masking support
  vhost: set started flag while start is in progress
  virtio-net: set/clear vhost_started in reverse order
  virtio: backend virtqueue notifier masking
  virtio-pci: cache msix messages
  kvm: add stub for update msi route
  msix: add api to access msix message
  virtio: don't waste irqfds on control vqs

11 years agoMerge remote-tracking branch 'bonzini/stub' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:23:25 +0000 (10:23 -0600)]
Merge remote-tracking branch 'bonzini/stub' into staging

* bonzini/stub: (27 commits)
  build: improve quiet output for .stp rules
  build: fold trace-obj-y into libqemuutil.a
  build: some simplifications for "trace/Makefile.objs"
  build: remove coroutine-obj-y
  build: move version-obj-y to the generic LINK rule
  build: move base QAPI files to libqemuutil.a
  build: move QAPI definitions for QEMU out of qapi-obj-y
  build: consolidate multiple variables into universal-obj-y
  build: move qobject files to qobject/ and libqemuutil.a
  build: move libqemuutil.a components to util/
  build: move files away from tools-obj-y, common-obj-y, user-obj-y
  build: move util-obj-y to libqemuutil.a
  build: rename oslib-obj-y to util-obj-y
  libcacard: list oslib-obj-y file explicitly
  libcacard: link vscclient to dynamic library
  libcacard: rewrite Makefile in non-recursive style
  libcacard: add list of exported symbols
  libcacard: use per-target variable definitions
  libcacard: prepare to use -y trick in the Makefile
  libcacard: require libtool to build it
  ...

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'qmp/queue/qmp' into staging
Anthony Liguori [Mon, 14 Jan 2013 16:22:31 +0000 (10:22 -0600)]
Merge remote-tracking branch 'qmp/queue/qmp' into staging

* qmp/queue/qmp:
  monitor: assert monitor_puts()'s loop invariant
  target-i386: fix bits 39:32 of the final physical address when using 4M page

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agopixman: pass extra cflags and ldflags
Gerd Hoffmann [Fri, 4 Jan 2013 09:15:53 +0000 (10:15 +0100)]
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>
11 years agousb-host: Initialize dev->port the obviously safe way
Markus Armbruster [Thu, 10 Jan 2013 13:33:25 +0000 (14:33 +0100)]
usb-host: Initialize dev->port the obviously safe way

Coverity worries the strcpy() could overrun the destination.  It
can't, because the source always points to usb_host_scan()'s auto
port[], which has the same size.  Use pstrcpy() anyway, to hush the
checker.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agousb-host: Drop superfluous null test from usb_host_auto_scan()
Markus Armbruster [Thu, 10 Jan 2013 13:33:24 +0000 (14:33 +0100)]
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 to
usb_host_scan()'s auto port[].  Drop the superfluous port == NULL
test.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoehci: Assert state machine is sane w.r.t. EHCIQueue
Markus Armbruster [Thu, 10 Jan 2013 13:33:23 +0000 (14:33 +0100)]
ehci: Assert state machine is sane w.r.t. EHCIQueue

Coverity worries the EHCIQueue pointer could be null when we pass it
to functions that reference it.  The state machine ensures it can't be
null then.  Assert that, to hush the checker.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agodataplane: handle misaligned virtio-blk requests
Stefan Hajnoczi [Fri, 11 Jan 2013 15:41:29 +0000 (16:41 +0100)]
dataplane: handle misaligned virtio-blk requests

O_DIRECT on Linux has alignment requirements on I/O buffers and
misaligned requests result in -EINVAL.  The Linux virtio_blk guest
driver usually submits aligned requests so I forgot to handle misaligned
requests.

It turns out that virtio-win guest drivers submit misaligned requests.
Handle them using a bounce buffer that meets alignment requirements.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agodataplane: extract virtio-blk read/write processing into do_rdwr_cmd()
Stefan Hajnoczi [Fri, 11 Jan 2013 15:41:28 +0000 (16:41 +0100)]
dataplane: extract virtio-blk read/write processing into do_rdwr_cmd()

Extract code for read/write command processing into do_rdwr_cmd().  This
brings together pieces that are spread across process_request().

The real motivation is to set the stage for handling misaligned
requests, which the next patch tackles.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agoblock: make qiov_is_aligned() public
Stefan Hajnoczi [Fri, 11 Jan 2013 15:41:27 +0000 (16:41 +0100)]
block: make qiov_is_aligned() public

The qiov_is_aligned() function checks whether a QEMUIOVector meets a
BlockDriverState's alignment requirements.  This is needed by
virtio-blk-data-plane so:

1. Move the function from block/raw-posix.c to block/block.c.
2. Make it public in block/block.h.
3. Rename to bdrv_qiov_is_aligned().
4. Change return type from int to bool.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agoraw-posix: fix bdrv_aio_ioctl
Paolo Bonzini [Thu, 10 Jan 2013 14:28:35 +0000 (15:28 +0100)]
raw-posix: fix bdrv_aio_ioctl

When the raw-posix aio=thread code was moved from posix-aio-compat.c
to 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,
and in fact breaks scsi-generic (which expects a zero return code).
Remove it.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agosheepdog: implement direct write semantics
Liu Yuan [Thu, 10 Jan 2013 08:03:47 +0000 (16:03 +0800)]
sheepdog: implement direct write semantics

Sheepdog supports both writeback/writethrough write but has not yet supported
DIRECTIO semantics which bypass the cache completely even if Sheepdog daemon is
set up with cache enabled.

Suppose cache is enabled on Sheepdog daemon size, the new cache control is

cache=writeback # enable the writeback semantics for write
cache=writethrough # enable the emulated writethrough semantics for write
cache=directsync # disable cache competely

Guest WCE toggling on the run time to toggle writeback/writethrough is also
supported.

Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agoblock: do not probe zero-sized disks
Paolo Bonzini [Thu, 10 Jan 2013 14:39:27 +0000 (15:39 +0100)]
block: do not probe zero-sized disks

A blank CD or DVD is visible as a zero-sized disks.  Probing such
disks will lead to an EIO and a failure to start the VM.  Treating
them as raw is a better solution.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
11 years agoxhci: nuke transfe5rs on detach
Gerd Hoffmann [Tue, 8 Jan 2013 13:06:51 +0000 (14:06 +0100)]
xhci: nuke transfe5rs on detach

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoxhci: call xhci_detach_slot on root port detach too
Gerd Hoffmann [Tue, 8 Jan 2013 12:06:57 +0000 (13:06 +0100)]
xhci: call xhci_detach_slot on root port detach too

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoxhci: create xhci_detach_slot helper function
Gerd Hoffmann [Tue, 8 Jan 2013 12:06:16 +0000 (13:06 +0100)]
xhci: create xhci_detach_slot helper function

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agopc-testdev: use typedefs
Gerd Hoffmann [Mon, 7 Jan 2013 11:59:43 +0000 (12:59 +0100)]
pc-testdev: use typedefs

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoqxl: Don't drop client capability bits
Markus Armbruster [Thu, 10 Jan 2013 13:24:50 +0000 (14:24 +0100)]
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 parameter
uint8_t caps[58], but the resulting parameter type is uint8_t *, not
uint8_t[58].  In particular, sizeof(caps) is sizeof(uint8_t *), not
the intended sizeof(uint8_t[58]).

Harmless, because the bits aren't used, yet.  Broken in commit
c10018d6.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoqxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check
Markus Armbruster [Thu, 10 Jan 2013 13:24:49 +0000 (14:24 +0100)]
qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check

The pointer arithmetic there is safe, but ugly.  Coverity grouses
about it.  However, the actual comparison is off by one: <= end
instead of < end.  Fix by rewriting the check in a cleaner way.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agobuild: improve quiet output for .stp rules
Paolo Bonzini [Fri, 21 Dec 2012 09:45:20 +0000 (10:45 +0100)]
build: improve quiet output for .stp rules

Mention the directory in which the .stp file is being generated.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: fold trace-obj-y into libqemuutil.a
Paolo Bonzini [Fri, 21 Dec 2012 08:45:20 +0000 (09:45 +0100)]
build: fold trace-obj-y into libqemuutil.a

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: some simplifications for "trace/Makefile.objs"
Paolo Bonzini [Mon, 24 Dec 2012 13:06:27 +0000 (14:06 +0100)]
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>
11 years agobuild: remove coroutine-obj-y
Paolo Bonzini [Thu, 20 Dec 2012 16:38:14 +0000 (17:38 +0100)]
build: remove coroutine-obj-y

Just fold it into block-obj-y.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move version-obj-y to the generic LINK rule
Paolo Bonzini [Thu, 20 Dec 2012 16:36:35 +0000 (17:36 +0100)]
build: move version-obj-y to the generic LINK rule

There is no reason for it to be in block-obj-y, in particular.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move base QAPI files to libqemuutil.a
Paolo Bonzini [Thu, 20 Dec 2012 14:27:51 +0000 (15:27 +0100)]
build: move base QAPI files to libqemuutil.a

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move QAPI definitions for QEMU out of qapi-obj-y
Paolo Bonzini [Thu, 20 Dec 2012 14:03:18 +0000 (15:03 +0100)]
build: move QAPI definitions for QEMU out of qapi-obj-y

There is no reason why for example qemu-ga should include all the
definitions for the QEMU monitor.  However, there are a few
that are needed (qapi_free_SocketAddress, qapi_free_InetSocketAddress,
ErrorClass_lookup).  These should be moved to a separate "core"
.json schema that goes into libqemuutil.a.

For now, make this clearer by moving the qapi-*.o definitions out
of libqemuutil.a.  Once the above refactoring is done, qga-obj-y
should not include anymore qapi-types.o and qapi-visit.o.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: consolidate multiple variables into universal-obj-y
Paolo Bonzini [Thu, 20 Dec 2012 14:24:49 +0000 (15:24 +0100)]
build: consolidate multiple variables into universal-obj-y

The directory descent mechanism, and a less-flat tree both helped
in making some *-obj-y definitions very short.  Many of these
often end up in universal-obj-y, and used to be separate only
because of libuser (which is now part of history...).

Consolidate these variables in a single one.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move qobject files to qobject/ and libqemuutil.a
Paolo Bonzini [Thu, 20 Dec 2012 15:10:26 +0000 (16:10 +0100)]
build: move qobject files to qobject/ and libqemuutil.a

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move libqemuutil.a components to util/
Paolo Bonzini [Thu, 20 Dec 2012 14:58:44 +0000 (15:58 +0100)]
build: move libqemuutil.a components to util/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move files away from tools-obj-y, common-obj-y, user-obj-y
Paolo Bonzini [Thu, 20 Dec 2012 15:09:36 +0000 (16:09 +0100)]
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 include
unused modules.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move util-obj-y to libqemuutil.a
Paolo Bonzini [Thu, 20 Dec 2012 14:40:20 +0000 (15:40 +0100)]
build: move util-obj-y to libqemuutil.a

Use a static library to eliminate repetition in the linking rules.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: rename oslib-obj-y to util-obj-y
Paolo Bonzini [Thu, 20 Dec 2012 13:34:31 +0000 (14:34 +0100)]
build: rename oslib-obj-y to util-obj-y

This prepares the creation of libqemuutil.a in the next patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: list oslib-obj-y file explicitly
Paolo Bonzini [Thu, 20 Dec 2012 17:24:27 +0000 (18:24 +0100)]
libcacard: list oslib-obj-y file explicitly

We will grow the list of files in the next patches, but libcacard
should remain slim.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: link vscclient to dynamic library
Paolo Bonzini [Fri, 21 Dec 2012 07:42:03 +0000 (08:42 +0100)]
libcacard: link vscclient to dynamic library

There is no reason for vscclient to duplicate the code.  rules.mak
takes care of invoking libtool to do the link.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: rewrite Makefile in non-recursive style
Paolo Bonzini [Fri, 21 Dec 2012 07:34:49 +0000 (08:34 +0100)]
libcacard: rewrite Makefile in non-recursive style

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: add list of exported symbols
Paolo Bonzini [Thu, 20 Dec 2012 17:19:51 +0000 (18:19 +0100)]
libcacard: add list of exported symbols

Do not export internal QEMU symbols.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: use per-target variable definitions
Paolo Bonzini [Fri, 21 Dec 2012 08:13:10 +0000 (09:13 +0100)]
libcacard: use per-target variable definitions

This lets the libcacard Makefile use more rules.mak magic.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: prepare to use -y trick in the Makefile
Paolo Bonzini [Fri, 21 Dec 2012 08:16:33 +0000 (09:16 +0100)]
libcacard: prepare to use -y trick in the Makefile

Rename variables to follow the conventions of the rest of the build
systems.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: require libtool to build it
Paolo Bonzini [Thu, 20 Dec 2012 19:40:35 +0000 (20:40 +0100)]
libcacard: require libtool to build it

Do not fail at build time, instead just disable the library if libtool
is not present.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agolibcacard: fix missing symbol in libcacard.so
Alon Levy [Wed, 28 Nov 2012 09:16:26 +0000 (11:16 +0200)]
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>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: remove CONFIG_SMARTCARD
Paolo Bonzini [Thu, 20 Dec 2012 19:39:36 +0000 (20:39 +0100)]
build: remove CONFIG_SMARTCARD

The passthru smartcard does not have the shared library dependency, build
it unconditionally.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: move dtrace rules to rules.mak
Paolo Bonzini [Fri, 21 Dec 2012 08:23:18 +0000 (09:23 +0100)]
build: move dtrace rules to rules.mak

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: support linking with libtool objects/libraries
Paolo Bonzini [Thu, 20 Dec 2012 17:57:45 +0000 (18:57 +0100)]
build: support linking with libtool objects/libraries

This patch moves the complication of using libtool to the generic
rules.mak file.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: make libtool verbose when making with V=1
Paolo Bonzini [Thu, 20 Dec 2012 17:32:53 +0000 (18:32 +0100)]
build: make libtool verbose when making with V=1

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agostubs: fully replace qemu-tool.c and qemu-user.c
Paolo Bonzini [Mon, 26 Nov 2012 14:36:40 +0000 (15:36 +0100)]
stubs: fully replace qemu-tool.c and qemu-user.c

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-option: move standard option definitions out of qemu-config.c
Paolo Bonzini [Mon, 26 Nov 2012 15:03:42 +0000 (16:03 +0100)]
qemu-option: move standard option definitions out of qemu-config.c

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoMerge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm
Blue Swirl [Sat, 12 Jan 2013 12:47:07 +0000 (12:47 +0000)]
Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm

* 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm:
  target-arm: Fix SWI (SVC) instruction in M profile.
  target-arm: use type_register() instead of type_register_static()

11 years agoMerge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf
Blue Swirl [Sat, 12 Jan 2013 12:47:02 +0000 (12:47 +0000)]
Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf

* 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (31 commits)
  PPC: linux-user: Calculate context pointer explicitly
  target-ppc: Error out for -cpu host on unknown PVR
  target-ppc: Slim conversion of model definitions to QOM subclasses
  PPC: Bring EPR support closer to reality
  PPC: KVM: set has-idle in guest device tree
  kvm: Update kernel headers
  openpic: fix CTPR and de-assertion of interrupts
  openpic: move IACK to its own function
  openpic: IRQ_check: search the queue a word at a time
  openpic: fix sense and priority bits
  openpic: add some bounds checking for IRQ numbers
  openpic: use standard bitmap operations
  Revert "openpic: Accelerate pending irq search"
  openpic: always call IRQ_check from IRQ_get_next
  openpic/fsl: critical interrupts ignore mask before v4.1
  openpic: make ctpr signed
  openpic: rework critical interrupt support
  openpic: make register names correspond better with hw docs
  ppc/booke: fix crit/mcheck/debug exceptions
  openpic: lower interrupt when reading the MSI register
  ...

11 years agoMerge branch 's390-reorg' of git://repo.or.cz/qemu/rth
Blue Swirl [Sat, 12 Jan 2013 12:46:57 +0000 (12:46 +0000)]
Merge branch 's390-reorg' of git://repo.or.cz/qemu/rth

* 's390-reorg' of git://repo.or.cz/qemu/rth: (149 commits)
  target-s390: Claim maintainership
  target-s390: Use noreturn for exception and load_psw
  target-s390: Use TCG_CALL_NO_WG for misc helpers
  target-s390: Use TCG_CALL_NO_WG for integer helpers
  target-s390: Use TCG_CALL_NO_WG for floating-point helpers
  target-s390: Use TCG_CALL_NO_WG for memory helpers
  target-s390: Perform COMPARE AND SWAP inline
  target-s390: Optimize get_address
  target-s390: Optimize ADDC/SUBB
  target-s390: Optimize ADDU/SUBU CC testing
  target-s390: Tidy comparisons
  target-s390: Optmize emitting discards
  target-s390: Optimize XC
  target-s390: Fix cpu_clone_regs
  target-s390: Implement LOAD/SET FP AND SIGNAL
  target-s390: Implement SET ROUNDING MODE
  target-s390: Use uint64_to_float128
  target-s390: Implement LCDFR
  target-s390: Check insn operand specifications
  target-s390: Implement CPSDR
  ...

11 years agohw/pc.c: add ULL suffix in ioport80_read and ioportF0_read return value
Julien Grall [Fri, 11 Jan 2013 16:41:43 +0000 (16:41 +0000)]
hw/pc.c: add ULL suffix in ioport80_read and ioportF0_read return value

The commit c02e1eac887b1b0aee7361b1fcf889e7d47fed9d broke the compilation
for 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>
11 years agotcg-i386: use LEA for 3-operand 64-bit addition
Paolo Bonzini [Fri, 11 Jan 2013 23:05:06 +0000 (15:05 -0800)]
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>
11 years agopixman: fix warning
Gerd Hoffmann [Wed, 9 Jan 2013 09:17:08 +0000 (10:17 +0100)]
pixman: fix warning

Cc: afaerber@suse.de
Cc: agraf@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agogcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
Gerd Hoffmann [Wed, 9 Jan 2013 09:17:07 +0000 (10:17 +0100)]
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>
11 years agooptionrom: build with discrete CPP and AS steps
Blue Swirl [Sat, 5 Jan 2013 10:10:27 +0000 (10:10 +0000)]
optionrom: build with discrete CPP and AS steps

Build option ROM .S files with separate preprocessor and
assembler steps because the C compiler could be unsuitable.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoslirp: remove unused field tt
Blue Swirl [Sat, 5 Jan 2013 14:48:22 +0000 (14:48 +0000)]
slirp: remove unused field tt

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agouser: Consider symbolic links as possible directories
Richard Henderson [Sat, 5 Jan 2013 00:39:33 +0000 (16:39 -0800)]
user: Consider symbolic links as possible directories

Commit 2296f194dfde4c0a54f249d3fdb8c8ca21dc611b reduced the number
of syscalls performed during user emulation startup, but failed to
consider the use of symbolic links in creating directory structures.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoalpha-linux-user: Fix sigaction
Richard Henderson [Sat, 5 Jan 2013 00:39:32 +0000 (16:39 -0800)]
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>
11 years agolinux-user: Rewrite __get_user/__put_user with __builtin_choose_expr
Richard Henderson [Sat, 5 Jan 2013 00:39:31 +0000 (16:39 -0800)]
linux-user: Rewrite __get_user/__put_user with __builtin_choose_expr

The previous formuation with multiple assignments to __typeof(*hptr) falls
down when hptr is qualified const.  E.g. with const struct S *p, p->f is
also qualified const.

With this formulation, there's no assignment to any local variable.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobswap: Rewrite cpu_to_<endian><type>u with {ld,st}<type>_<endian>_p
Richard Henderson [Sat, 5 Jan 2013 00:39:30 +0000 (16:39 -0800)]
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 that
we expect.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobswap: Rewrite all ld<type>_<endian>_p functions
Richard Henderson [Sat, 5 Jan 2013 00:39:29 +0000 (16:39 -0800)]
bswap: Rewrite all ld<type>_<endian>_p functions

Use the new host endian unaligned access functions instead of
open coding byte-by-byte references.  Remove assembly special
cases for i386 and ppc -- we've now exposed the operation to
the compiler sufficiently for these to be optimized automatically.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobswap: Add host endian unaligned access functions
Richard Henderson [Sat, 5 Jan 2013 00:39:28 +0000 (16:39 -0800)]
bswap: Add host endian unaligned access functions

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agobswap: Tidy base definitions of bswapN
Richard Henderson [Sat, 5 Jan 2013 00:39:27 +0000 (16:39 -0800)]
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 remove
unnecessary casts, making the code more readable.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agofdt: Use bswapN instead of bswap_N
Richard Henderson [Sat, 5 Jan 2013 00:39:26 +0000 (16:39 -0800)]
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 standardize
on 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
and then wrap these with inline functions to get bswapN.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-arm: Fix SWI (SVC) instruction in M profile.
Alex_Rozenman@mentor.com [Fri, 11 Jan 2013 15:21:22 +0000 (15:21 +0000)]
target-arm: Fix SWI (SVC) instruction in M profile.

When do_interrupt_v7m is called with EXCP_SWI, the PC already
points 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>
11 years agotarget-arm: use type_register() instead of type_register_static()
Eduardo Habkost [Fri, 11 Jan 2013 15:21:22 +0000 (15:21 +0000)]
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
  time that the type is registered.

But cpu_register() uses a stack variable for the 'info' argument, so it
has to use type_register() instead of type_register_static().

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
11 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Fri, 11 Jan 2013 14:43:18 +0000 (08:43 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  hw/pc.c: Fix converting of ioport_register* to MemoryRegion
  Replace remaining gmtime, localtime by gmtime_r, localtime_r
  savevm: Remove MinGW specific code which is no longer needed
  qga/channel-posix.c: Explicitly include string.h
  configure: Fix comment (copy+paste bug)
  readline: avoid memcpy() of overlapping regions

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'kraxel/q35.1' into staging
Anthony Liguori [Fri, 11 Jan 2013 14:36:52 +0000 (08:36 -0600)]
Merge remote-tracking branch 'kraxel/q35.1' into staging

* kraxel/q35.1:
  Makefile: install the "acpi-dsdt.aml" and "q35-acpi-dsdt.aml" blobs too
  pc: rename machine types
  q35: document chipset devices
  q35: add ich9 intel hda controller

Conflicts:
hw/intel-hda.c

aliguori: resolve conflict with static const change from Andreas.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'afaerber-or/prep-up' into staging
Anthony Liguori [Fri, 11 Jan 2013 14:23:16 +0000 (08:23 -0600)]
Merge remote-tracking branch 'afaerber-or/prep-up' into staging

* afaerber-or/prep-up:
  prep: Use pc87312 device instead of collection of random ISA devices
  prep: Add pc87312 Super I/O emulation
  prep: Include devices for ppc64 as well

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agohw/pc.c: Fix converting of ioport_register* to MemoryRegion
Julien Grall [Wed, 9 Jan 2013 18:10:22 +0000 (18:10 +0000)]
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 segfault
will occur when an access is made.

The previous behaviour of this both ioport is to return 0xffffffffffffffff.
So keep this behaviour.

Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Tested-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoReplace remaining gmtime, localtime by gmtime_r, localtime_r
Stefan Weil [Mon, 7 Jan 2013 22:08:13 +0000 (23:08 +0100)]
Replace remaining gmtime, localtime by gmtime_r, localtime_r

This allows removing of MinGW specific code and improves
reentrancy 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]
-- Stefan Hajnoczi]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agosavevm: Remove MinGW specific code which is no longer needed
Stefan Weil [Mon, 7 Jan 2013 21:20:27 +0000 (22:20 +0100)]
savevm: Remove MinGW specific code which is no longer needed

QEMU provides a portable function qemu_gettimeofday instead of
gettimeofday 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>
11 years agoqga/channel-posix.c: Explicitly include string.h
Peter Maydell [Mon, 7 Jan 2013 17:29:55 +0000 (17:29 +0000)]
qga/channel-posix.c: Explicitly include string.h

Explicitly include string.h to avoid warnings under MacOS X/clang
about implicit declarations of strerror() and strlen().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoconfigure: Fix comment (copy+paste bug)
Stefan Weil [Sat, 5 Jan 2013 11:17:38 +0000 (12:17 +0100)]
configure: Fix comment (copy+paste bug)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoMakefile: install the "acpi-dsdt.aml" and "q35-acpi-dsdt.aml" blobs too
Laszlo Ersek [Tue, 8 Jan 2013 18:52:20 +0000 (19:52 +0100)]
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>
11 years agopc: rename machine types
Gerd Hoffmann [Tue, 8 Jan 2013 07:53:13 +0000 (08:53 +0100)]
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 reflect
that:

  * pc-1.4 becomes pc-i440fx-1.4
  * q35-next becomes pc-q35-1.4

The pc-1.3 (+older) names are maintained for compatibility reasons.
For the same reason the "pc" and "q35" aliases are kept.  pc-piix-1.4
continues to be the default machine type, again for compatibility
reasons.

Also updated the description (shown by "qemu -M ?") with host bridge
name, south bridge name and chipset release year.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoq35: document chipset devices
Gerd Hoffmann [Tue, 8 Jan 2013 08:38:19 +0000 (09:38 +0100)]
q35: document chipset devices

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agoq35: add ich9 intel hda controller
Gerd Hoffmann [Tue, 8 Jan 2013 08:25:16 +0000 (09:25 +0100)]
q35: add ich9 intel hda controller

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agovirtio-scsi: abort in-flight I/O when the device is reset
Paolo Bonzini [Thu, 10 Jan 2013 14:49:08 +0000 (15:49 +0100)]
virtio-scsi: abort in-flight I/O when the device is reset

When the device is reset, the SCSI bus should also be reset so
that in-flight I/O is cancelled.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqdev: add qbus_reset_all
Paolo Bonzini [Thu, 10 Jan 2013 14:49:07 +0000 (15:49 +0100)]
qdev: add qbus_reset_all

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMake all static TypeInfos const
Andreas Färber [Thu, 10 Jan 2013 15:19:07 +0000 (16:19 +0100)]
Make all static TypeInfos const

Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all
types natively through QEMU Object Model), TypeInfo as used in
the common, non-iterative pattern is no longer amended with information
and should therefore be const.

Fix the documented QOM examples:

 sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h

Since frequently the wrong examples are being copied by contributors of
new devices, fix all types in the tree:

 sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
 sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c

This also avoids to piggy-back these changes onto real functional
changes or other refactorings.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge branch 'master' of git://git.qemu.org/qemu into prep-up
Andreas Färber [Thu, 10 Jan 2013 20:52:28 +0000 (21:52 +0100)]
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>
11 years agoMerge remote-tracking branch 'kraxel/build.1' into staging
Anthony Liguori [Thu, 10 Jan 2013 19:26:31 +0000 (13:26 -0600)]
Merge remote-tracking branch 'kraxel/build.1' into staging

* kraxel/build.1:
  m48t59-test: don't touch watchdog
  rtc-test: skip year-2038 overflow check in case time_t is 32bit only

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'awilliam/tags/qemu-1.4-vfio-20130109.0' into staging
Anthony Liguori [Thu, 10 Jan 2013 19:26:12 +0000 (13:26 -0600)]
Merge remote-tracking branch 'awilliam/tags/qemu-1.4-vfio-20130109.0' into staging

vfio-pci: Fixes for qemu 1.4 & stable

* awilliam/tags/qemu-1.4-vfio-20130109.0:
  vfio-pci: Loosen sanity checks to allow future features
  vfio-pci: Make host MSI-X enable track guest

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agomonitor: assert monitor_puts()'s loop invariant
Markus Armbruster [Thu, 10 Jan 2013 13:10:22 +0000 (14:10 +0100)]
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>
11 years agom48t59-test: don't touch watchdog
Gerd Hoffmann [Fri, 4 Jan 2013 16:12:18 +0000 (17:12 +0100)]
m48t59-test: don't touch watchdog

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agortc-test: skip year-2038 overflow check in case time_t is 32bit only
Gerd Hoffmann [Fri, 4 Jan 2013 09:37:50 +0000 (10:37 +0100)]
rtc-test: skip year-2038 overflow check in case time_t is 32bit only

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 years agotarget-i386: fix bits 39:32 of the final physical address when using 4M page
Wen Congyang [Sat, 22 Dec 2012 07:13:54 +0000 (15:13 +0800)]
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, and
we shouldn't use unit32_t to calculate it. Convert the type to hwaddr to fix
this problem.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
11 years agoCheck return values from g_poll and select
Fabien Chouteau [Tue, 8 Jan 2013 15:30:56 +0000 (16:30 +0100)]
Check return values from g_poll and select

The current implementation of os_host_main_loop_wait() on Windows,
returns 1 only when a g_poll() event occurs because the return value of
select() is overridden. This is wrong as we may skip a socket event, as
shown in this example:

1. select() returns 0
2. g_poll() returns 1  (socket event occurs)
3. os_host_main_loop_wait() returns 1
4. qemu_iohandler_poll() sees no socket event because select() has
   return before the event occurs
5. select() returns 1
6. g_poll() returns 0 (g_poll overrides select's return value)
7. os_host_main_loop_wait() returns 0
8. qemu_iohandler_poll() doesn't check for socket events because the
   return value of os_host_main_loop_wait() is zero.
9. goto 5

This patch use one variable for each of these return values, so we don't
miss a select() event anymore.

Also move the call to select() after g_poll(), this will improve latency
as we don't have to go through two os_host_main_loop_wait() calls to
detect a socket event.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'mdroth/qga-pull-1-8-2013' into staging
Anthony Liguori [Wed, 9 Jan 2013 15:55:51 +0000 (09:55 -0600)]
Merge remote-tracking branch 'mdroth/qga-pull-1-8-2013' into staging

* mdroth/qga-pull-1-8-2013:
  qemu-ga: sample fsfreeze hooks
  qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thaw
  qemu-ga: guest_suspend(): improve error reporting
  qemu-ga: bios_supports_mode(): improve error reporting
  qemu-ga: qmp_guest_network_get_interfaces(): get rid of snprintf() + error_set()
  qemu-ga: qmp_guest_fstrim(): get rid of sprintf() + error_set()
  qemu-ga: qmp_guest_fsfreeze_*(): get rid of sprintf() + error_set()
  qemu-ga: build_fs_mount_list(): take an Error argument
  qemu-ga: qmp_guest_shutdown(): improve error reporting
  qemu-ga: qmp_guest_file_*: improve error reporting
  qemu-ga: qmp_guest_file_close(): fix fclose() error check
  qemu-ga: guest_file_handle_find(): take an Error argument

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>