qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 6b4495: pcie: fix link active status bit migr


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 6b4495: pcie: fix link active status bit migration
Date: Fri, 29 Jul 2016 05:00:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 6b4495401bdf442457b713b7e3994b465c55af35
      
https://github.com/qemu/qemu/commit/6b4495401bdf442457b713b7e3994b465c55af35
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/pci/pci.c
    M hw/pci/pcie.c
    M include/hw/compat.h
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pcie: fix link active status bit migration

We changed link status register in pci express endpoint capability
over time. Specifically,

commit b2101eae63ea57b571cee4a9075a4287d24ba4a4 ("pcie: Set the "link
active" in the link status register") set data link layer link active
bit in this register without adding compatibility to old machine types.

When migrating from qemu 2.3 and older this affects xhci devices which
under machine type 2.0 and older have a pci express endpoint capability
even if they are on a pci bus.

Add compatibility flags to make this bit value match what it was under
2.3.

Additionally, to avoid breaking migration from qemu 2.3 and up,
suppress checking link status during migration: this seems sane
since hardware can change link status at any time.

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

Reported-by: Gerd Hoffmann <address@hidden>
Fixes: b2101eae63ea57b571cee4a9075a4287d24ba4a4
    ("pcie: Set the "link active" in the link status register")
Cc: address@hidden
Cc: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 2c533c5479f0f712578422529b20651f01adb0f4
      
https://github.com/qemu/qemu/commit/2c533c5479f0f712578422529b20651f01adb0f4
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/pci-bridge/ioh3420.c

  Log Message:
  -----------
  hw/pcie-root-port: Fix PCIe root port initialization

Specify the root port interrupt pin as part of the init
process for cases when msi/msix are not enabled.

Fixes "hw/pci/pci.c:196:23: runtime error: shift exponent -1 is negative"
warning from clang's sanitizer.

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 7b346c742cd95816c1d5badcc88e18bb95ace08c
      
https://github.com/qemu/qemu/commit/7b346c742cd95816c1d5badcc88e18bb95ace08c
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/pci-bridge/pci_expander_bridge.c

  Log Message:
  -----------
  hw/pxb: declare pxb devices as not hot-pluggable

Prevent future issues when hotplug will work for devices
attached to pxbs.

Suggested-by: Igor Mammedov <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c99cb18eeb8bca145ee260a507ccce6775a6d260
      
https://github.com/qemu/qemu/commit/c99cb18eeb8bca145ee260a507ccce6775a6d260
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  hw/acpi: fix a DSDT table issue when a pxb is present.

PXBs do not support hotplug so they don't have a PCNT function.
Since the PXB's PCI root-bus is a child bus of bus 0, the
build_dsdt code will add a call to the corresponding PCNT function.

Fix this by skipping the PCNT call for the above case.
While at it skip also PCIe child buses.

Reported-by: Igor Mammedov <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 2df5a7b52f2b1923f59f47da4ac2fc5501b4bd3c
      
https://github.com/qemu/qemu/commit/2df5a7b52f2b1923f59f47da4ac2fc5501b4bd3c
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: refactor pxb crs computation

Instead of always passing both IO and MEM ranges when
computing CRS ranges, define a new CrsRangeSet structure
that include them both.

This is done before introducing a third type of range,
64-bit MEM, so it will be easier to pass them all around.

Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 16de88a4164f2e580b3b2ee67d1b9ac1dace1711
      
https://github.com/qemu/qemu/commit/16de88a4164f2e580b3b2ee67d1b9ac1dace1711
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  hw/apci: handle 64-bit MMIO regions correctly

In build_crs(), the calculation and merging of the ranges already happens
in 64-bit, but the entry boundaries are silently truncated to 32-bit in the
call to aml_dword_memory(). Fix it by handling the 64-bit MMIO ranges 
separately.
This fixes 64-bit BARs behind PXBs.

Reported-by: Laszlo Ersek <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Tested-by: Laszlo Ersek <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 86395eb31f5c7bf919ed456c3c410720243f733a
      
https://github.com/qemu/qemu/commit/86395eb31f5c7bf919ed456c3c410720243f733a
  Author: Wei Jiangang <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/pci-bridge/pci_expander_bridge.c

  Log Message:
  -----------
  hw/pci-bridge: Convert pxb initialization functions to Error

Firstly, convert pxb_dev_init_common() to Error and rename
it to pxb_dev_realize_common().
Actually, pxb_register_bus() is converted as well.

