qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 5ee853: hw/acpi-defs: replace leading X with


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 5ee853: hw/acpi-defs: replace leading X with x_ in FADT fi...
Date: Thu, 18 May 2017 05:40:12 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 5ee8534731645551a3883210b9a8d5741bb79df2
      
https://github.com/qemu/qemu/commit/5ee8534731645551a3883210b9a8d5741bb79df2
  Author: Ard Biesheuvel <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M hw/i386/acpi-build.c
    M include/hw/acpi/acpi-defs.h
    M tests/bios-tables-test.c

  Log Message:
  -----------
  hw/acpi-defs: replace leading X with x_ in FADT field names

At the request of Michael, replace the leading capital X in the FADT
field name Xfacs and Xdsdt with lower case x + underscore.

Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Ard Biesheuvel <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: cb51ac2ffe3649eb8f5c65dccc2012f0ba2c6b12
      
https://github.com/qemu/qemu/commit/cb51ac2ffe3649eb8f5c65dccc2012f0ba2c6b12
  Author: Ard Biesheuvel <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M hw/acpi/aml-build.c
    M hw/arm/virt-acpi-build.c
    M include/hw/acpi/acpi-defs.h
    M include/hw/acpi/aml-build.h

  Log Message:
  -----------
  hw/arm/virt: generate 64-bit addressable ACPI objects

Our current ACPI table generation code limits the placement of ACPI
tables to 32-bit addressable memory, in order to be able to emit the
root pointer (RSDP) and root table (RSDT) using table types from the
ACPI 1.0 days.

Since ARM was not supported by ACPI before version 5.0, it makes sense
to lift this restriction. This is not crucial for mach-virt, which is
guaranteed to have some memory available below the 4 GB mark, but it
is a nice to have for QEMU machines that do not have any 32-bit
addressable memory, which is not uncommon for real world 64-bit ARM
systems.

Since we already emit a version of the RSDP root pointer that has a
secondary 64-bit wide address field for the 64-bit root table (XSDT),
all we need to do is replace the RSDT generation with the generation
of an XSDT table, and use a different slot in the FADT table to refer
to the DSDT.

Signed-off-by: Ard Biesheuvel <address@hidden>
Reviewed-by: Andrew Jones <address@hidden>
Acked-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Acked-by: Peter Maydell <address@hidden>


  Commit: 60cd11024f41cc73175e651a2dfe09a3cade56bb
      
https://github.com/qemu/qemu/commit/60cd11024f41cc73175e651a2dfe09a3cade56bb
  Author: Zhiyong Yang <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  hw/virtio: fix vhost user fails to startup when MQ

 Qemu2.7~2.9 and vhost user for dpdk 17.02 release work together
to cause failures of new connection when negotiating to set MQ.
(one queue pair works well).
   Because there exist some bugs in qemu code when introducing
VHOST_USER_PROTOCOL_F_REPLY_ACK to qemu. When vhost_user_set_mem_table
is invoked to deal with the vhost message VHOST_USER_SET_MEM_TABLE
for the second time, qemu indeed doesn't send the messge (The message
needs to be sent only once)but still will be waiting for dpdk's reply
ack, then, qemu is always freezing, while DPDK is always waiting for
next vhost message from qemu.
  The patch aims to fix the bug, MQ can work well.
  The same bug is found in function vhost_user_net_set_mtu, it is fixed
at the same time.
  DPDK related patch is as following:
  http://www.dpdk.org/dev/patchwork/patch/23955/

Signed-off-by: Zhiyong Yang <address@hidden>
Cc: address@hidden
Fixes: ca525ce5618b ("vhost-user: Introduce a new protocol feature REPLY_ACK.")
Reviewed-by: Maxime Coquelin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Tested-by: Jens Freimann <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>


  Commit: 640601c7cb1b6b41d3e1a435b986266c2b71e9bc
      
https://github.com/qemu/qemu/commit/640601c7cb1b6b41d3e1a435b986266c2b71e9bc
  Author: Marc-André Lureau <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c
    M contrib/libvhost-user/libvhost-user.h

  Log Message:
  -----------
  libvhost-user: fix crash when rings aren't ready

Calling libvhost-user functions like vu_queue_get_avail_bytes() when the
queue doesn't yet have addresses will result in the crashes like the
following:

Program received signal SIGSEGV, Segmentation fault.
0x000055c414112ce4 in vring_avail_idx (vq=0x55c41582fd68, vq=0x55c41582fd68)
    at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:940
940            vq->shadow_avail_idx = vq->vring.avail->idx;
(gdb) p vq
$1 = (VuVirtq *) 0x55c41582fd68
(gdb) p vq->vring
$2 = {num = 0, desc = 0x0, avail = 0x0, used = 0x0, log_guest_addr = 0, flags = 
0}

    at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:940
No locals.
    at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:960
  num_heads = <optimized out>
    address@hidden, address@hidden,
    address@hidden) at 
/home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:1034

Add a pre-condition checks on vring.avail before accessing it.

Fix documentation and return type of vu_queue_empty() while at it.

Signed-off-by: Marc-André Lureau <address@hidden>
Tested-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 98e753a6e51b255d474c4db5e7af8b01633b6a4c
      
https://github.com/qemu/qemu/commit/98e753a6e51b255d474c4db5e7af8b01633b6a4c
  Author: Igor Mammedov <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot

Since 2.7 commit (b2a575a Add optionrom compatible with fw_cfg DMA version)
regressed migration during firmware exection time by
abusing fwcfg.dma_enabled property to decide loading
dma version of option rom AND by mistake disabling DMA
for 2.6 and earlier globally instead of only for option rom.

so 2.6 machine type guest is broken when it already runs
firmware in DMA mode but migrated to qemu-2.7(pc-2.6)
at that time;

a) qemu-2.6:pc2.6 (fwcfg.dma=on,firmware=dma,oprom=ioport)
b) qemu-2.7:pc2.6 (fwcfg.dma=off,firmware=ioport,oprom=ioport)

  to:   a     b
from
a       OK   FAIL
b       OK   OK

So we currently have broken forward migration from
qemu-2.6 to qemu-2.[789] that however could be fixed
for 2.10 by re-enabling DMA for 2.[56] machine types
and allowing dma capable option rom only since 2.7.
As result qemu should end up with:

c) qemu-2.10:pc2.6 (fwcfg.dma=on,firmware=dma,oprom=ioport)

   to:  a     b    c
from
a      OK   FAIL  OK
b      OK   OK    OK
c      OK   FAIL  OK

where forward migration from qemu-2.6 to qemu-2.10 should
work again leaving only qemu-2.[789]:pc-2.6 broken.

Reported-by: Eduardo Habkost <address@hidden>
Analyzed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 465238d9f873a6251223db1669aa4766822a8783
      
https://github.com/qemu/qemu/commit/465238d9f873a6251223db1669aa4766822a8783
  Author: Peter Xu <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  pc: add 2.10 machine type

CC: "Michael S. Tsirkin" <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Richard Henderson <address@hidden>
CC: Eduardo Habkost <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: ef0e8fc768a561dd13a86420b3268f6f3d5d0621
      
https://github.com/qemu/qemu/commit/ef0e8fc768a561dd13a86420b3268f6f3d5d0621
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M hw/i386/amd_iommu.c
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  iommu: Don't crash if machine is not PC_MACHINE

Currently it's possible to crash QEMU using "-device *-iommu" and
"-machine none":

  $ qemu-system-x86_64 -machine none -device amd-iommu
  qemu/hw/i386/amd_iommu.c:1140:amdvi_realize: Object 0x55627dafbc90 is not an 
