qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 861fec: i386/msi: Correct mask of destination


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 861fec: i386/msi: Correct mask of destination ID in MSI ad...
Date: Mon, 04 Dec 2017 09:18:10 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 861fec459bb4db69123c3b320e1bad9585cdb524
      
https://github.com/qemu/qemu/commit/861fec459bb4db69123c3b320e1bad9585cdb524
  Author: Chao Gao <address@hidden>
  Date:   2017-12-01 (Fri, 01 Dec 2017)

  Changed paths:
    M include/hw/i386/apic-msidef.h

  Log Message:
  -----------
  i386/msi: Correct mask of destination ID in MSI address

According to SDM 10.11.1, only [19:12] bits of MSI address are
Destination ID, change the mask to avoid ambiguity for VT-d spec
has used the bit 4 to indicate a remappable interrupt request.

Signed-off-by: Chao Gao <address@hidden>
Signed-off-by: Lan Tianyu <address@hidden>
Reviewed-by: Anthony PERARD <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 2d4ba6cc741df15df6fbb4feaa706a02e103083a
      
https://github.com/qemu/qemu/commit/2d4ba6cc741df15df6fbb4feaa706a02e103083a
  Author: Maxime Coquelin <address@hidden>
  Date:   2017-12-01 (Fri, 01 Dec 2017)

  Changed paths:
    M hw/virtio/virtio.c
    M include/hw/virtio/virtio.h

  Log Message:
  -----------
  virtio: Add queue interface to restore avail index from vring used index

In case of backend crash, it is not possible to restore internal
avail index from the backend value as vhost_get_vring_base
callback fails.

This patch provides a new interface to restore internal avail index
from the vring used index, as done by some vhost-user backend on
reconnection.

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


  Commit: 2ae39a113af311cb56a0c35b7f212dafcef15303
      
https://github.com/qemu/qemu/commit/2ae39a113af311cb56a0c35b7f212dafcef15303
  Author: Maxime Coquelin <address@hidden>
  Date:   2017-12-01 (Fri, 01 Dec 2017)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: restore avail index from vring used index on disconnection

vhost_virtqueue_stop() gets avail index value from the backend,
except if the backend is not responding.

It happens when the backend crashes, and in this case, internal
state of the virtio queue is inconsistent, making packets
to corrupt the vring state.

With a Linux guest, it results in following error message on
backend reconnection:

[   22.444905] virtio_net virtio0: output.0:id 0 is not a head!
[   22.446746] net enp0s3: Unexpected TXQ (0) queue failure: -5
[   22.476360] net enp0s3: Unexpected TXQ (0) queue failure: -5

Fixes: 283e2c2adcb8 ("net: virtio-net discards TX data after link down")
Cc: address@hidden
Signed-off-by: Maxime Coquelin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: d36d0a9d152316a41e02c2613a71f5859f407da1
      
https://github.com/qemu/qemu/commit/d36d0a9d152316a41e02c2613a71f5859f407da1
  Author: Marc-André Lureau <address@hidden>
  Date:   2017-12-01 (Fri, 01 Dec 2017)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  dump-guest-memory.py: fix No symbol "vmcoreinfo_find"

When qemu is compiled without debug, the dump gdb python script can fail with:

Error occurred in Python command: No symbol "vmcoreinfo_find" in current 
context.

Because vmcoreinfo_find() is inlined and not exported.

Use the underlying object_resolve_path_type() to get the instance instead.

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


  Commit: 2fe45ec3bffbd3a26f2ed39f60bab0ca5217d8f6
      
https://github.com/qemu/qemu/commit/2fe45ec3bffbd3a26f2ed39f60bab0ca5217d8f6
  Author: Greg Kurz <address@hidden>
  Date:   2017-12-01 (Fri, 01 Dec 2017)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: fix error check in vhost_verify_ring_mappings()

Since commit f1f9e6c5 "vhost: adapt vhost_verify_ring_mappings() to
virtio 1 ring layout", we check the mapping of each part (descriptor
table, available ring and used ring) of each virtqueue separately.

The checking of a part is done by the vhost_verify_ring_part_mapping()
function: it returns either 0 on success or a negative errno if the
part cannot be mapped at the same place.

Unfortunately, the vhost_verify_ring_mappings() function checks its
return value the other way round. It means that we either:
- only verify the descriptor table of the first virtqueue, and if it
  is valid we ignore all the other mappings
- or ignore all broken mappings until we reach a valid one

ie, we only raise an error if all mappings are broken, and we consider
all mappings are valid otherwise (false success), which is obviously
wrong.

This patch ensures that vhost_verify_ring_mappings() only returns
success if ALL mappings are okay.

Reported-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 758ead31c7e17bf17a9ef2e0ca1c3e86ab296b43
      
https://github.com/qemu/qemu/commit/758ead31c7e17bf17a9ef2e0ca1c3e86ab296b43
  Author: Prasad J Pandit <address@hidden>
  Date:   2017-12-01 (Fri, 01 Dec 2017)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  virtio: check VirtQueue Vring object is set

A guest could attempt to use an uninitialised VirtQueue object
or unset Vring.align leading to a arithmetic exception. Add check
to avoid it.

Reported-by: Zhangboxian <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>
Reviewed-by: Cornelia Huck <address@hidden>


  Commit: 75ba2ddb188fa07c3442446766782036e3085cba
      
https://github.com/qemu/qemu/commit/75ba2ddb188fa07c3442446766782036e3085cba
  Author: Igor Mammedov <address@hidden>
  Date:   2017-12-01 (Fri, 01 Dec 2017)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: fix crash on attempted cpu unplug

when qemu is started with '-no-acpi' CLI option, an attempt
to unplug a CPU using device_del results in null pointer
dereference at:

  #0 object_get_class
  #1 pc_machine_device_unplug_request_cb
  #2 qmp_marshal_device_del

which is caused by pcms->acpi_dev == NULL due to ACPI support
being disabled.

Considering that ACPI support is necessary for unplug to work,
check that it's enabled and fail unplug request gracefully
if no acpi device were found.

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


  Commit: e80a25611c67a93947ae99f4057b850410a54497
      
https://github.com/qemu/qemu/commit/e80a25611c67a93947ae99f4057b850410a54497
  Author: Peter Maydell <address@hidden>
  Date:   2017-12-04 (Mon, 04 Dec 2017)

  Changed paths:
    M hw/i386/pc.c
    M hw/virtio/vhost.c
    M hw/virtio/virtio.c
    M include/hw/i386/apic-msidef.h
    M include/hw/virtio/virtio.h
    M scripts/dump-guest-memory.py

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

pc, pci, virtio: fixes for rc3

A bunch of fixes all over the place.

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

# gpg: Signature made Fri 01 Dec 2017 17:06:33 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:
  pc: fix crash on attempted cpu unplug
  virtio: check VirtQueue Vring object is set
  vhost: fix error check in vhost_verify_ring_mappings()
  dump-guest-memory.py: fix No symbol "vmcoreinfo_find"
  vhost: restore avail index from vring used index on disconnection
  virtio: Add queue interface to restore avail index from vring used index
  i386/msi: Correct mask of destination ID in MSI address

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


Compare: https://github.com/qemu/qemu/compare/495566ec3881...e80a25611c67

reply via email to

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