qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] eabdf8: hw/9pfs: Fix segfault with 9p2000.u


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] eabdf8: hw/9pfs: Fix segfault with 9p2000.u
Date: Wed, 26 Jun 2013 15:00:13 -0700

  Branch: refs/heads/stable-1.5
  Home:   https://github.com/qemu/qemu
  Commit: eabdf85d86fc90166aa9a866a46ffaf310bf2155
      
https://github.com/qemu/qemu/commit/eabdf85d86fc90166aa9a866a46ffaf310bf2155
  Author: Aneesh Kumar K.V <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/9pfs/virtio-9p.c

  Log Message:
  -----------
  hw/9pfs: Fix segfault with 9p2000.u

When guest tries to chmod a block or char device file over 9pfs,
the qemu process segfaults. With 9p2000.u protocol we use wstat to
change mode bits and client don't send extension information for
chmod. We need to check for size field to check whether extension
info is present or not.

Reported-by: Michael Tokarev <address@hidden>
Acked-by: Michael Tokarev <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>
(cherry picked from commit c7e587b73ebac05943df78f5f37d80d32ff47d3d)

Signed-off-by: Michael Roth <address@hidden>


  Commit: a6fc2cd986e62fc019daf284ee356a4050a44529
      
https://github.com/qemu/qemu/commit/a6fc2cd986e62fc019daf284ee356a4050a44529
  Author: Aneesh Kumar K.V <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/9pfs/virtio-9p-local.c

  Log Message:
  -----------
  hw/9pfs: use O_NOFOLLOW for mapped readlink operation

With mapped security models like mapped-xattr and mapped-file, we save the
symlink target as file contents. Now if we ever expose a normal directory
with mapped security model and find real symlinks in export path, never
follow them and return proper error.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>
(cherry picked from commit aed858ce10ef09c7bdf03f73e75e772f567c74cd)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 749806d1a741d23181e5c8f807c411868384b122
      
https://github.com/qemu/qemu/commit/749806d1a741d23181e5c8f807c411868384b122
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: flush queued packets when RxBufPtr is written

Net queues support efficient "receive disable".  For example, tap's file
descriptor will not be polled while its peer has receive disabled.  This
saves CPU cycles for needlessly copying and then dropping packets which
the peer cannot receive.

rtl8139 is missing the qemu_flush_queued_packets() call that wakes the
queue up when receive becomes possible again.

As a result, the Windows 7 guest driver reaches a state where the
rtl8139 cannot receive packets.  The driver has actually refilled the
receive buffer but we never resume reception.

The bug can be reproduced by running a large FTP 'get' inside a Windows
7 guest:

  $ qemu -netdev tap,id=tap0,...
   -device rtl8139,netdev=tap0

The Linux guest driver does not trigger the bug, probably due to a
different buffer management strategy.

Reported-by: Oliver Francke <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit 00b7ade807b5ce6779ddd86ce29c5521ec5c529a)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 3541912190ab24dac4b8e4edc41570b5ca1906e5
      
https://github.com/qemu/qemu/commit/3541912190ab24dac4b8e4edc41570b5ca1906e5
  Author: Peter Crosthwaite <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M qom/object.c

  Log Message:
  -----------
  qom/object: Don't poll cast cache for NULL objects

object_dynamic_cast_assert used to be tolerant of NULL objects and not
assert. It's clear from the implementation that this is the expected
behavior.

The preceding check of the cast cache dereferences obj however causing
a segfault. Fix by conditionalizing the cast cache logic on obj being
non-null.

Signed-off-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit 95916abcf428fb03644468c7fbce64356c6483c0)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 5c266080276d56b4a56273035ded8b3c023ab5cf
      
https://github.com/qemu/qemu/commit/5c266080276d56b4a56273035ded8b3c023ab5cf
  Author: Stefano Stabellini <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M include/hw/xen/xen.h

  Log Message:
  -----------
  xen: simplify xen_enabled

No need for preprocessor conditionals in xen_enabled: xen_allowed is
always defined.

Signed-off-by: Stefano Stabellini <address@hidden>
CC: address@hidden
(cherry picked from commit 49fa9881b2358e390e9e9466ddde74e995927efa)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 951411fa360fb209fdb761b08bf81ab2ee276cf0
      
https://github.com/qemu/qemu/commit/951411fa360fb209fdb761b08bf81ab2ee276cf0
  Author: Stefano Stabellini <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  main_loop: do not set nonblocking if xen_enabled()

Signed-off-by: Stefano Stabellini <address@hidden>
CC: address@hidden
(cherry picked from commit a7d4207d378069a5bb3175a131e8fdedd39ef97d)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 38ec6c10714f360c55cdbd0d08b17457bf6ff392
      
https://github.com/qemu/qemu/commit/38ec6c10714f360c55cdbd0d08b17457bf6ff392
  Author: Stefano Stabellini <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/i386/xen_machine_pv.c

  Log Message:
  -----------
  xen_machine_pv: do not create a dummy CPU in machine->init

This fixes a regression introduced by:

commit 62fc403f11523169eb4264de31279745f48e3ecc
Author: Igor Mammedov <address@hidden>
Date:   Mon Apr 29 18:54:13 2013 +0200

    target-i386: Attach ICC bus to CPU on its creation

    X86CPU should have parent bus so it could provide bus for child APIC.

The commit makes it mandatory to pass a valid ICC bus to cpu_x86_create,
but cpu_x86_init just passes NULL to it.
xen_machine_pv uses cpu_x86_init, therefore it has been broken.