instance of type generic-pc-machine
  Aborted (core dumped)
  $ qemu-system-x86_64 -machine none -device intel-iommu
  qemu/hw/i386/intel_iommu.c:2972:vtd_realize: Object 0x56292ec0bc90 is not an 
instance of type generic-pc-machine
  Aborted (core dumped)

Fix amd-iommu and intel-iommu to ensure the current machine is really a
TYPE_PC_MACHINE instance at their realize methods.

Resulting error messages:

  $ qemu-system-x86_64 -machine none -device amd-iommu
  qemu-system-x86_64: -device amd-iommu: Machine-type 'none' not supported by 
amd-iommu
  $ qemu-system-x86_64 -machine none -device intel-iommu
  qemu-system-x86_64: -device intel-iommu: Machine-type 'none' not supported by 
intel-iommu

Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 153eba4726dfa1bdfc31d1fe973b2a61b9035492
      
https://github.com/qemu/qemu/commit/153eba4726dfa1bdfc31d1fe973b2a61b9035492
  Author: Bruce Rogers <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M hw/acpi/piix4.c

  Log Message:
  -----------
  ACPI: don't call acpi_pcihp_device_plug_cb on xen

Commit f0c9d64a exposed the issue that with a xenfv machine using
pci passthrough, acpi pci hotplug code was being executed by mistake.
Guard calls to acpi_pcihp_device_plug_cb (and corresponding
acpi_pcihp_device_unplug_cb) with a check for xen_enabled(). Without
this check I am seeing an error that the bus doesn't have the
acpi-pcihp-bsel property set.

Signed-off-by: Bruce Rogers <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 8b12e48950a3d59188489b2ff6c5ad9cc09e9866
      
https://github.com/qemu/qemu/commit/8b12e48950a3d59188489b2ff6c5ad9cc09e9866
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2017-05-10 (Wed, 10 May 2017)

  Changed paths:
    M include/hw/acpi/acpi-defs.h

  Log Message:
  -----------
  acpi-defs: clean up open brace usage

patchew has been saying:
ERROR: open brace '{' following struct go on the same line

Fix up acpi-defs.h to follow this rule.

Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 327c8ebd7035e4d3d94b08dd741906f1d8bb8a53
      
https://github.com/qemu/qemu/commit/327c8ebd7035e4d3d94b08dd741906f1d8bb8a53
  Author: Peter Krempa <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c
    M qapi/block-core.json

  Log Message:
  -----------
  block: curl: Allow passing cookies via QCryptoSecret

Since cookies can contain sensitive data (session ID, etc ...) it is
desired to hide them from the prying eyes of users. Add a possibility to
pass them via the secret infrastructure.

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

Signed-off-by: Peter Krempa <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 675a775633e68bf8b426a896fea5b93a4f4ff1cc
      
https://github.com/qemu/qemu/commit/675a775633e68bf8b426a896fea5b93a4f4ff1cc
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: strengthen assertion in curl_clean_state

curl_clean_state should only be called after all AIOCBs have been
completed.  This is not so obvious for the call from curl_detach_aio_context,
so assert that.

Cc: address@hidden
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 34db05e7ffe8d61ca7288b9532ad6e8300853318
      
https://github.com/qemu/qemu/commit/34db05e7ffe8d61ca7288b9532ad6e8300853318
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: never invoke callbacks with s->mutex held

All curl callbacks go through curl_multi_do, and hence are called with
s->mutex held.  Note that with comments, and make curl_read_cb drop the
lock before invoking the callback.

Likewise for curl_find_buf, where the callback can be invoked by the
caller.

Cc: address@hidden
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 456af346297ebef86aa097b3609534d34f3d2f75
      
https://github.com/qemu/qemu/commit/456af346297ebef86aa097b3609534d34f3d2f75
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: avoid recursive locking of BDRVCURLState mutex

The curl driver has a ugly hack where, if it cannot find an empty CURLState,
it just uses aio_poll to wait for one to be empty.  This is probably
buggy when used together with dataplane, and the simplest way to fix it
is to use coroutines instead.

A more immediate effect of the bug however is that it can cause a
recursive call to curl_readv_bh_cb and recursively taking the
BDRVCURLState mutex.  This causes a deadlock.

The fix is to unlock the mutex around aio_poll, but for cleanliness we
should also take the mutex around all calls to curl_init_state, even if
reaching the unlock/lock pair is impossible.  The same is true for
curl_clean_state.

Reported-by: Kun Wei <address@hidden>
Tested-by: Richard W.M. Jones <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Cc: address@hidden
Cc: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 3ce6a729b5d78b13283ddc6c529811f67519a62d
      
https://github.com/qemu/qemu/commit/3ce6a729b5d78b13283ddc6c529811f67519a62d
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: split curl_find_state/curl_init_state

If curl_easy_init fails, a CURLState is left with s->in_use = 1.  Split
curl_init_state in two, so that we can distinguish the two failures and
call curl_clean_state if needed.

While at it, simplify curl_find_state, removing a dummy loop.  The
aio_poll loop is moved to the sole caller that needs it.

Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 2125e5ea6ea8f2c6dd9b06b023200da28fa0305b
      
https://github.com/qemu/qemu/commit/2125e5ea6ea8f2c6dd9b06b023200da28fa0305b
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: convert CURLAIOCB to byte values

This is in preparation for the conversion from bdrv_aio_readv to
bdrv_co_preadv, and it also requires changing some of the size_t values
to uint64_t.  This was broken before for disks > 2TB, but now it would
break at 4GB.

Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 28256d8246f8905cc41cae3db50e5967059d4600
      
https://github.com/qemu/qemu/commit/28256d8246f8905cc41cae3db50e5967059d4600
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: convert readv to coroutines

This is pretty simple.  The bottom half goes away because, unlike
bdrv_aio_readv, coroutine-based read can return immediately without
yielding.  However, for simplicity I kept the former bottom half
handler in a separate function.

Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 2bb5c936c5827e1d831002f7a7517cb8c2c2201d
      
https://github.com/qemu/qemu/commit/2bb5c936c5827e1d831002f7a7517cb8c2c2201d
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: do not do aio_poll when waiting for a free CURLState

Instead, put the CURLAIOCB on a wait list and yield; curl_clean_state will
wake the corresponding coroutine.

Because of CURL's callback-based structure, we cannot easily convert
everything to CoMutex/CoQueue; keeping the QemuMutex is simpler.  However,
CoQueue is a simple wrapper around a linked list, so we can easily
use QSIMPLEQ and open-code a CoQueue, protected by the BDRVCURLState
QemuMutex instead of a CoMutex.

Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>


  Commit: 1ff7c5986a515d2d936eba026ff19947bbc7cb92
      
https://github.com/qemu/qemu/commit/1ff7c5986a515d2d936eba026ff19947bbc7cb92
  Author: Stefano Stabellini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M exec.c
    M hw/i386/xen/xen-mapcache.c
    M include/sysemu/xen-mapcache.h

  Log Message:
  -----------
  xen/mapcache: store dma information in revmapcache entries for debugging

The Xen mapcache is able to create long term mappings, they are called
"locked" mappings. The third parameter of the xen_map_cache call
specifies if a mapping is a "locked" mapping.

>From the QEMU point of view there are two kinds of long term mappings:

[a] device memory mappings, such as option roms and video memory
[b] dma mappings, created by dma_memory_map & friends

After certain operations, ballooning a VM in particular, Xen asks QEMU
kindly to destroy all mappings. However, certainly [a] mappings are
present and cannot be removed. That's not a problem as they are not
affected by balloonning. The *real* problem is that if there are any
mappings of type [b], any outstanding dma operations could fail. This is
a known shortcoming. In other words, when Xen asks QEMU to destroy all
mappings, it is an error if any [b] mappings exist.