And then,
convert pxb_dev_initfn() and pxb_pcie_dev_initfn() to Error,
rename them to pxb_dev_realize() and pxb_pcie_dev_realize()
respectively.

Signed-off-by: Wei Jiangang <address@hidden>
Signed-off-by: Cao jin <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: be0d9760d7fa30e50ded15956f06506d993cbc88
      
https://github.com/qemu/qemu/commit/be0d9760d7fa30e50ded15956f06506d993cbc88
  Author: Wei Jiangang <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

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

  Log Message:
  -----------
  apb: convert init to realize

Convert a device model where initialization obviously can't fail,
make it implement realize() rather than init().

Signed-off-by: Wei Jiangang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>


  Commit: 9a4c0e220d8a4f82b5665d0ee95ef94d8e1509d5
      
https://github.com/qemu/qemu/commit/9a4c0e220d8a4f82b5665d0ee95ef94d8e1509d5
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/display/virtio-gpu-pci.c
    M hw/display/virtio-vga.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio-pci.h
    M include/hw/compat.h

  Log Message:
  -----------
  hw/virtio-pci: fix virtio behaviour

Enable transitional virtio devices by default.
Enable virtio-1.0 for devices plugged into
PCIe ports (Root ports or Downstream ports).

Using the virtio-1 mode will remove the limitation
of the number of devices that can be attached to a machine
by removing the need for the IO BAR.

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


  Commit: 1e7aed70144b4673fc26e73062064b6724795e5f
      
https://github.com/qemu/qemu/commit/1e7aed70144b4673fc26e73062064b6724795e5f
  Author: Prasad J Pandit <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: check vring descriptor buffer length

virtio back end uses set of buffers to facilitate I/O operations.
An infinite loop unfolds in virtqueue_pop() if a buffer was
of zero size. Add check to avoid it.

Reported-by: Li Qiang <address@hidden>
Signed-off-by: Prasad J Pandit <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: 01edc230d9d3276bd77b79a66d770e3b66a8ca4b
      
https://github.com/qemu/qemu/commit/01edc230d9d3276bd77b79a66d770e3b66a8ca4b
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  misc: indentation

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: d9d261142d554504a32d95b771e9d8191631323f
      
https://github.com/qemu/qemu/commit/d9d261142d554504a32d95b771e9d8191631323f
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: minor simplification

Shorten the code and make it more clear by using the specialized
function g_str_has_prefix().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 9c7d18b3a59f6e4464543905dede90f1a65096cc
      
https://github.com/qemu/qemu/commit/9c7d18b3a59f6e4464543905dede90f1a65096cc
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: disconnect on HUP

In some cases, qemu_chr_fe_read_all() on HUP event doesn't raise
CHR_EVENT_CLOSED because the read/recv function returns -1 on
disconnected peers (for example with tch_chr_recv, an ECONNRESET errno
overwritten as EIO).

It is simpler to explicitely disconnect on HUP, rising CHR_EVENT_CLOSED
if it wasn't disconnected already.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 7cb8a9b9f235098096c493cc1a1487cd8dbd6820
      
https://github.com/qemu/qemu/commit/7cb8a9b9f235098096c493cc1a1487cd8dbd6820
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: don't assume opaque is a fd, use backend cleanup

vhost-dev opaque isn't necessarily an fd, it can be a chardev when using
vhost-user. Goto fail, so vhost_backend_cleanup() is called to handle
backend cleanup appropriately.

vhost_set_backend_type() should never fail, use an assert().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 9e0bc24fa57b98561d75ab8f61a419f2d69ec6aa
      
https://github.com/qemu/qemu/commit/9e0bc24fa57b98561d75ab8f61a419f2d69ec6aa
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: make vhost_log_put() idempotent

Although not strictly required, it is nice to have vhost_log_put()
safely callable multiple times.

Clear dev->log* when calling vhost_log_put() to make the function
idempotent. This also simplifies a bit the caller work.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 7b527247f09740920d8bc8aaa5ef4445256ca478
      
https://github.com/qemu/qemu/commit/7b527247f09740920d8bc8aaa5ef4445256ca478
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: assert the log was cleaned up

Make sure the log was released on cleanup, or it will leak (the
alternative is to call vhost_log_put() unconditionally, but it may hide
some dev state issues).

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 5be5f9be724d43fbec3d6f955a43bc64a62d55cc
      
https://github.com/qemu/qemu/commit/5be5f9be724d43fbec3d6f955a43bc64a62d55cc
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: fix cleanup on not fully initialized device

