qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d60c75: vhost-vdpa: skip ram device from the


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d60c75: vhost-vdpa: skip ram device from the IOTLB mapping
Date: Fri, 11 Jun 2021 01:22:26 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: d60c75d28fe9d49bef28f7fa863481e1d9f6ff96
      
https://github.com/qemu/qemu/commit/d60c75d28fe9d49bef28f7fa863481e1d9f6ff96
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

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

  Log Message:
  -----------
  vhost-vdpa: skip ram device from the IOTLB mapping

vDPA is not tie to any specific hardware, for safety and simplicity,
vhost-vDPA doesn't allow MMIO area to be mapped via IOTLB. Only the
doorbell could be mapped via mmap(). So this patch exclude skip the
ram device from the IOTLB mapping.

Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: d0416d487bd561526486c2e43910ea9494855e16
      
https://github.com/qemu/qemu/commit/d0416d487bd561526486c2e43910ea9494855e16
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M hw/virtio/vhost-vdpa.c
    M include/hw/virtio/vhost-vdpa.h

  Log Message:
  -----------
  vhost-vdpa: map virtqueue notification area if possible

This patch implements the vq notification mapping support for
vhost-vDPA. This is simply done by using mmap()/munmap() for the
vhost-vDPA fd during device start/stop. For the device without
notification mapping support, we fall back to eventfd based
notification gracefully.

Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: c33f23a419f95da16ab4faaf08be635c89b96ff0
      
https://github.com/qemu/qemu/commit/c33f23a419f95da16ab4faaf08be635c89b96ff0
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

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

  Log Message:
  -----------
  vhost-vdpa: don't initialize backend_features

We used to initialize backend_features during vhost_vdpa_init()
regardless whether or not it was supported by vhost. This will lead
the unsupported features like VIRTIO_F_IN_ORDER to be included and set
to the vhost-vdpa during vhost_dev_start. Because the
VIRTIO_F_IN_ORDER is not supported by vhost-vdpa so it won't be
advertised to guest which will break the datapath.

Fix this by not initializing the backend_features, so the
acked_features could be built only from guest features via
vhost_net_ack_features().

Fixes: 108a64818e69b ("vhost-vdpa: introduce vhost-vdpa backend")
Cc: qemu-stable@nongnu.org
Cc: Gautam Dawar <gdawar@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 1b031172119c8996af5fa84b6e10627ea4122d64
      
https://github.com/qemu/qemu/commit/1b031172119c8996af5fa84b6e10627ea4122d64
  Author: Jason Wang <jasowang@redhat.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M include/net/vhost-vdpa.h
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vhost-vdpa: remove the unused vhost_vdpa_get_acked_features()

No user for this helper, let's remove it.

Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 48f596c5a711d62f8b0c78b95569b2d8f9ad2704
      
https://github.com/qemu/qemu/commit/48f596c5a711d62f8b0c78b95569b2d8f9ad2704
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M hmp-commands.hx
    M qapi/net.json

  Log Message:
  -----------
  netdev: add more commands to preconfig mode

Creating and destroying network backend does not require a fully
constructed machine.  Allow the related monitor commands to run before
machine initialization has concluded.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: f1ff9c437711803f4862e580a211b3af8bb369c7
      
https://github.com/qemu/qemu/commit/f1ff9c437711803f4862e580a211b3af8bb369c7
  Author: Rao, Lei <lei.rao@intel.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M net/colo-compare.c

  Log Message:
  -----------
  Remove some duplicate trace code.

There is the same trace code in the colo_compare_packet_payload.

Signed-off-by: Lei Rao <lei.rao@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 229620d52e389bc7690f11e4f5fa9b249b5ca65d
      
https://github.com/qemu/qemu/commit/229620d52e389bc7690f11e4f5fa9b249b5ca65d
  Author: Rao, Lei <lei.rao@intel.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M softmmu/runstate.c

  Log Message:
  -----------
  Fix the qemu crash when guest shutdown during checkpoint

This patch fixes the following:
    qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown'
    Aborted (core dumped)

Signed-off-by: Lei Rao <lei.rao@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 7c2eae9a77234f92be96d33cc20b990db714d86d
      
https://github.com/qemu/qemu/commit/7c2eae9a77234f92be96d33cc20b990db714d86d
  Author: Rao, Lei <lei.rao@intel.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M net/filter-mirror.c

  Log Message:
  -----------
  Optimize the function of filter_send

The iov_size has been calculated in filter_send(). we can directly
return the size.In this way, this is no need to repeat calculations
in filter_redirector_receive_iov();

Signed-off-by: Lei Rao <lei.rao@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 3ba024457facdb6b0ef9c5c742261d4080a80a11
      
https://github.com/qemu/qemu/commit/3ba024457facdb6b0ef9c5c742261d4080a80a11
  Author: Rao, Lei <lei.rao@intel.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M migration/colo.c
    M migration/migration.c

  Log Message:
  -----------
  Remove migrate_set_block_enabled in checkpoint

We can detect disk migration in migrate_prepare, if disk migration
is enabled in COLO mode, we can directly report an error.and there
is no need to disable block migration at every checkpoint.

Signed-off-by: Lei Rao <lei.rao@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 9b492719dd0445c676da6805c84f9a5893583d1c
      
https://github.com/qemu/qemu/commit/9b492719dd0445c676da6805c84f9a5893583d1c
  Author: Rao, Lei <lei.rao@intel.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M net/colo.c
    M net/colo.h
    M net/filter-rewriter.c

  Log Message:
  -----------
  Add a function named packet_new_nocopy for COLO.