However today we have no way of distinguishing [a] from [b]. Because of
that, we cannot even print a decent warning.

This patch introduces a new "dma" bool field to MapCacheRev entires, to
remember if a given mapping is for dma or is a long term device memory
mapping. When xen_invalidate_map_cache is called, we print a warning if
any [b] mappings exist. We ignore [a] mappings.

Mappings created by qemu_map_ram_ptr are assumed to be [a], while
mappings created by address_space_map->qemu_ram_ptr_length are assumed
to be [b].

The goal of the patch is to make debugging and system understanding
easier.

Signed-off-by: Stefano Stabellini <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Acked-by: Anthony PERARD <address@hidden>


  Commit: d9506cab36391c906671b3767d0ccf9c8c0e9645
      
https://github.com/qemu/qemu/commit/d9506cab36391c906671b3767d0ccf9c8c0e9645
  Author: Anthony PERARD <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Remove -lxencall for Xen detection

QEMU does not depends on libxencall, it was added because it was a
missing link dependency of libxendevicemodel, but now the later should
be built properly.

Signed-off-by: Anthony PERARD <address@hidden>
Reviewed-by: Stefano Stabellini <address@hidden>


  Commit: c0c24b95542bc1a4dc3fc6ea71475ae04fa69189
      
https://github.com/qemu/qemu/commit/c0c24b95542bc1a4dc3fc6ea71475ae04fa69189
  Author: Stefano Stabellini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

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

  Log Message:
  -----------
  xen/9pfs: fix two resource leaks on error paths, discovered by Coverity

CID: 1374836

Signed-off-by: Stefano Stabellini <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
CC: address@hidden
CC: address@hidden
CC: address@hidden


  Commit: 01cd90b641e1aed40cf13a577e6a737af94d55e7
      
https://github.com/qemu/qemu/commit/01cd90b641e1aed40cf13a577e6a737af94d55e7
  Author: Stefano Stabellini <address@hidden>
  Date:   2017-05-16 (Tue, 16 May 2017)

  Changed paths:
    M hw/9pfs/xen-9p-backend.c
    M hw/xen/xen_backend.c

  Log Message:
  -----------
  xen: call qemu_set_cloexec instead of fcntl

Use the common utility function, which contains checks on return values
and first calls F_GETFD as recommended by POSIX.1-2001, instead of
manually calling fcntl.

CID: 1374831

Signed-off-by: Stefano Stabellini <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
CC: address@hidden
CC: address@hidden
CC: address@hidden
CC: Eric Blake <address@hidden>


  Commit: 2bf3aa85f08186b8162b76e7e8efe5b5a44306a6
      
https://github.com/qemu/qemu/commit/2bf3aa85f08186b8162b76e7e8efe5b5a44306a6
  Author: Juan Quintela <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Fix regression with compression threads

Compression threads got broken on commit

  commit 247956946651ae0280f7b1ea88bb6237dd01c231
  Author: Juan Quintela <address@hidden>
  Date:   Tue Mar 21 11:45:01 2017 +0100

      ram: reorganize last_sent_block

On do_compress_ram_page() we use a different QEMUFile than the
migration one.  We need to pass it there.  The failure can be seen as:

(qemu) qemu-system-x86_64: Unknown combination of migration flags: 0
qemu-system-x86_64: error while loading state section id 3(ram)
qemu-system-x86_64: load of migration failed: Invalid argument

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Tested-by: Peter Xu <address@hidden>


  Commit: 927d66381948659b0acbb1b3f23de5a5008d48a4
      
https://github.com/qemu/qemu/commit/927d66381948659b0acbb1b3f23de5a5008d48a4
  Author: Juan Quintela <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hmp.c
    M include/sysemu/sysemu.h
    M migration/savevm.c
    M replay/replay-snapshot.c
    M vl.c

  Log Message:
  -----------
  migration: Pass Error ** argument to {save,load}_vmstate

This way we use the "normal" way of printing errors for hmp commands.

Signed-off-by: Juan Quintela <address@hidden>
Suggested-by: Paolo Bonzini <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>


  Commit: bb890ed5517ccf9d37793dd7d6dfca1b7b751b3a
      
https://github.com/qemu/qemu/commit/bb890ed5517ccf9d37793dd7d6dfca1b7b751b3a
  Author: Juan Quintela <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO

Reflects better what it does now, and avoid confussions with
RAM_SAVE_FLAG_COMPRESS_PAGE.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Peter Xu <address@hidden>


  Commit: 795c40b8bdbe3fd04bb976416e1bdcf5e3fe997e
      
https://github.com/qemu/qemu/commit/795c40b8bdbe3fd04bb976416e1bdcf5e3fe997e
  Author: Juan Quintela <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M block/qcow.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M hw/9pfs/9p.c
    M hw/display/qxl.c
    M hw/display/virtio-gpu.c
    M hw/intc/arm_gic_kvm.c
    M hw/intc/arm_gicv3_its_kvm.c
    M hw/intc/arm_gicv3_kvm.c
    M hw/misc/ivshmem.c
    M hw/scsi/vhost-scsi.c
    M hw/virtio/vhost.c
    A include/migration/blocker.h
    M include/migration/migration.h
    M migration/migration.c
    M stubs/migr-blocker.c
    M target/i386/kvm.c

  Log Message:
  -----------
  migration: Create migration/blocker.h

This allows us to remove lots of includes of migration/migration.h

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: aa3544c371748fdc2c012c2aaeeac8c66b4f0808
      
https://github.com/qemu/qemu/commit/aa3544c371748fdc2c012c2aaeeac8c66b4f0808
  Author: Juan Quintela <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M Makefile.objs
    R include/migration/page_cache.h
    M migration/Makefile.objs
    A migration/page_cache.c
    A migration/page_cache.h
    R page_cache.c
    M tests/Makefile.include

  Log Message:
  -----------
  migration: Move page_cache.c to migration/

It is only used by migration, so move it there.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: bac3b21218925006e1f7d3cae564afb1e9aeb8ee
      
https://github.com/qemu/qemu/commit/bac3b21218925006e1f7d3cae564afb1e9aeb8ee
  Author: Juan Quintela <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M include/migration/migration.h
    M migration/migration.c
    M migration/postcopy-ram.c
    M migration/postcopy-ram.h

  Log Message:
  -----------
  migration: Move postcopy stuff to postcopy-ram.c

Yes, we don't have a good place to put that stuff.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 1bfe5f0586083747f1602931713111673849cd9d
      
https://github.com/qemu/qemu/commit/1bfe5f0586083747f1602931713111673849cd9d
  Author: Juan Quintela <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/core/qdev.c
    M include/migration/migration.h
    M include/migration/vmstate.h
    M include/sysemu/sysemu.h
    M migration/migration.c
    M migration/savevm.c
    M stubs/vmstate.c

  Log Message:
  -----------
  migration: Move check_migratable() into qdev.c

The function is only used once, and nothing else in migration knows
about objects.  Create the function vmstate_device_is_migratable() in
savem.c that really do the bit that is related with migration.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Peter Xu <address@hidden>


  Commit: fefb28a4712cf39140481f9525a63aac94b61186
      
https://github.com/qemu/qemu/commit/fefb28a4712cf39140481f9525a63aac94b61186
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M block/curl.c
    M qapi/block-core.json

  Log Message:
  -----------
  Merge remote-tracking branch 'jtc/tags/block-pull-request' into staging

# gpg: Signature made Tue 16 May 2017 04:47:09 PM BST
# gpg:                using RSA key 0xBDBE7B27C0DE3057
# gpg: Good signature from "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# gpg:                 aka "Jeffrey Cody <address@hidden>"
# Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057