If vhost_dev_init() failed, caller may still call vhost_dev_cleanup()
later. However, vhost_dev_cleanup() tries to remove the device from the
list even if it wasn't yet added, which may lead to crashes. Similarly
for the memory listener.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: e0547b59dc0ead4c605d3f02d1c8829630a1311b
      
https://github.com/qemu/qemu/commit/e0547b59dc0ead4c605d3f02d1c8829630a1311b
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: make vhost_dev_cleanup() idempotent

It is called on multiple code path, so make it safe to call several
times (note: I don't remember a reproducer here, but a function called
'cleanup' should probably be idempotent in my book)

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: f1a0365b686c2abdfde6303947f8893873b6b00b
      
https://github.com/qemu/qemu/commit/f1a0365b686c2abdfde6303947f8893873b6b00b
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  vhost-net: always call vhost_dev_cleanup() on failure

vhost_dev_init(), calling vhost backend initialization, should be
cleaned up after failure too. Call vhost_dev_cleanup() in all failure
cases. First, it needs to zero-alloc the struct to avoid the initial
garbage.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: a06db3ec720a570089b16125d3bca470e7bb34b8
      
https://github.com/qemu/qemu/commit/a06db3ec720a570089b16125d3bca470e7bb34b8
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: fix calling vhost_dev_cleanup() after vhost_dev_init()

vhost_net_init() calls vhost_dev_init() and in case of failure, calls
vhost_dev_cleanup() directly. However, the structure is already
partially cleaned on error. Calling vhost_dev_cleanup() again will call
vhost_virtqueue_cleanup() on already clean queues, and causing potential
double-close. Instead, adjust dev->nvqs and simplify vhost_dev_init()
code to not call vhost_virtqueue_cleanup() but vhost_dev_cleanup()
instead.

Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Ilya Maximets <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 162bba7fa84182e5dc07f94db9744fc80109592a
      
https://github.com/qemu/qemu/commit/162bba7fa84182e5dc07f94db9744fc80109592a
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: do not assert() on vhost_ops failure

Calling a vhost operation may fail, for example with disconnected
vhost-user backend, but qemu shouldn't abort in this case.

Log an error instead, except on error and cleanup code paths where it
can be mostly ignored.

Let's use a VHOST_OPS_DEBUG macro to easily disable those messages once
disconnected backend stabilizes.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c640969216d6212ddcb8613330832b044d768996
      
https://github.com/qemu/qemu/commit/c640969216d6212ddcb8613330832b044d768996
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: add missing VHOST_OPS_DEBUG

Add missing VHOST_OPS_DEBUG() logs, for completeness.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 4afba631206d302303499edc22a8f3fc7a1816ee
      
https://github.com/qemu/qemu/commit/4afba631206d302303499edc22a8f3fc7a1816ee
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: use error_report() instead of fprintf(stderr,...)

Let's use qemu proper error reporting API, this ensures the error is
reported at the right place (stderr or monitor), with a conventional
format.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 5c7eaabf65ba936f718ef4dfcfc551ffc9d4f35c
      
https://github.com/qemu/qemu/commit/5c7eaabf65ba936f718ef4dfcfc551ffc9d4f35c
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  qemu-char: fix qemu_chr_fe_set_msgfds() crash when disconnected

Calling qemu_chr_fe_set_msgfds() on unconnected socket leads to crash
since s->ioc is NULL in this case. Return an error earlier instead.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: df3485a14821edf75b1d3ee6ca38cd80fa989dbf
      
https://github.com/qemu/qemu/commit/df3485a14821edf75b1d3ee6ca38cd80fa989dbf
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

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

  Log Message:
  -----------
  vhost-user: call set_msgfds unconditionally

It is fine to call set_msgfds() with 0 fd, and ensures any previous fd
array is cleared.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 6fab2f3f6064ad0a712c6d9213b9151bcc87c3d6
      
https://github.com/qemu/qemu/commit/6fab2f3f6064ad0a712c6d9213b9151bcc87c3d6
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

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

  Log Message:
  -----------
  vhost-user: check qemu_chr_fe_set_msgfds() return value

Check qemu_chr_fe_set_msgfds() for errors, to make sure the message to
be sent is correct.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c4843a45e3d4f3698b214275ab5e78cdb6a3d212
      
https://github.com/qemu/qemu/commit/c4843a45e3d4f3698b214275ab5e78cdb6a3d212
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

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

  Log Message:
  -----------
  vhost-user: check vhost_user_{read,write}() return value

