qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a77690: virtio: Fix error handling in virtio_


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a77690: virtio: Fix error handling in virtio_bus_device_pl...
Date: Thu, 23 Mar 2017 04:45:10 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a77690c41da67d85bab1e784a9f24f18bc63dbd9
      
https://github.com/qemu/qemu/commit/a77690c41da67d85bab1e784a9f24f18bc63dbd9
  Author: Fam Zheng <address@hidden>
  Date:   2017-03-22 (Wed, 22 Mar 2017)

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

  Log Message:
  -----------
  virtio: Fix error handling in virtio_bus_device_plugged

For one thing we shouldn't continue if an error happened, for the other
two steps failing can cause an abort() in error_setg because we reuse
the same errp blindly.

Add error handling checks to fix both issues.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Andrew Jones <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


  Commit: e49a6618400d11e51e30328dfe8d7cafce82d4bc
      
https://github.com/qemu/qemu/commit/e49a6618400d11e51e30328dfe8d7cafce82d4bc
  Author: Paolo Bonzini <address@hidden>
  Date:   2017-03-22 (Wed, 22 Mar 2017)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: always use handle_aio_output if registered

Commit ad07cd6 ("virtio-scsi: always use dataplane path if ioeventfd is
active", 2016-10-30) and 9ffe337 ("virtio-blk: always use dataplane
path if ioeventfd is active", 2016-10-30) broke the virtio 1.0
indirect access registers.

The indirect access registers bypass the ioeventfd, so that virtio-blk
and virtio-scsi now repeatedly try to initialize dataplane instead of
triggering the guest->host EventNotifier.  Detect the situation by
checking vq->handle_aio_output; if it is not NULL, trigger the
EventNotifier, which is how the device expects to get notifications
and in fact the only thread-safe manner to deliver them.

Fixes: ad07cd6
Fixes: 9ffe337
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: f2a1ae45d8ec5ad494e66a9234499a2e0fbf4b40
      
https://github.com/qemu/qemu/commit/f2a1ae45d8ec5ad494e66a9234499a2e0fbf4b40
  Author: Laszlo Ersek <address@hidden>
  Date:   2017-03-22 (Wed, 22 Mar 2017)

  Changed paths:
    M hw/acpi/vmgenid.c
    M include/hw/acpi/vmgenid.h
    M include/hw/compat.h

  Log Message:
  -----------
  hw/acpi/vmgenid: prevent device realization on pre-2.5 machine types

The WRITE_POINTER linker/loader command that underlies VMGENID depends on
commit baf2d5bfbac0 ("fw-cfg: support writeable blobs", 2017-01-12), which
in turn depends on fw_cfg DMA.

DMA for fw_cfg is enabled in 2.5+ machine types only (see commit
e6915b5f3a87, "fw_cfg: unbreak migration compatibility for 2.4 and earlier
machines", 2016-02-18).

Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Ben Warren <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Ben Warren <address@hidden <mailto:address@hidden>>
Reviewed-by: Igor Mammedov <address@hidden>


  Commit: f92063028a0ea9e15d8f962644bce76c0e8aa7d1
      
https://github.com/qemu/qemu/commit/f92063028a0ea9e15d8f962644bce76c0e8aa7d1
  Author: Laszlo Ersek <address@hidden>
  Date:   2017-03-22 (Wed, 22 Mar 2017)

  Changed paths:
    M hw/acpi/vmgenid.c
    M include/hw/acpi/vmgenid.h

  Log Message:
  -----------
  hw/acpi/vmgenid: prevent more than one vmgenid device

A system with multiple VMGENID devices is undefined in the VMGENID spec by
omission.

Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Ben Warren <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>


  Commit: 2077cabcac3e052af320cd93522467c2c5861c76
      
https://github.com/qemu/qemu/commit/2077cabcac3e052af320cd93522467c2c5861c76
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-23 (Thu, 23 Mar 2017)

  Changed paths:
    M hw/acpi/vmgenid.c
    M hw/virtio/virtio-bus.c
    M hw/virtio/virtio.c
    M include/hw/acpi/vmgenid.h
    M include/hw/compat.h

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

virtio, pc: fixes

virtio and misc fixes for 2.9.

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

# gpg: Signature made Wed 22 Mar 2017 16:29:50 GMT
# 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:
  hw/acpi/vmgenid: prevent more than one vmgenid device
  hw/acpi/vmgenid: prevent device realization on pre-2.5 machine types
  virtio: always use handle_aio_output if registered
  virtio: Fix error handling in virtio_bus_device_plugged

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


Compare: https://github.com/qemu/qemu/compare/ad3c6418c2e2...2077cabcac3e

reply via email to

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