* jtc/tags/block-pull-request:
  curl: do not do aio_poll when waiting for a free CURLState
  curl: convert readv to coroutines
  curl: convert CURLAIOCB to byte values
  curl: split curl_find_state/curl_init_state
  curl: avoid recursive locking of BDRVCURLState mutex
  curl: never invoke callbacks with s->mutex held
  curl: strengthen assertion in curl_clean_state
  block: curl: Allow passing cookies via QCryptoSecret

Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 599c9cb641cc484876d5bb92189d09ba27bbfdfd
      
https://github.com/qemu/qemu/commit/599c9cb641cc484876d5bb92189d09ba27bbfdfd
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M configure
    M exec.c
    M hw/9pfs/xen-9p-backend.c
    M hw/i386/xen/xen-mapcache.c
    M hw/xen/xen_backend.c
    M include/sysemu/xen-mapcache.h

  Log Message:
  -----------
  Merge remote-tracking branch 'sstabellini/tags/xen-20170516-tag' into staging

Xen 2017/05/16

# gpg: Signature made Tue 16 May 2017 08:18:32 PM BST
# gpg:                using RSA key 0x894F8F4870E1AE90
# gpg: Good signature from "Stefano Stabellini <address@hidden>"
# gpg:                 aka "Stefano Stabellini <address@hidden>"
# Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90

* sstabellini/tags/xen-20170516-tag:
  xen: call qemu_set_cloexec instead of fcntl
  xen/9pfs: fix two resource leaks on error paths, discovered by Coverity
  configure: Remove -lxencall for Xen detection
  xen/mapcache: store dma information in revmapcache entries for debugging

Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: e90f2a8c3e0e677eeea46a9b401c3f98425ffa37
      
https://github.com/qemu/qemu/commit/e90f2a8c3e0e677eeea46a9b401c3f98425ffa37
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/acpi/piix4.c
    M hw/arm/spitz.c
    M hw/audio/marvell_88w8618.c
    M hw/audio/pcspk.c
    M hw/core/or-irq.c
    M hw/core/qdev.c
    M hw/core/register.c
    M hw/dma/i8257.c
    M hw/dma/sparc32_dma.c
    M hw/gpio/omap_gpio.c
    M hw/i2c/omap_i2c.c
    M hw/i2c/smbus_eeprom.c
    M hw/i2c/smbus_ich9.c
    M hw/i386/pc.c
    M hw/input/vmmouse.c
    M hw/intc/apic_common.c
    M hw/intc/etraxfs_pic.c
    M hw/intc/grlib_irqmp.c
    M hw/intc/i8259_common.c
    M hw/intc/nios2_iic.c
    M hw/intc/omap_intc.c
    M hw/isa/lpc_ich9.c
    M hw/isa/piix4.c
    M hw/isa/vt82c686.c
    M hw/mips/gt64xxx_pci.c
    M hw/misc/vmport.c
    M hw/net/dp8393x.c
    M hw/net/etraxfs_eth.c
    M hw/net/lance.c
    M hw/pci-bridge/dec.c
    M hw/pci-bridge/pci_expander_bridge.c
    M hw/pci-host/apb.c
    M hw/pci-host/bonito.c
    M hw/pci-host/gpex.c
    M hw/pci-host/grackle.c
    M hw/pci-host/piix.c
    M hw/pci-host/ppce500.c
    M hw/pci-host/prep.c
    M hw/pci-host/q35.c
    M hw/pci-host/uninorth.c
    M hw/pci-host/versatile.c
    M hw/pci-host/xilinx-pcie.c
    M hw/ppc/ppc4xx_pci.c
    M hw/ppc/spapr_drc.c
    M hw/s390x/s390-pci-bus.c
    M hw/sd/milkymist-memcard.c
    M hw/sd/pl181.c
    M hw/sh4/sh_pci.c
    M hw/timer/i8254_common.c
    M hw/timer/mc146818rtc.c
    M include/hw/qdev-core.h
    M include/hw/qdev-properties.h
    M monitor.c
    M qdev-monitor.c
    M qom/cpu.c
    M target/i386/cpu.c

  Log Message:
  -----------
  qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable

cannot_instantiate_with_device_add_yet was introduced by commit
efec3dd631d94160288392721a5f9c39e50fb2bc to replace no_user. It was
supposed to be a temporary measure.

When it was introduced, we had 54
cannot_instantiate_with_device_add_yet=true lines in the code.
Today (3 years later) this number has not shrunk: we now have
57 cannot_instantiate_with_device_add_yet=true lines. I think it
is safe to say it is not a temporary measure, and we won't see
the flag go away soon.

Instead of a long field name that misleads people to believe it
is temporary, replace it a shorter and less misleading field:
user_creatable.

Except for code comments, changes were generated using the
following Coccinelle patch:

  @@
  expression DC;
  @@
  (
  -DC->cannot_instantiate_with_device_add_yet = false;
  +DC->user_creatable = true;
  |
  -DC->cannot_instantiate_with_device_add_yet = true;
  +DC->user_creatable = false;
  )

  @@
  typedef ObjectClass;
  expression dc;
  identifier class, data;
  @@
   static void device_class_init(ObjectClass *class, void *data)
   {
   ...
   dc->hotpluggable = true;
  +dc->user_creatable = true;
   ...
   }

  @@
  @@
   struct DeviceClass {
   ...
  -bool cannot_instantiate_with_device_add_yet;
  +bool user_creatable;
   ...
  }

  @@
  expression DC;
  @@
  (
  -!DC->cannot_instantiate_with_device_add_yet
  +DC->user_creatable
  |
  -DC->cannot_instantiate_with_device_add_yet
  +!DC->user_creatable
  )

Cc: Alistair Francis <address@hidden>
Cc: Laszlo Ersek <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Thomas Huth <address@hidden>
Acked-by: Alistair Francis <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
[ehabkost: kept "TODO remove once we're there" comment]
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: e4f4fb1eca795e36f363b4647724221e774523c1
      
https://github.com/qemu/qemu/commit/e4f4fb1eca795e36f363b4647724221e774523c1
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/block/fdc.c
    M hw/block/pflash_cfi01.c
    M hw/core/sysbus.c
    M hw/i386/amd_iommu.c
    M hw/i386/intel_iommu.c
    M hw/i386/kvm/clock.c
    M hw/i386/kvm/ioapic.c
    M hw/i386/kvmvapic.c
    M hw/ide/ahci.c
    M hw/intc/ioapic.c
    M hw/isa/isa-bus.c
    M hw/misc/unimp.c
    M hw/net/fsl_etsec/etsec.c
    M hw/nvram/fw_cfg.c
    M hw/ppc/spapr_pci.c
    M hw/scsi/esp.c
    M hw/sd/sdhci.c
    M hw/timer/hpet.c
    M hw/usb/hcd-ohci.c
    M hw/vfio/amd-xgbe.c
    M hw/vfio/calxeda-xgmac.c
    M hw/virtio/virtio-mmio.c
    M hw/xen/xen_backend.c

  Log Message:
  -----------
  sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

commit 33cd52b5d7b9adfd009e95f07e6c64dd88ae2a31 unset
cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making all
sysbus devices appear on "-device help" and lack the "no-user"
flag in "info qdm".

To fix this, we can set user_creatable=false by default on
TYPE_SYS_BUS_DEVICE, but this requires setting
user_creatable=true explicitly on the sysbus devices that
actually work with -device.

Fortunately today we have just a few has_dynamic_sysbus=1
machines: virt, pc-q35-*, ppce500, and spapr.

virt, ppce500, and spapr have extra checks to ensure just a few
device types can be instantiated:

* virt supports only TYPE_VFIO_CALXEDA_XGMAC, TYPE_VFIO_AMD_XGBE.
* ppce500 supports only TYPE_ETSEC_COMMON.
* spapr supports only TYPE_SPAPR_PCI_HOST_BRIDGE.

This patch sets user_creatable=true explicitly on those 4 device
classes.

Now, the more complex cases:

pc-q35-*: q35 has no sysbus device whitelist yet (which is a
separate bug). We are in the process of fixing it and building a
sysbus whitelist on q35, but in the meantime we can fix the
"-device help" and "info qdm" bugs mentioned above. Also, despite
not being strictly necessary for fixing the q35 bug, reducing the
list of user_creatable=true devices will help us be more
confident when building the q35 whitelist.

xen: We also have a hack at xen_set_dynamic_sysbus(), that sets
has_dynamic_sysbus=true at runtime when using the Xen
accelerator. This hack is only used to allow xen-backend devices
to be dynamically plugged/unplugged.

This means today we can use -device with the following 22 device
types, that are the ones compiled into the qemu-system-x86_64 and
qemu-system-i386 binaries:

* allwinner-ahci
* amd-iommu
* cfi.pflash01
* esp
* fw_cfg_io
* fw_cfg_mem
* generic-sdhci
* hpet
* intel-iommu
* ioapic
* isabus-bridge
* kvmclock
* kvm-ioapic
* kvmvapic
* SUNW,fdtwo
* sysbus-ahci
* sysbus-fdc
* sysbus-ohci
* unimplemented-device
* virtio-mmio
* xen-backend
* xen-sysdev

This patch adds user_creatable=true explicitly to those devices,
temporarily, just to keep 100% compatibility with existing
behavior of q35. Subsequent patches will remove
user_creatable=true from the devices that are really not meant to
user-creatable on any machine, and remove the FIXME comment from
the ones that are really supposed to be user-creatable. This is
being done in separate patches because we still don't have an
obvious list of devices that will be whitelisted by q35, and I
would like to get each device reviewed individually.

Cc: Alexander Graf <address@hidden>
Cc: Alex Williamson <address@hidden>
Cc: Alistair Francis <address@hidden>
Cc: Beniamino Galvani <address@hidden>
Cc: Christian Borntraeger <address@hidden>
Cc: Cornelia Huck <address@hidden>
Cc: David Gibson <address@hidden>
Cc: "Edgar E. Iglesias" <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Frank Blaschka <address@hidden>
Cc: Gabriel L. Somlo <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: John Snow <address@hidden>
Cc: Juergen Gross <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Laszlo Ersek <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Pierre Morel <address@hidden>
Cc: Prasad J Pandit <address@hidden>
Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Cc: Richard Henderson <address@hidden>
Cc: Rob Herring <address@hidden>
Cc: Shannon Zhao <address@hidden>
Cc: address@hidden
Cc: Thomas Huth <address@hidden>
Cc: Yi Min Zhao <address@hidden>
Acked-by: John Snow <address@hidden>
Acked-by: Juergen Gross <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
[ehabkost: Small changes at sysbus_device_class_init() comments]
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 950b31dd17fccc42ecddc9528408b00a20c9be3c
      
https://github.com/qemu/qemu/commit/950b31dd17fccc42ecddc9528408b00a20c9be3c
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/xen/xen_backend.c

  Log Message:
  -----------
  xen-backend: Remove FIXME comment about user_creatable flag

xen-backend can be plugged/unplugged dynamically when using the
Xen accelerator, so keep the user_creatable flag on the device
class and remove the FIXME comment.

Cc: Juergen Gross <address@hidden>,
Cc: Peter Maydell <address@hidden>,
Cc: Thomas Huth <address@hidden>
Cc: address@hidden
Cc: Markus Armbruster <address@hidden>,
Cc: Marcel Apfelbaum <address@hidden>,
Cc: Laszlo Ersek <address@hidden>
Acked-by: Juergen Gross <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8ab5700ca07428d62a3e75c2c15aa7dc3e962b44
      
https://github.com/qemu/qemu/commit/8ab5700ca07428d62a3e75c2c15aa7dc3e962b44
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/i386/amd_iommu.c
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  iommu: Remove FIXME comment about user_creatable=true

amd-iommu and intel-iommu are really meant to be used with
-device, so they need user_creatable=true. Remove the FIXME
comment.

Cc: Marcel Apfelbaum <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8ca97a1ff75a824337f5b30877efcbb4af2321e5
      
https://github.com/qemu/qemu/commit/8ca97a1ff75a824337f5b30877efcbb4af2321e5
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/block/fdc.c

  Log Message:
  -----------
  fdc: Remove user_creatable flag from sysbus-fdc & SUNW,fdtwo

sysbus-fdc and SUNW,fdtwo devices need IRQs to be wired and mmio
to be mapped, and can't be used with -device. Unset
user_creatable on their device classes.

Cc: John Snow <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: address@hidden
Cc: Thomas Huth <address@hidden>
Acked-by: John Snow <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: c1ce65f710a9e1a4ae311731864743f0f5f2d348
      
https://github.com/qemu/qemu/commit/c1ce65f710a9e1a4ae311731864743f0f5f2d348
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/block/pflash_cfi01.c

  Log Message:
  -----------
  pflash_cfi01: Remove user_creatable flag

TYPE_CFI_PFLASH01 devices need to be mapped by
pflash_cfi01_register() (or equivalent) and can't be used with
-device. Remove user_creatable from the device class.

Cc: Kevin Wolf <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: address@hidden
Cc: Laszlo Ersek <address@hidden>
Cc: Philippe Mathieu-Daudé <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 642c1e05460a12c70c87fc350a31e2d318c4bcce
      
https://github.com/qemu/qemu/commit/642c1e05460a12c70c87fc350a31e2d318c4bcce
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/i386/kvm/clock.c

  Log Message:
  -----------
  kvmclock: Remove user_creatable flag

kvmclock should be used by guests only when the appropriate CPUID
feature flags are set on the VCPU, and it is automatically
created by kvmclock_create() when those feature flags are set.
This means creating a kvmclock device using -device is useless.
Remove user_creatable from its device class.

Cc: Marcel Apfelbaum <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Thomas Huth <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 6c4672cae7bbae56c49dfa598e75dd02916c4bc5
      
https://github.com/qemu/qemu/commit/6c4672cae7bbae56c49dfa598e75dd02916c4bc5
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/i386/kvm/ioapic.c
    M hw/intc/ioapic.c

  Log Message:
  -----------
  ioapic: Remove user_creatable flag

An ioapic device is already created by the q35 initialization
code, and using "-device ioapic" or "-device kvm-ioapic" will
always fail with "Only 1 ioapics allowed". Remove the
user_creatable flag from the ioapic device classes.

Cc: Igor Mammedov <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 040e99686ab22083452deeccdcdfe2e72e5a8c43
      
https://github.com/qemu/qemu/commit/040e99686ab22083452deeccdcdfe2e72e5a8c43
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/i386/kvmvapic.c

  Log Message:
  -----------
  kvmvapic: Remove user_creatable flag

The kvmvapic device is only usable when created by
apic_common_realize(), not using -device. Remove the
user_creatable flag from the device class.

Cc: Igor Mammedov <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: a081ab8f7b7b9eb72ead9201b5ece14d09fcc1c4
      
https://github.com/qemu/qemu/commit/a081ab8f7b7b9eb72ead9201b5ece14d09fcc1c4
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/ide/ahci.c

  Log Message:
  -----------
  sysbus-ahci: Remove user_creatable flag