The vhost-user code is quite inconsistent with error handling. Instead
of ignoring some return values of read/write and silently going on with
invalid state (invalid read for example), break the code flow when the
error happened.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: e6bcb1b61782cefacecc8b9ee7a5f782373dab2d
      
https://github.com/qemu/qemu/commit/e6bcb1b61782cefacecc8b9ee7a5f782373dab2d
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/net/vhost_net.c
    M net/tap.c
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: keep vhost_net after a disconnection

Many code paths assume get_vhost_net() returns non-null.

Keep VhostUserState.vhost_net after a successful vhost_net_init(),
instead of freeing it in vhost_net_cleanup().

VhostUserState.vhost_net is thus freed before after being recreated or
on final vhost_user_cleanup() and there is no need to save the acked
features.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 1a5b68cee8a2b165ffd61b2e0641a4da3990f242
      
https://github.com/qemu/qemu/commit/1a5b68cee8a2b165ffd61b2e0641a4da3990f242
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/net/vhost_net.c
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: add get_vhost_net() assertions

Add a few assertions to be more explicit about the runtime behaviour
after the previous patch: get_vhost_net() is non-null after
net_vhost_user_init().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: bb12e761e8e7b5c3c3d77bd08de9f007727a941e
      
https://github.com/qemu/qemu/commit/bb12e761e8e7b5c3c3d77bd08de9f007727a941e
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  Revert "vhost-net: do not crash if backend is not present"

Now that get_vhost_net() returns non-null after a successful
vhost_net_init(), we no longer need to check this case.

This reverts commit ecd34898596c60f79886061618dd7e01001113ad.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 51f7aca973be7550227102055218dffb98fb6990
      
https://github.com/qemu/qemu/commit/51f7aca973be7550227102055218dffb98fb6990
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  vhost-net: vhost_migration_done is vhost-user specific

Either the callback is mandatory to implement, in which case an assert()
is more appropriate, or it's not and we can't tell much whether the
function should fail or not (given it's name, I guess it should silently
success by default). Instead, make the implementation mandatory and
vhost-user specific to be more clear about its usage.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 8695de0fcf739b2071018d933b407ed8c16f40e8
      
https://github.com/qemu/qemu/commit/8695de0fcf739b2071018d933b407ed8c16f40e8
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: add assert() to check runtime behaviour

All these functions must be called only after the backend is connected.
They are called from virtio-net.c, after either virtio or link status
change.

The check for nc->peer->link_down should ensure vhost_net_{start,stop}()
are always called between vhost_user_{start,stop}().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 6b6723c3b508403309aa21c4fcbe515bd1edfd74
      
https://github.com/qemu/qemu/commit/6b6723c3b508403309aa21c4fcbe515bd1edfd74
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M include/sysemu/char.h
    M qemu-char.c

  Log Message:
  -----------
  char: add chr_wait_connected callback

A function to wait on the backend to be connected, to be used in the
following patches.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: d7a04fd7d500870ad70f15089c6590e4bea73e70
      
https://github.com/qemu/qemu/commit/d7a04fd7d500870ad70f15089c6590e4bea73e70
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  char: add and use tcp_chr_wait_connected

Add a chr_wait_connected for the tcp backend, and use it in the
open_socket() function.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c89804d674e4e3804bd3ac1fe79650896044b4e8
      
https://github.com/qemu/qemu/commit/c89804d674e4e3804bd3ac1fe79650896044b4e8
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: wait until backend init is completed

The chardev waits for an initial connection before starting qemu, and
vhost-user should wait for the backend negotiation to be completed
before starting qemu too.

vhost-user is started in the net_vhost_user_event callback, which is
synchronously called after the socket is connected. Use a
VhostUserState.started flag to indicate vhost-user init completed
successfully and qemu can be started.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 1ec3b71cde6997db866a76ff3311cb97c0b6741a
      
https://github.com/qemu/qemu/commit/1ec3b71cde6997db866a76ff3311cb97c0b6741a
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M tests/virtio-net-test.c

  Log Message:
  -----------
  tests: plug some leaks in virtio-net-test

Found thanks to valgrind.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 69179fe2fc0b91f68699012ba72d329e74ff629e
      
https://github.com/qemu/qemu/commit/69179fe2fc0b91f68699012ba72d329e74ff629e
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M tests/vhost-user-test.c

  Log Message:
  -----------
  tests: fix vhost-user-test leak