This patch fixes the problem by removing the dummy CPU creation
altogether from xen_init_pv, relying on the fact that QEMU can now cope
with a machine without an emulated CPU.

Signed-off-by: Stefano Stabellini <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
CC: address@hidden
CC: address@hidden
(cherry picked from commit 58ee9b0ae05d81c74d6869a25ce4263fc22ed809)

Signed-off-by: Michael Roth <address@hidden>


  Commit: ddaa83eebe69e9d7967ac77254dabe4acfd125b0
      
https://github.com/qemu/qemu/commit/ddaa83eebe69e9d7967ac77254dabe4acfd125b0
  Author: Gerd Hoffmann <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  chardev: fix "info chardev" output

Fill unset CharDriverState->filename with the backend name, so
'info chardev' will return at least the chardev type.  Don't
touch it in case the chardev init function filled it already,
like the socket+pty chardevs do for example.

Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit 60d95386abf1f5f37ded6a812d12ac458df2491b)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 0565700d7859bca6cb0e74c3c98f5fd1201559b5
      
https://github.com/qemu/qemu/commit/0565700d7859bca6cb0e74c3c98f5fd1201559b5
  Author: Andreas Färber <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/ide/core.c

  Log Message:
  -----------
  ide: Set BSY bit during FLUSH

The implementation of the ATA FLUSH command invokes a flush at the block
layer, which may on raw files on POSIX entail a synchronous fdatasync().
This may in some cases take so long that the SLES 11 SP1 guest driver
reports I/O errors and filesystems get corrupted or remounted read-only.

Avoid this by setting BUSY_STAT, so that the guest is made aware we are
in the middle of an operation and no ATA commands are attempted to be
processed concurrently.

Addresses BNC#637297.

Suggested-by: Gonglei (Arei) <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit f68ec8379e88502b4841a110c070e9b118d3151c)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 7b9cdc5bba55c411a8c9ee49a783f4a35638a1e5
      
https://github.com/qemu/qemu/commit/7b9cdc5bba55c411a8c9ee49a783f4a35638a1e5
  Author: Gerd Hoffmann <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M roms/configure-seabios.sh

  Log Message:
  -----------
  Revert "roms: switch oldnoconfig to olddefconfig"

This reverts commit a5519b42cfd6c00e9f8b31c5aad7682e7a9f1181.

Breaks "make bios" in roms/ as the kconfig version in seabios doesn't
support olddefconfig.  Must have been be totally untested.

Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit 19cd090e17b293b49eec59346df94a668f5d2438)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 5b3ca29b959ef45f084e5698d06e9a2fd254564a
      
https://github.com/qemu/qemu/commit/5b3ca29b959ef45f084e5698d06e9a2fd254564a
  Author: Gerd Hoffmann <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M pc-bios/bios.bin
    M roms/seabios

  Log Message:
  -----------
  update seabios to release 1.7.2.2

git shortlog from 1.7.2.1

Asias He (2):
      virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd}
      virtio-scsi: Set _DRIVER_OK flag before scsi target scanning

Kevin O'Connor (1):
      Cache boot-fail-wait to avoid romfile access after POST.

Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit 6683d7bc2759e9da8b5c4907a9de85d500933ffb)

Signed-off-by: Michael Roth <address@hidden>


  Commit: d503afb28d4df3f558f07329c3bd0325f9f68d1a
      
https://github.com/qemu/qemu/commit/d503afb28d4df3f558f07329c3bd0325f9f68d1a
  Author: Luiz Capitulino <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M target-i386/arch_memory_mapping.c

  Log Message:
  -----------
  target-i386: fix abort on bad PML4E/PDPTE/PDE/PTE addresses

The code used to walk IA-32e page-tables, and possibly PAE page-tables,
uses the bit mask ~0xfff to get the next PML4E/PDPTE/PDE/PTE address.

However, as we use a uint64_t to store the resulting address, that mask
gets expanded to 0xfffffffffffff000 which not only ends up selecting
reserved bits but also selects the XD bit (execute-disable) which
happens to be enabled by Windows 8, causing qemu_get_ram_ptr() to abort.

This commit fixes that problem by replacing ~0xfff by a correct mask
that only selects the address bit range (ie. bits 51:12).

Signed-off-by: Luiz Capitulino <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
(cherry picked from commit fbc2ed9518efcdcdcbf0adb9539c17a65addd20a)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 9e7fdafc6553cedaf2d2247142929f89deeb4ed8
      
https://github.com/qemu/qemu/commit/9e7fdafc6553cedaf2d2247142929f89deeb4ed8
  Author: Brad Smith <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M audio/ossaudio.c
    M configure

  Log Message:
  -----------
  Remove OSS support for OpenBSD

Remove the OSS support for OpenBSD. The OSS API has not been usable
for quite some time.

Signed-off-by: Brad Smith <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Blue Swirl <address@hidden>
(cherry picked from commit 4f6ab397b60615d2da77bff4f32666be9ac2e949)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 327e75b537c3b7bc25ac83bedeb4a40c782796c3
      
https://github.com/qemu/qemu/commit/327e75b537c3b7bc25ac83bedeb4a40c782796c3
  Author: Stefano Stabellini <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/i386/pc_piix.c
    M include/hw/i386/pc.h
    M xen-all.c

  Log Message:
  -----------
  xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)

We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END,
that is 0xf0000000.
Start the PCI hole at 0xe0000000 instead, that is the same value used by
pc_init1 and qemu-xen-traditional.

Signed-off-by: Stefano Stabellini <address@hidden>
CC: address@hidden
(cherry picked from commit 9f24a8030a70ea4954b5b8c48f606012f086f65f)