The sysbus-ahci devices are supposed to be created and wired by
code from other devices, like calxeda_init() and
xlnx_zynqmp_realize(), and won't work with -device. Remove the
user_creatable flag from the device class.

Cc: John Snow <address@hidden>
Cc: address@hidden
Cc: Rob Herring <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Alistair Francis <address@hidden>
Cc: "Edgar E. Iglesias" <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Acked-by: John Snow <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: c803129ce51401e56981e771aa93a258fac7c0ea
      
https://github.com/qemu/qemu/commit/c803129ce51401e56981e771aa93a258fac7c0ea
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/ide/ahci.c

  Log Message:
  -----------
  allwinner-ahci: Remove user_creatable flag

allwinner-ahci needs its IRQ to be connected and mmio to be
mapped (this is done by the alwinner-a10 device realize method),
and won't work with -device. Remove the user_creatable flag from
the device class.

Cc: John Snow <address@hidden>
Cc: address@hidden
Cc: Beniamino Galvani <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: address@hidden
Cc: Marcel Apfelbaum <address@hidden>
Acked-by: John Snow <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 0980a1c0e2563701424d88e46b080dc09e85d75f
      
https://github.com/qemu/qemu/commit/0980a1c0e2563701424d88e46b080dc09e85d75f
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/isa/isa-bus.c

  Log Message:
  -----------
  isabus-bridge: Remove user_creatable flag

isabus-bridge needs to be created by isa_bus_new(), and won't
work with -device, as it won't create the TYPE_ISA_BUS bus
itself. Remove the user_creatable flag from the device class.

Cc: Marcel Apfelbaum <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 68aecefcd4b348533b809ba77daa337931231e9a
      
https://github.com/qemu/qemu/commit/68aecefcd4b348533b809ba77daa337931231e9a
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/misc/unimp.c

  Log Message:
  -----------
  unimplemented-device: Remove user_creatable flag

unimplemented-device needs to be created and mapped using
create_unimplemented_device() (or equivalent code), and won't
work with -device. Remove the user_creatable flag from the device
class.

Cc: Marcel Apfelbaum <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 731fec79aea4d8bba40464a0a266b4c3de816f6a
      
https://github.com/qemu/qemu/commit/731fec79aea4d8bba40464a0a266b4c3de816f6a
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/nvram/fw_cfg.c

  Log Message:
  -----------
  fw_cfg: Remove user_creatable flag

fw_cfg won't work with -device, as:
* fw_cfg_init1() won't get called for the device;
* The device won't appear at /machine/fw_cfg, and won't work with
  the -fw_cfg command-line option.

Remove the user_creatable flag from the device class.

Cc: Marcel Apfelbaum <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Laszlo Ersek <address@hidden>
Cc: Gabriel L. Somlo <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: f4afad3878f7b2bfd5182bbde60a6b75a448b6d2
      
https://github.com/qemu/qemu/commit/f4afad3878f7b2bfd5182bbde60a6b75a448b6d2
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/scsi/esp.c

  Log Message:
  -----------
  esp: Remove user_creatable flag

esp devices aren't going to work with -device, as they need IRQs
to be connected and mmio to be mapped (this is done by
esp_init()). Remove the user_creatable flag from the device
class.

Cc: Marcel Apfelbaum <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: bdbae0ef01c433892f72ada7cb5df65884d5c875
      
https://github.com/qemu/qemu/commit/bdbae0ef01c433892f72ada7cb5df65884d5c875
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/sd/sdhci.c

  Log Message:
  -----------
  generic-sdhci: Remove user_creatable flag

generic-sdhci needs to be wired by other devices' code, so it
can't be used with -device. Remove the user_creatable flag from
the device class.

Cc: Peter Maydell <address@hidden>
Cc: "Edgar E. Iglesias" <address@hidden>
Cc: David Gibson <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Prasad J Pandit <address@hidden>
Cc: Alistair Francis <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: cae9d4cdd49182997392cc6382780480b97cc9f7
      
https://github.com/qemu/qemu/commit/cae9d4cdd49182997392cc6382780480b97cc9f7
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/timer/hpet.c

  Log Message:
  -----------
  hpet: Remove user_creatable flag

hpet needs to be mapped and wired by the board code and won't
work with -device. Remove the user_creatable flag from the device
class.

Cc: Marcel Apfelbaum <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8f04d26a4eb59708c96cb0c52c3a7c638a656380
      
https://github.com/qemu/qemu/commit/8f04d26a4eb59708c96cb0c52c3a7c638a656380
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/usb/hcd-ohci.c

  Log Message:
  -----------
  sysbus-ohci: Remove user_creatable flag

sysbus-ohci needs to be mapped and wired by device or board code,
and won't work with -device. Remove the user_creatable flag from
the device class.

Cc: Marcel Apfelbaum <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: ae3ac6cacac02e88899e62db0b2bb5713a6796be
      
https://github.com/qemu/qemu/commit/ae3ac6cacac02e88899e62db0b2bb5713a6796be
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/virtio/virtio-mmio.c

  Log Message:
  -----------
  virtio-mmio: Remove user_creatable flag

virtio-mmio needs to be wired and mapped by other device or board
code, and won't work with -device. Remove the user_creatable flag
from the device class.

Cc: Laszlo Ersek <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Shannon Zhao <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 74c505c6fde4bd129d7b41efda16d74f254eb0d5
      
https://github.com/qemu/qemu/commit/74c505c6fde4bd129d7b41efda16d74f254eb0d5
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/xen/xen_backend.c

  Log Message:
  -----------
  xen-sysdev: Remove user_creatable flag

TYPE_XENSYSDEV is only used internally by xen_be_init(), and is
not supposed to be plugged/unplugged dynamically. Remove the
user_creatable flag from the device class.

Cc: Juergen Gross <address@hidden>,
Cc: Peter Maydell <address@hidden>,
Cc: Thomas Huth <address@hidden>
Cc: address@hidden
Cc: Markus Armbruster <address@hidden>,
Cc: Marcel Apfelbaum <address@hidden>,
Cc: Laszlo Ersek <address@hidden>
Acked-by: Juergen Gross <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8ae5059df5424def4a149fdc81e944ec5730fddf
      
https://github.com/qemu/qemu/commit/8ae5059df5424def4a149fdc81e944ec5730fddf
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

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

  Log Message:
  -----------
  s390-pcibus: No need to set user_creatable=false explicitly

TYPE_S390_PCI_HOST_BRIDGE is a subclass of TYPE_PCI_HOST_BRIDGE,
which is a subclass of TYPE_SYS_BUS_DEVICE. TYPE_SYS_BUS_DEVICE
already sets user_creatable=false, so we don't require an
explicit user_creatable=false assignment in
s390_pcihost_class_init().

Cc: Alexander Graf <address@hidden>
Cc: Christian Borntraeger <address@hidden>
Cc: Cornelia Huck <address@hidden>
Cc: Frank Blaschka <address@hidden>
Cc: Laszlo Ersek <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Pierre Morel <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Thomas Huth <address@hidden>
Cc: Yi Min Zhao <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
Acked-by: Marcel Apfelbaum <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 17e8f541263fd771aef58e9818a2060b81904c3f
      
https://github.com/qemu/qemu/commit/17e8f541263fd771aef58e9818a2060b81904c3f
  Author: Eduardo Habkost <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M tests/test-x86-cpuid-compat.c

  Log Message:
  -----------
  tests: Add [+-]feature and feature=on|off test cases

Add test code to ensure features are enabled/disabled correctly in the
command-line. The test case use the "feature-words" and
"filtered-features" properties to check if the features were
enabled/disabled correctly.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 897eee242bc081d72ffbf84664c907dcba620ee3
      
