qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] cd7d1d: vhost_net: start/stop guest notifiers


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] cd7d1d: vhost_net: start/stop guest notifiers properly
Date: Thu, 04 Sep 2014 06:00:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: cd7d1d26b0a333bf2fca715e332690bbd738c097
      
https://github.com/qemu/qemu/commit/cd7d1d26b0a333bf2fca715e332690bbd738c097
  Author: Jason Wang <address@hidden>
  Date:   2014-09-03 (Wed, 03 Sep 2014)

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

  Log Message:
  -----------
  vhost_net: start/stop guest notifiers properly

commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 "vhost: multiqueue
support" changed the order of stopping the device. Previously
vhost_dev_stop would disable backend and only afterwards, unset guest
notifiers. We now unset guest notifiers while vhost is still
active. This can lose interrupts causing guest networking to fail. In
particular, this has been observed during migration.

To fix this, several other changes are needed:
- remove the hdev->started assertion in vhost.c since we may want to
start the guest notifiers before vhost starts and stop the guest
notifiers after vhost is stopped.
- introduce the vhost_net_set_vq_index() and call it before setting
guest notifiers. This is to guarantee vhost_net has the correct
virtqueue index when setting guest notifiers.

MST: fix up error handling.

Cc: address@hidden
Cc: Jason Wang <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Tested-by: Andrey Korolyov <address@hidden>
Reported-by: "Zhangjie (HZ)" <address@hidden>
Tested-by: William Dauchy <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>


  Commit: b49ae9138d5cadb47fb868297fbcdac8292fb666
      
https://github.com/qemu/qemu/commit/b49ae9138d5cadb47fb868297fbcdac8292fb666
  Author: Jason Wang <address@hidden>
  Date:   2014-09-03 (Wed, 03 Sep 2014)

  Changed paths:
    M hw/net/vhost_net.c

  Log Message:
  -----------
  vhost_net: init acked_features to backend_features

commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add
vhost_get_features and vhost_ack_features) removes the step that
initializes the acked_features to backend_features.

As this field is now uninitialized, vhost initialization will sometimes
fail.

To fix, initialize acked_features on each ack.

Tested-by: Andrey Korolyov <address@hidden>
Cc: Nikolay Nikolaev <address@hidden>
Cc: address@hidden
Signed-off-by: Jason Wang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 3a1655fc53a2d0375dc0b8cd358405c2cae288e3
      
https://github.com/qemu/qemu/commit/3a1655fc53a2d0375dc0b8cd358405c2cae288e3
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2014-09-03 (Wed, 03 Sep 2014)

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

  Log Message:
  -----------
  vhost-scsi: init backend features earlier

As vhost core can use backend_features during init, clear it earlier to
avoid using uninitialized memory.
This use would be harmless since vhost scsi ignores the result
anyway, but initializing earlier will help prevent valgrind errors,
and make scsi and net behave similarly.

Cc: address@hidden
Acked-by: Paolo Bonzini <address@hidden>
Acked-by: Jason Wang <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 07b81ed937b37e4c1974626c38e2f192ce08f8f5
      
https://github.com/qemu/qemu/commit/07b81ed937b37e4c1974626c38e2f192ce08f8f5
  Author: zhanghailiang <address@hidden>
  Date:   2014-09-03 (Wed, 03 Sep 2014)

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

  Log Message:
  -----------
  acpi-build: Set FORCE_APIC_CLUSTER_MODEL bit for FADT flags

If we start Windows 2008 R2 DataCenter with number of cpu less than 8,
The system will use APIC Flat Logical destination mode as default configuration,
Which has an upper limit of 8 CPUs.

The fault is that VM can not show all processors within Task Manager if
we hot-add cpus when the number of cpus in VM extends the limit of 8.

If we use cluster destination model, the problem will be solved.

Note:
This flag was introduced later than ACPI v1.0 specification while QEMU
generates v1.0 tables only, but...

linux kernel ignores this flag, so patch has no influence on it.

Tested with Win[XPsp3|Srv2003EE|Srv2008DC|Srv2008R2|Srv2012R2], there
isn't BSODs and guests boot just fine. In cases guest doesn't support
cpu-hotplug, cpu becomes visible after reboot and in case the guest
supports cpu-hotplug, it works as expected with this patch.

Cc: address@hidden
Signed-off-by: huangzhichao <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-By: Igor Mammedov <address@hidden>


  Commit: 4771b02512ddc52ee5b946a3487c78fbce60e0ab
      
https://github.com/qemu/qemu/commit/4771b02512ddc52ee5b946a3487c78fbce60e0ab
  Author: Peter Maydell <address@hidden>
  Date:   2014-09-04 (Thu, 04 Sep 2014)

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

  Log Message:
  -----------
  Revert "vhost_net: start/stop guest notifiers properly"

This reverts commit aad4dce934649b3a398396fc2a76f215bb194ea4.

I accidentally merged the wrong version of a pull request
which had a buggy version of this patch. Reverting the
buggy version means we can then cleanly merge in the correct
pull with the corrected change.

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


  Commit: b27e37d4ce4e9951afbb9280bb1416c13f562295
      
https://github.com/qemu/qemu/commit/b27e37d4ce4e9951afbb9280bb1416c13f562295
  Author: Peter Maydell <address@hidden>
  Date:   2014-09-04 (Thu, 04 Sep 2014)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/net/vhost_net.c
    M hw/scsi/vhost-scsi.c
    M hw/virtio/vhost.c

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

pci, pc fixes, features

A bunch of bugfixes - these will make sense for 2.1.1

Initial Intel IOMMU support.

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

# gpg: Signature made Wed 03 Sep 2014 14:41:23 BST using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"

* remotes/mst/tags/for_upstream:
  acpi-build: Set FORCE_APIC_CLUSTER_MODEL bit for FADT flags
  vhost-scsi: init backend features earlier
  vhost_net: init acked_features to backend_features
  vhost_net: start/stop guest notifiers properly

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


Compare: https://github.com/qemu/qemu/compare/f2426947decc...b27e37d4ce4e

reply via email to

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