Use the packet_new_nocopy instead of packet_new in the
filter-rewriter module. There will be one less memory
copy in the processing of each network packet.

Signed-off-by: Lei Rao <lei.rao@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 0c7af1a778d036402ec0829783afee1ce6ea942c
      
https://github.com/qemu/qemu/commit/0c7af1a778d036402ec0829783afee1ce6ea942c
  Author: Rao, Lei <lei.rao@intel.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M net/colo-compare.c
    M net/colo-compare.h
    M net/net.c

  Log Message:
  -----------
  Add the function of colo_compare_cleanup

This patch fixes the following:
    #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
    #1  0x00007f6ae4559859 in __GI_abort () at abort.c:79
    #2  0x0000559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 
<__func__.16227> "qemu_mutex_destroy") at util/qemu-thread-posix.c:36
    #3  0x0000559aaa3868c5 in qemu_mutex_destroy (mutex=0x559aabffe828) at 
util/qemu-thread-posix.c:69
    #4  0x0000559aaa2f93a8 in char_finalize (obj=0x559aabffe800) at 
chardev/char.c:285
    #5  0x0000559aaa23318a in object_deinit (obj=0x559aabffe800, 
type=0x559aabfd7d20) at qom/object.c:606
    #6  0x0000559aaa2331b8 in object_deinit (obj=0x559aabffe800, 
type=0x559aabfd9060) at qom/object.c:610
    #7  0x0000559aaa233200 in object_finalize (data=0x559aabffe800) at 
qom/object.c:620
    #8  0x0000559aaa234202 in object_unref (obj=0x559aabffe800) at 
qom/object.c:1074
    #9  0x0000559aaa2356b6 in object_finalize_child_property 
(obj=0x559aac0dac10, name=0x559aac778760 "compare0-0", opaque=0x559aabffe800) 
at qom/object.c:1584
    #10 0x0000559aaa232f70 in object_property_del_all (obj=0x559aac0dac10) at 
qom/object.c:557
    #11 0x0000559aaa2331ed in object_finalize (data=0x559aac0dac10) at 
qom/object.c:619
    #12 0x0000559aaa234202 in object_unref (obj=0x559aac0dac10) at 
qom/object.c:1074
    #13 0x0000559aaa2356b6 in object_finalize_child_property 
(obj=0x559aac0c75c0, name=0x559aac0dadc0 "chardevs", opaque=0x559aac0dac10) at 
qom/object.c:1584
    #14 0x0000559aaa233071 in object_property_del_child (obj=0x559aac0c75c0, 
child=0x559aac0dac10, errp=0x0) at qom/object.c:580
    #15 0x0000559aaa233155 in object_unparent (obj=0x559aac0dac10) at 
qom/object.c:599
    #16 0x0000559aaa2fb721 in qemu_chr_cleanup () at chardev/char.c:1159
    #17 0x0000559aa9f9b110 in main (argc=54, argv=0x7ffeb62fa998, 
envp=0x7ffeb62fab50) at vl.c:4539

When chardev is cleaned up, chr_write_lock needs to be destroyed. But
the colo-compare module is not cleaned up normally before it when the
guest poweroff. It is holding chr_write_lock at this time. This will
cause qemu crash.So we add the function of colo_compare_cleanup() before
qemu_chr_cleanup() to fix the bug.

Signed-off-by: Lei Rao <lei.rao@intel.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 5a2d9929ac1f01a1e8ef2a3f56f69e6069863dad
      
https://github.com/qemu/qemu/commit/5a2d9929ac1f01a1e8ef2a3f56f69e6069863dad
  Author: Rao, Lei <lei.rao@intel.com>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M net/colo-compare.c

  Log Message:
  -----------
  Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

The data pointer has skipped vnet_hdr_len in the function of
parse_packet_early().So, we can not subtract vnet_hdr_len again
when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise,
it will cause network packet comparsion errors and greatly increase
the frequency of checkpoints.

Signed-off-by: Lei Rao <lei.rao@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 894fc4fd670aaf04a67dc7507739f914ff4bacf2
      
https://github.com/qemu/qemu/commit/894fc4fd670aaf04a67dc7507739f914ff4bacf2
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-06-11 (Fri, 11 Jun 2021)

  Changed paths:
    M hmp-commands.hx
    M hw/virtio/vhost-vdpa.c
    M include/hw/virtio/vhost-vdpa.h
    M include/net/vhost-vdpa.h
    M migration/colo.c
    M migration/migration.c
    M net/colo-compare.c
    M net/colo-compare.h
    M net/colo.c
    M net/colo.h
    M net/filter-mirror.c
    M net/filter-rewriter.c
    M net/net.c
    M net/vhost-vdpa.c
    M qapi/net.json
    M softmmu/runstate.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into 
staging

# gpg: Signature made Fri 11 Jun 2021 03:54:51 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) 
<jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()
  Add the function of colo_compare_cleanup
  Add a function named packet_new_nocopy for COLO.
  Remove migrate_set_block_enabled in checkpoint
  Optimize the function of filter_send
  Fix the qemu crash when guest shutdown during checkpoint
  Remove some duplicate trace code.
  netdev: add more commands to preconfig mode
  vhost-vdpa: remove the unused vhost_vdpa_get_acked_features()
  vhost-vdpa: don't initialize backend_features
  vhost-vdpa: map virtqueue notification area if possible
  vhost-vdpa: skip ram device from the IOTLB mapping

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/7fe7fae8b48e...894fc4fd670a



reply via email to

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