Signed-off-by: Michael Roth <address@hidden>


  Commit: baa8a8b44452f4a51de5ba33089dd8882d3fa545
      
https://github.com/qemu/qemu/commit/baa8a8b44452f4a51de5ba33089dd8882d3fa545
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M monitor.c
    M savevm.c

  Log Message:
  -----------
  do not check pointers after dereferencing them

Two instances, both spotted by Coverity.  In one, two blocks were
swapped.  In the other, the check is not needed anymore.

Cc: address@hidden
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
(cherry picked from commit a4cc73d629d43c8a4d171d043ff229a959df3ca6)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 032ce1baacc332fd5c3d40fb9bb0a9cb1c48cbfb
      
https://github.com/qemu/qemu/commit/032ce1baacc332fd5c3d40fb9bb0a9cb1c48cbfb
  Author: Amos Kong <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/core/qdev.c
    M hw/virtio/virtio-bus.c

  Log Message:
  -----------
  qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

Recent virtio refactoring in QEMU made virtio-bus become the parent bus
of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation,
typename will be added to fw_dev_path by default, the new fw_dev_path
could not be identified by seabios. It causes that bootindex parameter
of scsi device doesn't work.

This patch implements get_fw_dev_path() in BusClass, it will be called
if bus doesn't implement the method, tyename will be added to
fw_dev_path. If the implemented method returns NULL, nothing will be
added to fw_dev_path.

It also implements virtio_bus_get_fw_dev_path() to return NULL. Then
QEMU will still pass original style of fw_dev_path to seabios.

Signed-off-by: Amos Kong <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Message-id: address@hidden
--
v2: only add nothing to fw_dev_path when get_fw_dev_path() is
    implemented and returns NULL. then it will not effect other devices
    don't have get_fw_dev_path() implementation.
v3: implement default get_fw_dev_path() in BusClass
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit bbfa18fca4e44ff9c23d36b50d8a998af9c9e9fc)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 9b5751ec09702ddf043bdd1f611880113d212c1a
      
https://github.com/qemu/qemu/commit/9b5751ec09702ddf043bdd1f611880113d212c1a
  Author: Ed Maste <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/usb/host-libusb.c

  Log Message:
  -----------
  host-libusb: Correct test for USB packet state

USB_RET_ASYNC is -6, so inflight was always false.

Signed-off-by: Ed Maste <address@hidden>
Cc: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit 45ec267160307ce2ca7494d942589ba222b29479)

Signed-off-by: Michael Roth <address@hidden>


  Commit: a548bacfba7c80304b78d74c49c69d877bffe1ef
      
https://github.com/qemu/qemu/commit/a548bacfba7c80304b78d74c49c69d877bffe1ef
  Author: Michael Marineau <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/usb/core.c

  Log Message:
  -----------
  Fix usage of USB_DEV_FLAG_IS_HOST flag.

USB_DEV_FLAG_IS_HOST is the bit number, not value. Booting with a
"Fitbit Base Station" USB dongle was triggering this assert.

Signed-off-by: Michael Marineau <address@hidden>
Cc: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
(cherry picked from commit 756335292f2b46775992c314cc70b54480a46d26)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 9ca80c7f293345ee8b53306cfdc548df9ece8b13
      
https://github.com/qemu/qemu/commit/9ca80c7f293345ee8b53306cfdc548df9ece8b13
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/net/vmxnet3.c

  Log Message:
  -----------
  vmxnet3: fix NICState cleanup

Use qemu_del_nic() instead of qemu_del_net_client() to correctly free
the entire NICState.

Cc: address@hidden
Reported-by: Paolo Bonzini <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit 3ffee3cd5fb29de2115bdcbde0a02f47ce69a24c)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 31ba7016d42c4ef04be64147fcda3f4dec4547c0
      
https://github.com/qemu/qemu/commit/31ba7016d42c4ef04be64147fcda3f4dec4547c0
  Author: Brad Smith <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M include/qemu-common.h

  Log Message:
  -----------
  ui/gtk.c: Fix *BSD build of Gtk+ UI

Fix the build of the Gtk+ UI on *BSD systems.

Signed-off-by: Brad Smith <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit 17bf9735dd5a46d829cfb175703c6a2c254a9aa2)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 72762f28110e15ab88aea70ef09575fb1ff89b38
      
https://github.com/qemu/qemu/commit/72762f28110e15ab88aea70ef09575fb1ff89b38
  Author: Cornelia Huck <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/s390x/css.c

  Log Message:
  -----------
  s390x/css: Fix concurrent sense.

Fix an off-by-one error when indicating availablity of concurrent
sense data.

Cc: address@hidden
Signed-off-by: Cornelia Huck <address@hidden>
(cherry picked from commit 8312976e73fce9689ab831c1da565ec413680cff)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 1fb147f4431759a442b024db47e9904cf0d90131
      
https://github.com/qemu/qemu/commit/1fb147f4431759a442b024db47e9904cf0d90131
  Author: Cornelia Huck <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/s390x/virtio-ccw.c

  Log Message:
  -----------
  virtio-ccw: Fix unsetting of indicators.

Interpretation of the ccws to register (configuration) indicators contained
a thinko: We want to disallow reading from 0, but setting the indicator
pointer to 0 is fine.

Let's fix the handling for CCW_CMD_SET{,_CONF}_IND.

Cc: address@hidden
Signed-off-by: Cornelia Huck <address@hidden>
(cherry picked from commit d1db1fa8dfcea9c62643f624f2a07d2fd375ce45)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 6f3718c73bc13b8f3f2d1fe3421befd50ed3037e
      
