qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a38a49: vhost-user: fix memory leak


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a38a49: vhost-user: fix memory leak
Date: Fri, 02 Mar 2018 01:55:28 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a38a498dc1dc2d101a4958b6bfbf921df478c069
      
https://github.com/qemu/qemu/commit/a38a498dc1dc2d101a4958b6bfbf921df478c069
  Author: linzhecheng <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: fix memory leak

g_free() was moved from vhost_net_cleanup in commit e6bcb1b, so we should
free net after vhost_net_cleanup

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


  Commit: 2080a29f0e9cb2d456fabafbba936c8f78228a21
      
https://github.com/qemu/qemu/commit/2080a29f0e9cb2d456fabafbba936c8f78228a21
  Author: Greg Kurz <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

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

  Log Message:
  -----------
  virtio-pci: trivial fixes in error message

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


  Commit: b7a7bb358f2a9073922671f4616dfbe1e9566988
      
https://github.com/qemu/qemu/commit/b7a7bb358f2a9073922671f4616dfbe1e9566988
  Author: Jan Kiszka <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  intel-iommu: Accept 64-bit writes to FEADDR

Xen is doing this [1] and currently triggers an abort.

[1] 
http://xenbits.xenproject.org/gitweb/?p=xen.git;a=blob;f=xen/drivers/passthrough/vtd/iommu.c;h=daaed0abbdd06b6ba3d948ea103aadf02651e83c;hb=refs/heads/master#l1108

Reported-by: Luis Lloret <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c5e931640cb80151d8699779d66c158977055ef1
      
https://github.com/qemu/qemu/commit/c5e931640cb80151d8699779d66c158977055ef1
  Author: Tomáš Golembiovský <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M docs/virtio-balloon-stats.txt

  Log Message:
  -----------
  docs: document virtio-balloon stats

Document statistics added in commits

    commit a0d06486b445985b8d128df172daefbae205bffd
    Author: Denis V. Lunev <address@hidden>
    Date:   Wed Feb 24 10:50:48 2016 +0300
   virtio-balloon: add 'available' counter

and

    commit bf1e7140ef0b3a149860ab9f05b36665133238f6
    Author: Tomáš Golembiovský <address@hidden>
    Date:   Tue Dec 5 13:14:46 2017 +0100
   virtio-balloon: include statistics of disk/file caches

Signed-off-by: Tomáš Golembiovský <address@hidden>
Reviewed-by: Jonathan Helman <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: c8945922be9c11fc11dcbc54fadc556a893076fc
      
https://github.com/qemu/qemu/commit/c8945922be9c11fc11dcbc54fadc556a893076fc
  Author: Kashyap Chamarthy <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M docs/pcie.txt

  Log Message:
  -----------
  docs: pcie: Spell out machine type needs for PCIe features

PCIe features are available only via the 'q35' machine type for x86 and
the 'virt' machine type for AArch64 architecture.

Mention that explicitly.

Thanks: Daniel Berrangé

Signed-off-by: Kashyap Chamarthy <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 9e2a2a3e083fec1e8059b331e3998c0849d779c1
      
https://github.com/qemu/qemu/commit/9e2a2a3e083fec1e8059b331e3998c0849d779c1
  Author: Jay Zhou <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: fix memslot limit check

Since used_memslots will be updated to the actual value after
registering memory listener for the first time, move the
memslots limit checking to the right place.

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


  Commit: fb20fbb764aa1eb3014c7544ea3daa58bc7b4cd2
      
https://github.com/qemu/qemu/commit/fb20fbb764aa1eb3014c7544ea3daa58bc7b4cd2
  Author: Jia He <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: avoid to start/stop virtqueue which is not ready

In our Armv8a server, we try to configure the vhost scsi but fail
to boot up the guest (-machine virt-2.10). The guest's boot failure
is very early, even earlier than grub.

There are 3 virtqueues (ctrl, event and cmd) for virtio scsi device,
but ovmf and seabios will only set the physical address for the 3rd
one (cmd). Then in vhost_virtqueue_start(), virtio_queue_get_desc_addr
will be 0 for ctrl and event vq when qemu negotiates with ovmf. So
vhost_memory_map fails with ENOMEM.

This patch just fixs it by early quitting the virtqueue start/stop
when virtio_queue_get_desc_addr is 0.

Btw, after guest kernel starts, all the 3 queues will be initialized
and set address correctly.

Already tested on Arm64 and X86_64 qemu.

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


  Commit: 9fac50c88d91ebf7a7d3d31f8520762ac24e12b9
      
https://github.com/qemu/qemu/commit/9fac50c88d91ebf7a7d3d31f8520762ac24e12b9
  Author: Jia He <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M hw/virtio/vhost.c

  Log Message:
  -----------
  vhost: fix incorrect check in vhost_verify_ring_mappings

In commit 0ca1fd2d6878 ("vhost: Simplify ring verification checks"),
it checks the virtqueue desc mapping for 3 times.

Fixed: commit 0ca1fd2d6878 ("vhost: Simplify ring verification checks")
Signed-off-by: Jia He <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 59fbfed9b814f7e6d55adf9b3a978ee2c987d05b
      
https://github.com/qemu/qemu/commit/59fbfed9b814f7e6d55adf9b3a978ee2c987d05b
  Author: Marc-André Lureau <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M docs/specs/vmcoreinfo.txt

  Log Message:
  -----------
  docs/vmcoreinfo: detail unsupported host format behaviour

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


  Commit: 042cea274c5854023e1d18626480190c0d64268e
      
