qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9288e8: xen-hvm: Allow disabling buffer_io_ti


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 9288e8: xen-hvm: Allow disabling buffer_io_timer
Date: Fri, 28 Jan 2022 06:04:21 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9288e803e61e8d56d1c6c6aa8beb58596fb84ed9
      
https://github.com/qemu/qemu/commit/9288e803e61e8d56d1c6c6aa8beb58596fb84ed9
  Author: Jason Andryuk <jandryuk@gmail.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M hw/i386/xen/xen-hvm.c

  Log Message:
  -----------
  xen-hvm: Allow disabling buffer_io_timer

commit f37f29d31488 "xen: slightly simplify bufioreq handling" hard
coded setting req.count = 1 during initial field setup before the main
loop.  This missed a subtlety that an early exit from the loop when
there are no ioreqs to process, would have req.count == 0 for the return
value.  handle_buffered_io() would then remove state->buffered_io_timer.
Instead handle_buffered_iopage() is basically always returning true and
handle_buffered_io() always re-setting the timer.

Restore the disabling of the timer by introducing a new handled_ioreq
boolean and use as the return value.  The named variable will more
clearly show the intent of the code.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Message-Id: <20211210193434.75566-1-jandryuk@gmail.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>


  Commit: a021a2dd8b790437d27db95774969349632f856a
      
https://github.com/qemu/qemu/commit/a021a2dd8b790437d27db95774969349632f856a
  Author: Ross Lagerwall <ross.lagerwall@citrix.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M hw/i386/xen/xen-mapcache.c

  Log Message:
  -----------
  xen-mapcache: Avoid entry->lock overflow

In some cases, a particular mapcache entry may be mapped 256 times
causing the lock field to wrap to 0. For example, this may happen when
using emulated NVME and the guest submits a large scatter-gather write.
At this point, the entry map be remapped causing QEMU to write the wrong
data or crash (since remap is not atomic).

Avoid this overflow by increasing the lock field to a uint32_t and also
detect it and abort rather than continuing regardless.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Message-Id: <20220124104450.152481-1-ross.lagerwall@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>


  Commit: b367db48126d4ee14579af6cf5cdbffeb9496627
      
https://github.com/qemu/qemu/commit/b367db48126d4ee14579af6cf5cdbffeb9496627
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M hw/i386/xen/xen-hvm.c
    M hw/i386/xen/xen-mapcache.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20220127' into 
staging

Xen patches

- bug fixes for mapcache and ioreq handling

# gpg: Signature made Thu 27 Jan 2022 15:17:22 GMT
# gpg:                using RSA key F80C006308E22CFD8A92E7980CF5572FD7FB55AF
# gpg: Good signature from "Anthony PERARD <anthony.perard@gmail.com>" [unknown]
# gpg:                 aka "Anthony PERARD <anthony.perard@citrix.com>" 
[unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 5379 2F71 024C 600F 778A  7161 D8D5 7199 DF83 42C8
#      Subkey fingerprint: F80C 0063 08E2 2CFD 8A92  E798 0CF5 572F D7FB 55AF

* remotes/aperard/tags/pull-xen-20220127:
  xen-mapcache: Avoid entry->lock overflow
  xen-hvm: Allow disabling buffer_io_timer

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


Compare: https://github.com/qemu/qemu/compare/cfe63e46be0a...b367db48126d



reply via email to

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