https://github.com/qemu/qemu/commit/6f3718c73bc13b8f3f2d1fe3421befd50ed3037e
  Author: Wendy Liang <address@hidden>
  Date:   2013-06-11 (Tue, 11 Jun 2013)

  Changed paths:
    M hw/dma/xilinx_axidma.c

  Log Message:
  -----------
  xilinx_axidma: Do not set DMA .notify to NULL after notify

If a stream notify function is not ready, it may re-populate the notify call-
back to indicate it should be re-polled later. This break in this usage, as
immediately following the notify() call, .notify is set to NULL. reverse the
ordering of the notify call and NULL assignment accordingly.

[PC: Reworked commit message]

Signed-off-by: Wendy Liang <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Edgar E. Iglesias <address@hidden>
(cherry picked from commit 4f293bd6e53739e089f33b458f70a9c4ac136b92)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 252a7c6e11f56eed68462b6eb1b023796017a5a6
      
https://github.com/qemu/qemu/commit/252a7c6e11f56eed68462b6eb1b023796017a5a6
  Author: Michael Roth <address@hidden>
  Date:   2013-06-12 (Wed, 12 Jun 2013)

  Changed paths:
    M backends/baum.c
    M backends/msmouse.c
    M include/sysemu/char.h
    M qemu-char.c
    M spice-qemu-char.c
    M ui/console.c
    M ui/gtk.c

  Log Message:
  -----------
  qemu-char: don't issue CHR_EVENT_OPEN in a BH

When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET,
and it was issued as a bottom-half:

86e94dea5b740dad65446c857f6959eae43e0ba6

Which we basically used to print out a greeting/prompt for the
monitor.

AFAICT the only reason this was ever done in a BH was because in
some cases we'd modify the chr_write handler for a new chardev
backend *after* the site where we issued the reset (see:
86e94d:qemu_chr_open_stdio())

At some point this event was renamed to CHR_EVENT_OPENED, and we've
maintained the use of this BH ever since.

However, due to 9f939df955a4152aad69a19a77e0898631bb2c18, we schedule
the BH via g_idle_add(), which is causing events to sometimes be
delivered after we've already begun processing data from backends,
leading to:

 known bugs:

  QMP:
    session negotation resets with OPENED event, in some cases this
    is causing new sessions to get sporadically reset

 potential bugs:

  hw/usb/redirect.c:
    can_read handler checks for dev->parser != NULL, which may be
    true if CLOSED BH has not been executed yet. In the past, OPENED
    quiesced outstanding CLOSED events prior to us reading client
    data. If it's delayed, our check may allow reads to occur even
    though we haven't processed the OPENED event yet, and when we
    do finally get the OPENED event, our state may get reset.

  qtest.c:
    can begin session before OPENED event is processed, leading to
    a spurious reset of the system and irq_levels

  gdbstub.c:
    may start a gdb session prior to the machine being paused

To fix these, let's just drop the BH.

Since the initial reasoning for using it still applies to an extent,
work around that by deferring the delivery of CHR_EVENT_OPENED until
after the chardevs have been fully initialized, toward the end of
qmp_chardev_add() (or some cases, qemu_chr_new_from_opts()). This
defers delivery long enough that we can be assured a CharDriverState
is fully initialized before CHR_EVENT_OPENED is sent.

Also, rather than requiring each chardev to do an explicit open, do it
automatically, and allow the small few who don't desire such behavior to
suppress the OPENED-on-init behavior by setting a 'explicit_be_open'
flag.

We additionally add missing OPENED events for stdio backends on w32,
which were previously not being issued, causing us to not recieve the
banner and initial prompts for qmp/hmp.

Reported-by: Stefan Priebe <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
Message-id: address@hidden
Cc: address@hidden
Signed-off-by: Michael Roth <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit bd5c51ee6c4f1c79cae5ad2516d711a27b4ea8ec)

Signed-off-by: Michael Roth <address@hidden>


  Commit: c1270701c0de4906f9a95ed8b8a8b4fbbbe561bc
      
https://github.com/qemu/qemu/commit/c1270701c0de4906f9a95ed8b8a8b4fbbbe561bc
  Author: Richard Henderson <address@hidden>
  Date:   2013-06-12 (Wed, 12 Jun 2013)

  Changed paths:
    M target-i386/translate.c

  Log Message:
  -----------
  target-i386: Fix aflag logic for CODE64 and the 0x67 prefix

The code reorganization in commit 4a6fd938 broke handling of PREFIX_ADR.
While fixing this, tidy and comment the code so that it's more obvious
what's going on in setting both aflag and dflag.

The TARGET_X86_64 ifdef can be eliminated because CODE64 expands to the
constant zero when TARGET_X86_64 is undefined.

Cc: Paolo Bonzini <address@hidden>
Reported-by: Laszlo Ersek <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit dec3fc9657e0682637de4d5a29d947284d01985c)

Signed-off-by: Michael Roth <address@hidden>


  Commit: eeaa8d33e444ef6bbf2a10bde43aaf079db8d4df
      
https://github.com/qemu/qemu/commit/eeaa8d33e444ef6bbf2a10bde43aaf079db8d4df
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2013-06-12 (Wed, 12 Jun 2013)

  Changed paths:
    M hw/pci-host/q35.c

  Log Message:
  -----------
  q35: set fw_name

PCI host bridges need to set fw_name to be discoverable
by bios for boot device selection.

In particular, seabios expects root device to be called
"/pci/@i0cf8", so let's set it up like that for Q35.