Spotted by valgrind.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: f6b8571041eea057b9e55fad51357e8d8ac9b1c0
      
https://github.com/qemu/qemu/commit/f6b8571041eea057b9e55fad51357e8d8ac9b1c0
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

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

  Log Message:
  -----------
  vhost-user: add error report in vhost_user_write()

Similar to vhost_user_read() error report, it is useful to have early
error report.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 950d94ba0671e7f154a9e87a277f8efbddcee28f
      
https://github.com/qemu/qemu/commit/950d94ba0671e7f154a9e87a277f8efbddcee28f
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/net/vhost_net.c
    M hw/virtio/vhost.c
    M include/hw/virtio/vhost.h

  Log Message:
  -----------
  vhost: add vhost_net_set_backend()

Not all vhost-user backends support ops->vhost_net_set_backend(). It is
a nicer to provide an assert/error than to crash trying to
call. Furthermore, it improves a bit the code by hiding vhost_ops
details.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 499c557975275dba23fbf8f23880815d019ce663
      
https://github.com/qemu/qemu/commit/499c557975275dba23fbf8f23880815d019ce663
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: do not update last avail idx on get_vring_base() failure

The state.num value will probably be 0 in this case, but that
doesn't make sense to update.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: f077f889121c89612eaf0f21e94b97aa110a6910
      
https://github.com/qemu/qemu/commit/f077f889121c89612eaf0f21e94b97aa110a6910
  Author: Cao jin <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/scsi/mptsas.c

  Log Message:
  -----------
  mptsas: Fix a migration compatible issue

My previous commit 2e2aa316 removed internal flag msi_in_use, which
exists in vmstate, use VMSTATE_UNUSED for migration compatibility.

Reported-by: Amit Shah <address@hidden>
Suggested-by: Amit Shah <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Cc: Amit Shah <address@hidden>
Signed-off-by: Cao jin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Amit Shah <address@hidden>


  Commit: cbe81c6331d875750720c021492ca74e312f9cb2
      
https://github.com/qemu/qemu/commit/cbe81c6331d875750720c021492ca74e312f9cb2
  Author: Peter Maydell <address@hidden>
  Date:   2016-07-29 (Fri, 29 Jul 2016)

  Changed paths:
    M hw/display/virtio-gpu-pci.c
    M hw/display/virtio-vga.c
    M hw/i386/acpi-build.c
    M hw/net/vhost_net.c
    M hw/pci-bridge/ioh3420.c
    M hw/pci-bridge/pci_expander_bridge.c
    M hw/pci-host/apb.c
    M hw/pci/pci.c
    M hw/pci/pcie.c
    M hw/scsi/mptsas.c
    M hw/virtio/vhost-user.c
    M hw/virtio/vhost.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio-pci.h
    M hw/virtio/virtio.c
    M include/hw/compat.h
    M include/hw/pci/pci.h
    M include/hw/virtio/vhost.h
    M include/sysemu/char.h
    M net/tap.c
    M net/vhost-user.c
    M qemu-char.c
    M tests/vhost-user-test.c
    M tests/virtio-net-test.c

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

pc, pci, virtio: cleanups, fixes

a bunch of bugfixes and a couple of cleanups
making these easier and/or making debugging easier

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

# gpg: Signature made Fri 29 Jul 2016 04:11:01 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

* remotes/mst/tags/for_upstream: (41 commits)
  mptsas: Fix a migration compatible issue
  vhost: do not update last avail idx on get_vring_base() failure
  vhost: add vhost_net_set_backend()
  vhost-user: add error report in vhost_user_write()
  tests: fix vhost-user-test leak
  tests: plug some leaks in virtio-net-test
  vhost-user: wait until backend init is completed
  char: add and use tcp_chr_wait_connected
  char: add chr_wait_connected callback
  vhost: add assert() to check runtime behaviour
  vhost-net: vhost_migration_done is vhost-user specific
  Revert "vhost-net: do not crash if backend is not present"
  vhost-user: add get_vhost_net() assertions
  vhost-user: keep vhost_net after a disconnection
  vhost-user: check vhost_user_{read,write}() return value
  vhost-user: check qemu_chr_fe_set_msgfds() return value
  vhost-user: call set_msgfds unconditionally
  qemu-char: fix qemu_chr_fe_set_msgfds() crash when disconnected
  vhost: use error_report() instead of fprintf(stderr,...)
  vhost: add missing VHOST_OPS_DEBUG
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/aa2aac51f0f8...cbe81c6331d8

reply via email to

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