https://github.com/qemu/qemu/commit/897eee242bc081d72ffbf84664c907dcba620ee3
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M hw/acpi/piix4.c
    M hw/arm/spitz.c
    M hw/audio/marvell_88w8618.c
    M hw/audio/pcspk.c
    M hw/core/or-irq.c
    M hw/core/qdev.c
    M hw/core/register.c
    M hw/core/sysbus.c
    M hw/dma/i8257.c
    M hw/dma/sparc32_dma.c
    M hw/gpio/omap_gpio.c
    M hw/i2c/omap_i2c.c
    M hw/i2c/smbus_eeprom.c
    M hw/i2c/smbus_ich9.c
    M hw/i386/amd_iommu.c
    M hw/i386/intel_iommu.c
    M hw/i386/pc.c
    M hw/input/vmmouse.c
    M hw/intc/apic_common.c
    M hw/intc/etraxfs_pic.c
    M hw/intc/grlib_irqmp.c
    M hw/intc/i8259_common.c
    M hw/intc/nios2_iic.c
    M hw/intc/omap_intc.c
    M hw/isa/lpc_ich9.c
    M hw/isa/piix4.c
    M hw/isa/vt82c686.c
    M hw/mips/gt64xxx_pci.c
    M hw/misc/vmport.c
    M hw/net/dp8393x.c
    M hw/net/etraxfs_eth.c
    M hw/net/fsl_etsec/etsec.c
    M hw/net/lance.c
    M hw/pci-bridge/dec.c
    M hw/pci-bridge/pci_expander_bridge.c
    M hw/pci-host/apb.c
    M hw/pci-host/bonito.c
    M hw/pci-host/gpex.c
    M hw/pci-host/grackle.c
    M hw/pci-host/piix.c
    M hw/pci-host/ppce500.c
    M hw/pci-host/prep.c
    M hw/pci-host/q35.c
    M hw/pci-host/uninorth.c
    M hw/pci-host/versatile.c
    M hw/pci-host/xilinx-pcie.c
    M hw/ppc/ppc4xx_pci.c
    M hw/ppc/spapr_drc.c
    M hw/ppc/spapr_pci.c
    M hw/s390x/s390-pci-bus.c
    M hw/sd/milkymist-memcard.c
    M hw/sd/pl181.c
    M hw/sh4/sh_pci.c
    M hw/timer/i8254_common.c
    M hw/timer/mc146818rtc.c
    M hw/vfio/amd-xgbe.c
    M hw/vfio/calxeda-xgmac.c
    M hw/xen/xen_backend.c
    M include/hw/qdev-core.h
    M include/hw/qdev-properties.h
    M monitor.c
    M qdev-monitor.c
    M qom/cpu.c
    M target/i386/cpu.c
    M tests/test-x86-cpuid-compat.c

  Log Message:
  -----------
  Merge remote-tracking branch 'ehabkost/tags/x86-and-machine-pull-request' 
into staging

x86 and machine queue, 2017-05-17

# gpg: Signature made Wed 17 May 2017 02:37:54 PM BST
# gpg:                using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <address@hidden>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* ehabkost/tags/x86-and-machine-pull-request: (22 commits)
  tests: Add [+-]feature and feature=on|off test cases
  s390-pcibus: No need to set user_creatable=false explicitly
  xen-sysdev: Remove user_creatable flag
  virtio-mmio: Remove user_creatable flag
  sysbus-ohci: Remove user_creatable flag
  hpet: Remove user_creatable flag
  generic-sdhci: Remove user_creatable flag
  esp: Remove user_creatable flag
  fw_cfg: Remove user_creatable flag
  unimplemented-device: Remove user_creatable flag
  isabus-bridge: Remove user_creatable flag
  allwinner-ahci: Remove user_creatable flag
  sysbus-ahci: Remove user_creatable flag
  kvmvapic: Remove user_creatable flag
  ioapic: Remove user_creatable flag
  kvmclock: Remove user_creatable flag
  pflash_cfi01: Remove user_creatable flag
  fdc: Remove user_creatable flag from sysbus-fdc & SUNW,fdtwo
  iommu: Remove FIXME comment about user_creatable=true
  xen-backend: Remove FIXME comment about user_creatable flag
  ...

Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 99e15582dea30d4a7c6fa5be9196d0f4d759231c
      
https://github.com/qemu/qemu/commit/99e15582dea30d4a7c6fa5be9196d0f4d759231c
  Author: Peter Xu <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M exec.c
    M include/exec/ramlist.h
    M migration/ram.c

  Log Message:
  -----------
  ramblock: add RAMBLOCK_FOREACH()

So that it can simplifies the iterators.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 22951aaaebb6c4c314c58ad576960a9c57695bbc
      
https://github.com/qemu/qemu/commit/22951aaaebb6c4c314c58ad576960a9c57695bbc
  Author: Peter Xu <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M include/qemu-common.h
    M qapi/string-output-visitor.c
    M util/cutils.c

  Log Message:
  -----------
  utils: provide size_to_str()

Moving the algorithm from print_type_size() into size_to_str() so that
other component can also leverage it. With that, refactor
print_type_size().

The assert() in that logic is removed though, since even UINT64_MAX
would not overflow.

Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: be9b23c4a539090da30b482015ee660850e8bb5f
      
https://github.com/qemu/qemu/commit/be9b23c4a539090da30b482015ee660850e8bb5f
  Author: Peter Xu <address@hidden>
  Date:   2017-05-17 (Wed, 17 May 2017)

  Changed paths:
    M exec.c
    M hmp-commands-info.hx
    M hmp.c
    M hmp.h
    M include/exec/ramlist.h

  Log Message:
  -----------
  ramblock: add new hmp command "info ramblock"

To dump information about ramblocks. It looks like:

(qemu) info ramblock
        Block Name    PSize              Offset               Used              
Total
      /objects/mem    2 MiB  0x0000000000000000 0x0000000080000000 
0x0000000080000000
          vga.vram    4 KiB  0x0000000080060000 0x0000000001000000 
0x0000000001000000
    /address@hidden/acpi/tables    4 KiB  0x00000000810b0000 0x0000000000020000 
0x0000000000200000
           pc.bios    4 KiB  0x0000000080000000 0x0000000000040000 
0x0000000000040000
  0000:00:03.0/e1000.rom    4 KiB  0x0000000081070000 0x0000000000040000 
0x0000000000040000
            pc.rom    4 KiB  0x0000000080040000 0x0000000000020000 
0x0000000000020000
    0000:00:02.0/vga.rom    4 KiB  0x0000000081060000 0x0000000000010000 
0x0000000000010000
   /address@hidden/table-loader    4 KiB  0x00000000812b0000 0x0000000000001000 
0x0000000000001000
      /address@hidden/acpi/rsdp    4 KiB  0x00000000812b1000 0x0000000000001000 
0x0000000000001000

Ramblock is something hidden internally in QEMU implementation, and this
command should only be used by mostly QEMU developers on RAM stuff. It
is not a command suitable for QMP interface. So only HMP interface is
provided for it.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 2fa356629ed2ce9c714f11c89c1a074b8bad3fcb
      
https://github.com/qemu/qemu/commit/2fa356629ed2ce9c714f11c89c1a074b8bad3fcb
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M hw/pci-bridge/pci_bridge_dev.c
    M include/hw/compat.h

  Log Message:
  -----------
  Revert "hw/pci: disable pci-bridge's shpc by default"

This reverts commit dc0ae767700c156894e36fab89a745a2dc4173de.

Disabling the shpc controller has an undesired side effect.
The PCI bridge remains with no attached devices at boot time,
and the guest operating systems do not allocate any resources
for it, leaving the bridge unusable. Note that the behaviour
is dictated by the pci bridge specification.