Cc: address@hidden
Signed-off-by: Michael S. Tsirkin <address@hidden>
Tested-by: Amos Kong <address@hidden>
(cherry picked from commit 68c0e134a090666246b467deaf9046e573b089f2)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 58101748657072985a6a0e23f426be5426fd76f7
      
https://github.com/qemu/qemu/commit/58101748657072985a6a0e23f426be5426fd76f7
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-06-13 (Thu, 13 Jun 2013)

  Changed paths:
    M blockdev.c
    M hmp-commands.hx

  Log Message:
  -----------
  blockdev: reset werror/rerror on drive_del

Paolo Bonzini <address@hidden> suggested the following test case:

1. Launch a guest and wait at the GRUB boot menu:

  qemu-system-x86_64 -enable-kvm -m 1024 \
   -drive if=none,cache=none,file=test.img,id=foo,werror=stop,rerror=stop
   -device virtio-blk-pci,drive=foo,id=virtio0,addr=4

2. Hot unplug the device:

  (qemu) drive_del foo

3. Select the first boot menu entry

Without this patch the guest pauses due to ENOMEDIUM.  The guest is
stuck in a continuous pause loop since the I/O request is retried and
fails immediately again when the guest is resumed.

With this patch the error is reported to the guest.

Note that this scenario actually happens sometimes during libvirt disk
hot unplug, where device_del is followed by drive_del.  I/O may still be
submitted to the drive after drive_del if the guest does not process the
PCI hot unplug notification.

Reported-by: Dafna Ron <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
(cherry picked from commit 293c51a6ee369228633a8428ab689f14c045ff98)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 0817fa97673acc71994a65e73449b632c069c22b
      
https://github.com/qemu/qemu/commit/0817fa97673acc71994a65e73449b632c069c22b
  Author: Michael Tokarev <address@hidden>
  Date:   2013-06-14 (Fri, 14 Jun 2013)

  Changed paths:
    M include/qemu-common.h
    M qemu-char.c
    M ui/gtk.c
    M util/Makefile.objs
    A util/qemu-openpty.c

  Log Message:
  -----------
  create qemu_openpty_raw() helper function and move it to a separate file

In two places qemu uses openpty() which is very system-dependent,
and in both places the pty is switched to raw mode as well.
Make a wrapper function which does both steps, and move all the
system-dependent complexity into a separate file, together
with static/local implementations of openpty() and cfmakeraw()
from qemu-char.c.

It is in a separate file, not part of oslib-posix.c, because
openpty() often resides in -lutil which is not linked to
every program qemu builds.

This change removes #including of <pty.h>, <termios.h>
and other rather specific system headers out of qemu-common.h,
which isn't a place for such specific headers really.

This version has been verified to build correctly on Linux,
OpenBSD, FreeBSD and OpenIndiana.  On the latter it lets qemu
to be built with gtk gui which were not possible there due to
missing openpty() and cfmakeraw().

Signed-off-by: Michael Tokarev <address@hidden>
Tested-by: Andreas Färber <address@hidden>
(cherry picked from commit 4efeabbbe8441cc327052304976c7b9b86309d72)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 5a893b0d37795f1f1d89caa2e36d9ff311cd2dc9
      
https://github.com/qemu/qemu/commit/5a893b0d37795f1f1d89caa2e36d9ff311cd2dc9
  Author: Jason Wang <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M net/tap.c

  Log Message:
  -----------
  tap: fix NULL dereference when passing invalid parameters to tap

This patch forbid the following invalid parameters to tap:

1) fd and vhostfds were specified but vhostfd were not specified
2) vhostfds were specified but fds were not specified
3) fds and vhostfd were specified

For 1 and 2, net_init_tap_one() will still pass NULL as vhostfdname to
monitor_handle_fd_param(), which may crash the qemu.

Also remove the unnecessary has_fd check.

Cc: Paolo Bonzini <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Laszlo Ersek <address@hidden>
Cc: address@hidden
Signed-off-by: Jason Wang <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit c87826a878be05208c3906eb9d5e1f37cff5e98e)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 3202c02817ff0b03879653367e2e195bf387ec02
      
https://github.com/qemu/qemu/commit/3202c02817ff0b03879653367e2e195bf387ec02
  Author: Andreas Färber <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M Makefile

  Log Message:
  -----------
  Makefile: Install qemu-img and qemu-nbd man pages only if built

When splitting openSUSE's qemu and qemu-linux-user packages we noticed
that for linux-user-only builds unrelated man pages got installed.
It's surely possible to delete them before packaging, but not installing
them in the first place seems more logical.

Cc: address@hidden
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
(cherry picked from commit 8a3e8f7fd8144343f6c83e810b988c1e8a99d50a)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 6b6f105349f5ef55c6a93193d8618524078f069b
      
https://github.com/qemu/qemu/commit/6b6f105349f5ef55c6a93193d8618524078f069b
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M hw/misc/ivshmem.c

  Log Message:
  -----------
  ivshmem: add missing error exit(2)

If the user fails to specify 'chardev' or 'shm' then we cannot continue.
Exit right away so that we don't invoke shm_open(3) with a NULL pointer.

It would be nice to replace exit(1) with error returns in the PCI device
.init() function, but leave that for another patch since exit(1) is
currently used elsewhere.

Spotted by Coverity.

Cc: Cam Macdonell <address@hidden>
Cc: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
(cherry picked from commit baefb8bf8e4a708c601bbab898a6039cd9cd12e3)

Signed-off-by: Michael Roth <address@hidden>


  Commit: d208f05fd9f392bfce72aa65863114cef2f89e93
      