https://github.com/qemu/qemu/commit/042cea274c5854023e1d18626480190c0d64268e
  Author: Gonglei <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M backends/Makefile.objs
    A backends/cryptodev-vhost-user.c
    A backends/cryptodev-vhost.c
    M configure
    A include/sysemu/cryptodev-vhost.h
    M qemu-options.hx
    M vl.c

  Log Message:
  -----------
  cryptodev: add vhost-user as a new cryptodev backend

Usage:
 -chardev socket,id=charcrypto0,path=/path/to/your/socket
 -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0
 -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0

Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Longpeng(Mike) <address@hidden>
Signed-off-by: Jay Zhou <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 5da73dabe86162005dec83a039102b126944f03a
      
https://github.com/qemu/qemu/commit/5da73dabe86162005dec83a039102b126944f03a
  Author: Gonglei <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M backends/cryptodev-builtin.c
    M backends/cryptodev-vhost-user.c
    M backends/cryptodev-vhost.c
    M hw/virtio/virtio-crypto.c
    M include/hw/virtio/virtio-crypto.h
    A include/sysemu/cryptodev-vhost-user.h
    M include/sysemu/cryptodev.h

  Log Message:
  -----------
  cryptodev: add vhost support

Impliment the vhost-crypto's funtions, such as startup,
stop and notification etc. Introduce an enum
QCryptoCryptoDevBackendOptionsType in order to
identify the cryptodev vhost backend is vhost-user
or vhost-kernel-module (If exist).

At this point, the cryptdoev-vhost-user works.

Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Longpeng(Mike) <address@hidden>
Signed-off-by: Jay Zhou <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: efbfeb81802cf9723a4663fadd674bf452a07e11
      
https://github.com/qemu/qemu/commit/efbfeb81802cf9723a4663fadd674bf452a07e11
  Author: Gonglei <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M backends/cryptodev-vhost-user.c
    M docs/interop/vhost-user.txt
    M hw/virtio/vhost-user.c
    M include/hw/virtio/vhost-backend.h

  Log Message:
  -----------
  cryptodev-vhost-user: add crypto session handler

Introduce two vhost-user meassges: VHOST_USER_CREATE_CRYPTO_SESSION
and VHOST_USER_CLOSE_CRYPTO_SESSION. At this point, the QEMU side
support crypto operation in cryptodev host-user backend.

Signed-off-by: Gonglei <address@hidden>
Signed-off-by: Longpeng(Mike) <address@hidden>
Signed-off-by: Jay Zhou <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>


  Commit: 0a9b9be9eb40055d2d1bb5b8fc4d4faefecb22c3
      
https://github.com/qemu/qemu/commit/0a9b9be9eb40055d2d1bb5b8fc4d4faefecb22c3
  Author: Gonglei <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M backends/cryptodev-vhost-user.c
    M include/sysemu/cryptodev-vhost-user.h

  Log Message:
  -----------
  cryptodev-vhost-user: set the key length

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


  Commit: 427cbc7e4136a061628cb4315cc8182ea36d772f
      
https://github.com/qemu/qemu/commit/427cbc7e4136a061628cb4315cc8182ea36d772f
  Author: Peter Maydell <address@hidden>
  Date:   2018-03-01 (Thu, 01 Mar 2018)

  Changed paths:
    M backends/Makefile.objs
    M backends/cryptodev-builtin.c
    A backends/cryptodev-vhost-user.c
    A backends/cryptodev-vhost.c
    M configure
    M docs/interop/vhost-user.txt
    M docs/pcie.txt
    M docs/specs/vmcoreinfo.txt
    M docs/virtio-balloon-stats.txt
    M hw/i386/intel_iommu.c
    M hw/virtio/vhost-user.c
    M hw/virtio/vhost.c
    M hw/virtio/virtio-crypto.c
    M hw/virtio/virtio-pci.c
    M include/hw/virtio/vhost-backend.h
    M include/hw/virtio/virtio-crypto.h
    A include/sysemu/cryptodev-vhost-user.h
    A include/sysemu/cryptodev-vhost.h
    M include/sysemu/cryptodev.h
    M net/vhost-user.c
    M qemu-options.hx
    M vl.c

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

virtio,vhost,pci,pc: features, fixes and cleanups

- documentation updates
- vhost fixes
- new crypto vhost device

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

# gpg: Signature made Thu 01 Mar 2018 16:27:25 GMT
# gpg:                using RSA key 281F0DB8D28D5469
# 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:
  cryptodev-vhost-user: set the key length
  cryptodev-vhost-user: add crypto session handler
  cryptodev: add vhost support
  cryptodev: add vhost-user as a new cryptodev backend
  docs/vmcoreinfo: detail unsupported host format behaviour
  vhost: fix incorrect check in vhost_verify_ring_mappings
  vhost: avoid to start/stop virtqueue which is not ready
  vhost: fix memslot limit check
  docs: pcie: Spell out machine type needs for PCIe features
  docs: document virtio-balloon stats
  intel-iommu: Accept 64-bit writes to FEADDR
  virtio-pci: trivial fixes in error message
  vhost-user: fix memory leak

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


Compare: https://github.com/qemu/qemu/compare/0dc8ae5e8e69...427cbc7e4136

reply via email to

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