Revert the commit and leave the shpc controller even if is not
actually used by any architecture. Slot 0 remains unusable at boot time.

Keep shpc off for QEMU 2.9 machines.

Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 66453cff9e5e75344c601cd7674c8ef5fefee8a6
      
https://github.com/qemu/qemu/commit/66453cff9e5e75344c601cd7674c8ef5fefee8a6
  Author: Greg Kurz <address@hidden>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: allow broken device to notify guest

According to section 2.1.2 of the virtio-1 specification:

"The device SHOULD set DEVICE_NEEDS_RESET when it enters an error state that
a reset is needed. If DRIVER_OK is set, after it sets DEVICE_NEEDS_RESET,
the device MUST send a device configuration change notification to the
driver."

Commit "f5ed36635d8f virtio: stop virtqueue processing if device is broken"
introduced a virtio_error() call that just does that:

- internally mark the device as broken
- set the DEVICE_NEEDS_RESET bit in the status
- send a configuration change notification

Unfortunately, virtio_notify_vector(), called by virtio_notify_config(),
returns right away when the device is marked as broken and the notification
isn't sent in this case.

The spec doesn't say whether a broken device can send notifications
in other situations or not. But since the driver isn't supposed to do
anything but to reset the device, it makes sense to keep the check in
virtio_notify_config().

Marking the device as broken AFTER the configuration change notification was
sent is enough to fix the issue.

Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: 3936161f1fd72d1dfa577aaba910819c5e873260
      
https://github.com/qemu/qemu/commit/3936161f1fd72d1dfa577aaba910819c5e873260
  Author: Herongguang (Stephen) <address@hidden>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: deassert intx when pci device unrealize

If a pci device is not reset by VM (by writing into config space)
and unplugged by VM, after that when VM reboots, qemu may assert:
pcibus_reset: Assertion `bus->irq_count[i] == 0' failed

Cc: address@hidden
Signed-off-by: herongguang <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: a764040cc831cfe5b8bf1c80e8341b9bf2de3ce8
      
https://github.com/qemu/qemu/commit/a764040cc831cfe5b8bf1c80e8341b9bf2de3ce8
  Author: Peter Xu <address@hidden>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: abstract address_space_do_translate()

This function is an abstraction helper for address_space_translate() and
address_space_get_iotlb_entry(). It does the lookup of address into
memory region section, then does proper IOMMU translation if necessary.
Refactor the two existing functions to use it.

This fixes vhost when IOMMU is disabled by guest.

Tested-by: Maxime Coquelin <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: adb354dd1e00aa6b8bd674f0e1f70008badded0f
      
https://github.com/qemu/qemu/commit/adb354dd1e00aa6b8bd674f0e1f70008badded0f
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M contrib/libvhost-user/libvhost-user.c
    M contrib/libvhost-user/libvhost-user.h
    M exec.c
    M hw/acpi/aml-build.c
    M hw/acpi/piix4.c
    M hw/arm/virt-acpi-build.c
    M hw/i386/acpi-build.c
    M hw/i386/amd_iommu.c
    M hw/i386/intel_iommu.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/pci-bridge/pci_bridge_dev.c
    M hw/pci/pci.c
    M hw/virtio/vhost-user.c
    M hw/virtio/virtio.c
    M include/hw/acpi/acpi-defs.h
    M include/hw/acpi/aml-build.h
    M include/hw/compat.h
    M include/hw/i386/pc.h
    M tests/bios-tables-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 'mst/tags/for_upstream' into staging

pci, virtio, vhost: fixes

A bunch of fixes that missed the release.
Most notably we are reverting shpc back to enabled by default state
as guests uses that as an indicator that hotplug is supported
(even though it's unused). Unfortunately we can't fix this
on the stable branch since that would break migration.

Signed-off-by: Michael S. Tsirkin <address@hidden>

# gpg: Signature made Wed 17 May 2017 10:42:06 PM BST
# gpg:                using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* mst/tags/for_upstream:
  exec: abstract address_space_do_translate()
  pci: deassert intx when pci device unrealize
  virtio: allow broken device to notify guest
  Revert "hw/pci: disable pci-bridge's shpc by default"
  acpi-defs: clean up open brace usage
  ACPI: don't call acpi_pcihp_device_plug_cb on xen
  iommu: Don't crash if machine is not PC_MACHINE
  pc: add 2.10 machine type
  pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot
  libvhost-user: fix crash when rings aren't ready
  hw/virtio: fix vhost user fails to startup when MQ
  hw/arm/virt: generate 64-bit addressable ACPI objects
  hw/acpi-defs: replace leading X with x_ in FADT field names

Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 2ccbd47c1def618b31af1d88b550f6d2bdd15b0f
      
https://github.com/qemu/qemu/commit/2ccbd47c1def618b31af1d88b550f6d2bdd15b0f
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M Makefile.objs
    M block/qcow.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M hmp.c
    M hw/9pfs/9p.c
    M hw/core/qdev.c
    M hw/display/qxl.c
    M hw/display/virtio-gpu.c
    M hw/intc/arm_gic_kvm.c
    M hw/intc/arm_gicv3_its_kvm.c
    M hw/intc/arm_gicv3_kvm.c
    M hw/misc/ivshmem.c
    M hw/scsi/vhost-scsi.c
    M hw/virtio/vhost.c
    A include/migration/blocker.h
    M include/migration/migration.h
    R include/migration/page_cache.h
    M include/migration/vmstate.h
    M include/sysemu/sysemu.h
    M migration/Makefile.objs
    M migration/migration.c
    A migration/page_cache.c
    A migration/page_cache.h
    M migration/postcopy-ram.c
    M migration/postcopy-ram.h
    M migration/ram.c
    M migration/savevm.c
    R page_cache.c
    M replay/replay-snapshot.c
    M stubs/migr-blocker.c
    M stubs/vmstate.c
    M target/i386/kvm.c
    M tests/Makefile.include
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'quintela/tags/migration/20170517' into staging

migration/next for 20170517

# gpg: Signature made Wed 17 May 2017 11:46:36 AM BST
# gpg:                using RSA key 0xF487EF185872D723
# gpg: Good signature from "Juan Quintela <address@hidden>"
# gpg:                 aka "Juan Quintela <address@hidden>"
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* quintela/tags/migration/20170517:
  migration: Move check_migratable() into qdev.c
  migration: Move postcopy stuff to postcopy-ram.c
  migration: Move page_cache.c to migration/
  migration: Create migration/blocker.h
  ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO
  migration: Pass Error ** argument to {save,load}_vmstate
  migration: Fix regression with compression threads

Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 56821559f0ba682fe6b367815572e6f974d329ab
      
https://github.com/qemu/qemu/commit/56821559f0ba682fe6b367815572e6f974d329ab
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-18 (Thu, 18 May 2017)

  Changed paths:
    M exec.c
    M hmp-commands-info.hx
    M hmp.c
    M hmp.h
    M include/exec/ramlist.h
    M include/qemu-common.h
    M migration/ram.c
    M qapi/string-output-visitor.c
    M util/cutils.c

  Log Message:
  -----------
  Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging

HMP pull

# gpg: Signature made Wed 17 May 2017 07:03:39 PM BST
# gpg:                using RSA key 0x0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <address@hidden>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* dgilbert/tags/pull-hmp-20170517:
  ramblock: add new hmp command "info ramblock"
  utils: provide size_to_str()
  ramblock: add RAMBLOCK_FOREACH()

Signed-off-by: Stefan Hajnoczi <address@hidden>


Compare: https://github.com/qemu/qemu/compare/cdece0467c00...56821559f0ba

reply via email to

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