https://github.com/qemu/qemu/commit/d208f05fd9f392bfce72aa65863114cef2f89e93
  Author: Anton Blanchard <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M tcg/ppc64/tcg-target.c

  Log Message:
  -----------
  tcg-ppc64: Fix RLDCL opcode

The rldcl instruction doesn't have an sh field, so the minor opcode
is shifted 1 bit. We were using the XO30 macro which shifted the
minor opcode 2 bits.

Remove XO30 and add MD30 and MDS30 macros which match the
Power ISA categories.

Cc: address@hidden
Signed-off-by: Anton Blanchard <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
(cherry picked from commit 8a94cfb05ea9a8991c832236b4174d354025a7b7)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 9534f66ac1a50015034acbe86c110bb89673460e
      
https://github.com/qemu/qemu/commit/9534f66ac1a50015034acbe86c110bb89673460e
  Author: Anton Blanchard <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M tcg/ppc64/tcg-target.c

  Log Message:
  -----------
  tcg-ppc64: bswap64 rotates output 32 bits

If our input and output is in the same register, bswap64 tries to
undo a rotate of the input. This just ends up rotating the output.

Cc: address@hidden
Signed-off-by: Anton Blanchard <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
(cherry picked from commit 82e0f9170ac9307de4fc15bfb4d12d5534550322)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 2917f6bcd04a4c75a1e0831eab7e4d62b714d252
      
https://github.com/qemu/qemu/commit/2917f6bcd04a4c75a1e0831eab7e4d62b714d252
  Author: Anton Blanchard <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M tcg/ppc64/tcg-target.c

  Log Message:
  -----------
  tcg-ppc64: Fix add2_i64

add2_i64 was adding the lower double word to the upper double word
of each input. Fix this so we add the lower double words, then the
upper double words with carry propagation.

Cc: address@hidden
Signed-off-by: Anton Blanchard <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
(cherry picked from commit 84247357104044b8c4ec4a634e84769f432cbe52)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 02d26729ea39fdca8385fbaf96cef904b2935891
      
https://github.com/qemu/qemu/commit/02d26729ea39fdca8385fbaf96cef904b2935891
  Author: Anton Blanchard <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M tcg/ppc64/tcg-target.c

  Log Message:
  -----------
  tcg-ppc64: rotr_i32 rotates wrong amount

rotr_i32 calculates the amount to left shift and puts it into a
temporary, but then doesn't use it when doing the shift.

Cc: address@hidden
Signed-off-by: Anton Blanchard <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
(cherry picked from commit d1bdd3af49f227dd4a4b03b90cb020c55cbed440)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 75525693cce6c7d47d2029fc12a0150eb44d57c3
      
https://github.com/qemu/qemu/commit/75525693cce6c7d47d2029fc12a0150eb44d57c3
  Author: Markus Armbruster <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M include/qemu/error-report.h

  Log Message:
  -----------
  error-report.h: Supply missing include

Missed in commit e5924d8.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo "ever the optimist" Ersek <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit b293796fd71009ecffe4343713a4e4e568c33fb0)

Signed-off-by: Michael Roth <address@hidden>


  Commit: fa0f47d3904e36af21538f261f8cf12bc4b6ff9c
      
https://github.com/qemu/qemu/commit/fa0f47d3904e36af21538f261f8cf12bc4b6ff9c
  Author: Markus Armbruster <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M include/qemu/log.h

  Log Message:
  -----------
  log.h: Supply missing includes

<stdio.h> has always been missing.  Rest missed in commit eeacee4.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo "ever the optimist" Ersek <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit f3eededb2fbc73c73daf08f791f0407b8541f4f4)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 685ee2d940738e771c96de33a3cbd85abfbbb3c5
      
https://github.com/qemu/qemu/commit/685ee2d940738e771c96de33a3cbd85abfbbb3c5
  Author: Markus Armbruster <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M arch_init.c
    M hw/i386/smbios.c

  Log Message:
  -----------
  smbios: Convert to error_report()

Improves diagnistics from ad hoc messages like

    Invalid SMBIOS UUID string

to

    qemu-system-x86_64: -smbios type=1,uuid=gaga: Invalid UUID

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo "ever the optimist" Ersek <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit 5bb95e41868b461f37159efb48908828ebd7ab36)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 61fbaee1a71b9d01a617fb44a6d80238779acb93
      
https://github.com/qemu/qemu/commit/61fbaee1a71b9d01a617fb44a6d80238779acb93
  Author: Markus Armbruster <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M arch_init.c
    M hw/i386/smbios.c
    M include/hw/i386/smbios.h

  Log Message:
  -----------
  smbios: Clean up smbios_add_field() parameters

Having size precede the associated pointer is odd.  Swap them, and fix
up the types.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo "ever the optimist" Ersek <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit ebc85e3f724d17530e74df665d1a30fb9b0041b5)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 93bc62438402a21c6b6fedc3c11c951438d506e0
      
https://github.com/qemu/qemu/commit/93bc62438402a21c6b6fedc3c11c951438d506e0
  Author: Markus Armbruster <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M hw/i386/smbios.c

  Log Message:
  -----------
  smbios: Fix -smbios type=0, release=... for big endian hosts

Classic endianness bug due to careless dirty coding: assuming reading
a byte from an int variable gets the least significant byte.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo "ever the optimist" Ersek <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit 527cd96f15348f4454d5bb71f69aaeb95461c90e)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 055a7fce6513a67ecb7db06f808013faa916327e
      
https://github.com/qemu/qemu/commit/055a7fce6513a67ecb7db06f808013faa916327e
  Author: Markus Armbruster <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M hw/i386/smbios.c

  Log Message:
  -----------
  smbios: Check R in -smbios type=0, release=R parses okay

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo "ever the optimist" Ersek <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit 6e5c4540d18d1e9a5253104df161a7e0d408ca95)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 75e4aa9405d7824bc5b26c0c10d5bab7fd697d2e
      
https://github.com/qemu/qemu/commit/75e4aa9405d7824bc5b26c0c10d5bab7fd697d2e
  Author: Igor Mammedov <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: Fix crash when attempting to hotplug CPU with negative ID

QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': -1 }}" may cause
QEMU SIGSEGV at:
 piix4_cpu_hotplug_req ()
    ...
    g->sts[cpu_id / 8] |= (1 << (cpu_id % 8));
    ...

Since for PC in current implementation id should be in range [0...maxcpus)
and maxcpus is already checked, add check for lower bound and error out
on incorrect value.

Signed-off-by: Igor Mammedov <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
(cherry picked from commit 8de433cb0820dc1f387a2d580d255744aacd60cc)

Signed-off-by: Michael Roth <address@hidden>


  Commit: c683f1b93444a25e093225751c597dccc2082f8e
      
https://github.com/qemu/qemu/commit/c683f1b93444a25e093225751c597dccc2082f8e
  Author: Igor Mammedov <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  -----------
  target-i386: cpu: Fix potential buffer overrun in get_register_name_32()

Spotted by Coverity,
x86_reg_info_32[] is CPU_NB_REGS32 elements long, so accessing
x86_reg_info_32[CPU_NB_REGS32] will be one element off array.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: liguang <address@hidden>
Reviewed by: Jesse Larrew <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
(cherry picked from commit 31ccdde298d98b08526dc23059071c9086dec6c2)

Signed-off-by: Michael Roth <address@hidden>


  Commit: ce4e8f0d4cf6bc9f0850410730b53b37c799ae87
      
https://github.com/qemu/qemu/commit/ce4e8f0d4cf6bc9f0850410730b53b37c799ae87
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-06-17 (Mon, 17 Jun 2013)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: byteswap VMDK4Header.desc_offset field

Remember to byteswap VMDK4Header.desc_offset on big-endian machines.

Cc: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
(cherry picked from commit 5a394b9e96eb3c39676353bdf8a230180ae8d6f4)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 6c8cf5fd02430ea004e3291524163afda6740866
      
https://github.com/qemu/qemu/commit/6c8cf5fd02430ea004e3291524163afda6740866
  Author: Ján Tomko <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M util/qemu-sockets.c

  Log Message:
  -----------
  qemu-socket: allow hostnames starting with a digit

According to RFC 1123 [1], hostnames can start with a digit too.

[1] http://tools.ietf.org/html/rfc1123#page-13

Signed-off-by: Ján Tomko <address@hidden>
Cc: address@hidden
[Use strspn, not strcspn. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 391b7b9701ba3318e890ec0cba97a3c654bfa667)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 5fcb9bf746669971a2eb1fe28f26c782641f80e2
      
https://github.com/qemu/qemu/commit/5fcb9bf746669971a2eb1fe28f26c782641f80e2
  Author: Ján Tomko <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  nbd: strip braces from literal IPv6 address in URI

Otherwise they would get passed to getaddrinfo and fail with:
address resolution failed for [::1]:1234: Name or service not known

(Broken by commit v1.4.0-736-gf17c90b)

Signed-off-by: Ján Tomko <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 23307908790cd8fad91220863d7712c571ddc977)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 3abd71cd98deff0209fdacd2bb7583428914075d
      
https://github.com/qemu/qemu/commit/3abd71cd98deff0209fdacd2bb7583428914075d
  Author: Pavel Hrdina <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi: reset cdrom tray statuses on scsi_disk_reset

Tray statuses should be also reset. Some guests may lock the tray and
right after resetting the guest it should be unlocked and closed. This
is done on power-on, reset and resume from suspend/hibernate on bare-metal.

This fix is already committed for IDE CD.
Check the commit a7f3d65b65b8c86a5ff0c0abcfefb45e2ec6fe4c.

Test results on bare-metal:
  - on reset/power-on the CD-ROM tray is closed even before the monitor
    is turned on
  - on resume from suspend/hibernate the tray is also closed before
    the monitor is turned on

>From test results it seems that this behavior is OS and probably BIOS
independent.

Cc: address@hidden
Signed-off-by: Pavel Hrdina <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 7721c7f7c272fd2ed9d58500b7e99c33ab8a1af1)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 9c4f5dd03a93f0049091c9049df94abd60ca10fc
      
https://github.com/qemu/qemu/commit/9c4f5dd03a93f0049091c9049df94abd60ca10fc
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M hw/scsi/scsi-generic.c

  Log Message:
  -----------
  scsi-generic: fix sign extension of READ CAPACITY(10) data

Issuing the READ CAPACITY(10) command in the guest will cause QEMU
to update its knowledge of the maximum accessible LBA in the disk.
The recorded maximum LBA will be wrong if the disk is bigger than
1TB, because ldl_be_p returns a signed int.

When this is fixed, a latent bug will be unmasked.  If the READ
CAPACITY(10) command reported an overflow (0xFFFFFFFF), we must
not overwrite the previously-known maximum accessible LBA, or the guest
will fail to access the disk above the first 2TB.

Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 53254e569f8e07501f3e0098bd57d2b780e52faa)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 637d640fbbce498bd43a58b7a20b4190a1534751
      
https://github.com/qemu/qemu/commit/637d640fbbce498bd43a58b7a20b4190a1534751
  Author: Pavel Hrdina <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M hw/scsi/scsi-generic.c

  Log Message:
  -----------
  scsi-generic: check the return value of bdrv_aio_ioctl in execute_command

This fixes the bug introduced by this commit ad54ae80c73f.
The bdrv_aio_ioctl() still could return null and we should return an error
in that case.

Cc: address@hidden
Signed-off-by: Pavel Hrdina <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit d836f8d35dc418e24c3b11e2ea67d361b867b650)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 129db3679c45bfc86d2003ebea808a2d626820e7
      
https://github.com/qemu/qemu/commit/129db3679c45bfc86d2003ebea808a2d626820e7
  Author: Pavel Hrdina <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M hw/scsi/scsi-disk.c

  Log Message:
  -----------
  scsi-disk: scsi-block device for scsi pass-through should not be removable

This patch adds a new SCSI_DISK_F_NO_REMOVABLE_DEVOPS feature. By this
feature we can set that the scsi-block (scsi pass-through) device will still
be removable from the guest side, but from monitor it cannot be removed.

Cc: address@hidden
Signed-off-by: Pavel Hrdina <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 18e673b8f350e1d789b8a50d209eb4a4252ebbda)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 5e690bb9748e50e0deb406e982a17c0c7b6e65cf
      
https://github.com/qemu/qemu/commit/5e690bb9748e50e0deb406e982a17c0c7b6e65cf
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M hw/scsi/vhost-scsi.c

  Log Message:
  -----------
  vhost-scsi: fix k->set_guest_notifiers() NULL dereference

Coverity picked up a copy-paste bug.  In vhost_scsi_start() we check for
!k->set_guest_notifiers and error out.  The check probably got copied
but instead of erroring we actually use the function pointer!

Cc: Nicholas Bellinger <address@hidden>
Cc: Asias He <address@hidden>
Cc: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 0e22a2d18998fd183c8181663981eb681ca977e9)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 1b94fc4b9aeee5c9ce658a0486315ec20ea371d0
      
https://github.com/qemu/qemu/commit/1b94fc4b9aeee5c9ce658a0486315ec20ea371d0
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: simplify freeing of tasks

Always free them in the iscsi_aio_*_acb functions and remove the
checks in their callers.  Remove ifs when the task struct was
previously dereferenced (spotted by Coverity).

Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit f0d2a4d4d63dd2f0f3ecb2d591b979b0e7f24a22)

Signed-off-by: Michael Roth <address@hidden>


  Commit: cb55efe6dba9b377d23b69a2d1c78b2ccdb5ec7d
      
https://github.com/qemu/qemu/commit/cb55efe6dba9b377d23b69a2d1c78b2ccdb5ec7d
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: reorganize iscsi_readcapacity_sync

Avoid the goto, and use the same retry logic for the 10- and 16-
byte versions.

Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 1288844e7c4ede59509bf697a4cca0f2215a1ce3)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 12e5b2b5dafeed4c14080f3c1ff40e3db9802433
      
https://github.com/qemu/qemu/commit/12e5b2b5dafeed4c14080f3c1ff40e3db9802433
  Author: Cole Robinson <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M hw/s390x/s390-virtio-bus.c
    M hw/s390x/virtio-ccw.c
    M hw/virtio/virtio-pci.c

  Log Message:
  -----------
  virtio-rng: Fix crash with non-default backend

'default_backend' isn't always set, but 'rng' is, so use that.

$ ./x86_64-softmmu/qemu-system-x86_64 -object 
rng-random,id=rng0,filename=/dev/random -device virtio-rng-pci,rng=rng0
Segmentation fault (core dumped)

Regressed with virtio refactoring in 59ccd20a9ac719cff82180429458728f03ec612f

CC: address@hidden
Signed-off-by: Cole Robinson <address@hidden>
Acked-by: Amit Shah <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Tested-by: Michael Roth <address@hidden>
Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit 5b456438f5bb395ed6b1eec95e18ce7a7a884a0a)

Signed-off-by: Michael Roth <address@hidden>


  Commit: cc0bd7ec83f816676287df6615bb15e22abcee61
      
https://github.com/qemu/qemu/commit/cc0bd7ec83f816676287df6615bb15e22abcee61
  Author: Michael Roth <address@hidden>
  Date:   2013-06-18 (Tue, 18 Jun 2013)

  Changed paths:
    M hw/watchdog/wdt_i6300esb.c

  Log Message:
  -----------
  wdt_i6300esb: fix vmstate versioning

When this VMSD was introduced it's version fields were set to
sizeof(I6300State), making them essentially random from build to build,
version to version.

To fix this, we lock in a high version id and low minimum version id to
support old->new migration from all prior versions of this device's
state. This should work since the device state has not changed since
its introduction.

The potentially breaks migration from 1.5+ to 1.5, but since the
versioning was essentially random prior to this patch, new->old
migration was not consistently functional to begin with.

Reported-by: Nicholas Thomas <address@hidden>
Suggested-by: Peter Maydell <address@hidden>
Cc: address@hidden
Signed-off-by: Michael Roth <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
(cherry picked from commit c1990468d5a13c8f1d9111fcca0a78a6adad062b)

Signed-off-by: Michael Roth <address@hidden>


  Commit: 295d81c62414a63c625fa2e78175573d4b3f5ba4
      
https://github.com/qemu/qemu/commit/295d81c62414a63c625fa2e78175573d4b3f5ba4
  Author: Anthony Liguori <address@hidden>
  Date:   2013-06-26 (Wed, 26 Jun 2013)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Update VERSION for 1.5.1 release

Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/eabdf85d86fc^...295d81c62414

reply via email to

[Prev in Thread] Current Thread [Next in Thread]