qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 694ab9: hw/ufs: Update MCQ-related fields to


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 694ab9: hw/ufs: Update MCQ-related fields to block/ufs.h
Date: Tue, 28 May 2024 08:16:06 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 694ab9e84f20974fd764e672f2689afe93508772
      
https://github.com/qemu/qemu/commit/694ab9e84f20974fd764e672f2689afe93508772
  Author: Minwoo Im <minwoo.im@samsung.com>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M include/block/ufs.h

  Log Message:
  -----------
  hw/ufs: Update MCQ-related fields to block/ufs.h

This patch is a prep patch for the following MCQ support patch for
hw/ufs.  This patch updated minimal mandatory fields to support MCQ
based on UFSHCI 4.0.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Message-Id: <20240528023106.856777-2-minwoo.im@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>


  Commit: 71a82d3f0555e65c98df129ce0e38b2aa5681ec0
      
https://github.com/qemu/qemu/commit/71a82d3f0555e65c98df129ce0e38b2aa5681ec0
  Author: Minwoo Im <minwoo.im@samsung.com>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M hw/ufs/trace-events
    M hw/ufs/ufs.c
    M hw/ufs/ufs.h
    M include/block/ufs.h

  Log Message:
  -----------
  hw/ufs: Add support MCQ of UFSHCI 4.0

This patch adds support for MCQ defined in UFSHCI 4.0.  This patch
utilized the legacy I/O codes as much as possible to support MCQ.

MCQ operation & runtime register is placed at 0x1000 offset of UFSHCI
register statically with no spare space among four registers (48B):

        UfsMcqSqReg, UfsMcqSqIntReg, UfsMcqCqReg, UfsMcqCqIntReg

The maxinum number of queue is 32 as per spec, and the default
MAC(Multiple Active Commands) are 32 in the device.

Example:
        -device ufs,serial=foo,id=ufs0,mcq=true,mcq-maxq=8

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Message-Id: <20240528023106.856777-3-minwoo.im@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>


  Commit: 7d99ae59a20c4448732a3fb204e31915816048d6
      
https://github.com/qemu/qemu/commit/7d99ae59a20c4448732a3fb204e31915816048d6
  Author: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  blockcommit: Reopen base image as RO after abort

If a blockcommit is aborted the base image remains in RW mode, that leads
to a fail of subsequent live migration.

How to reproduce:
  $ virsh snapshot-create-as vm snp1 --disk-only

  *** write something to the disk inside the guest ***

  $ virsh blockcommit vm vda --active --shallow && virsh blockjob vm vda --abort
  $ lsof /vzt/vm.qcow2
  COMMAND      PID USER   FD   TYPE DEVICE   SIZE/OFF NODE NAME
  qemu-syst 433203 root   45u   REG  253,0 1724776448  133 /vzt/vm.qcow2
  $ cat /proc/433203/fdinfo/45
  pos:    0
  flags:  02140002 <==== The last 2 means RW mode

If the base image is in RW mode at the end of blockcommit and was in RO
mode before blockcommit, reopen the base BDS in RO.

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20240404091136.129811-1-alexander.ivanov@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 137b4d4bd506bd42c18718f3f8b43a2d7c3346a8
      
https://github.com/qemu/qemu/commit/137b4d4bd506bd42c18718f3f8b43a2d7c3346a8
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M block/copy-before-write.c

  Log Message:
  -----------
  block/copy-before-write: fix permission

In case when source node does not have any parents, the condition still
works as required: backup job do create the parent by

  block_job_create -> block_job_add_bdrv -> bdrv_root_attach_child

Still, in this case checking @perm variable doesn't work, as backup job
creates the root blk with empty permissions (as it rely on CBW filter
to require correct permissions and don't want to create extra
conflicts).

So, we should not check @perm.

The hack may be dropped entirely when transactional insertion of
filter (when we don't try to recalculate permissions in intermediate
state, when filter does conflict with original parent of the source
node) merged (old big series
"[PATCH v5 00/45] Transactional block-graph modifying API"[1] and it's
current in-flight part is "[PATCH v8 0/7] blockdev-replace"[2])

[1] https://patchew.org/QEMU/20220330212902.590099-1-vsementsov@openvz.org/
[2] https://patchew.org/QEMU/20231017184444.932733-1-vsementsov@yandex-team.ru/

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-2-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 507175197b06a24beb2369abe95b00172741c457
      
https://github.com/qemu/qemu/commit/507175197b06a24beb2369abe95b00172741c457
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M block/copy-before-write.c

  Log Message:
  -----------
  block/copy-before-write: support unligned snapshot-discard

First thing that crashes on unligned access here is
bdrv_reset_dirty_bitmap(). Correct way is to align-down the
snapshot-discard request.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-3-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 006e845b5a4cbb1f93a2e8ed22fa648b9d7e4182
      
https://github.com/qemu/qemu/commit/006e845b5a4cbb1f93a2e8ed22fa648b9d7e4182
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M block/block-copy.c
    M block/copy-before-write.c
    M include/block/block-copy.h
    M tests/qemu-iotests/257.out

  Log Message:
  -----------
  block/copy-before-write: create block_copy bitmap in filter node

Currently block_copy creates copy_bitmap in source node. But that is in
bad relation with .independent_close=true of copy-before-write filter:
source node may be detached and removed before .bdrv_close() handler
called, which should call block_copy_state_free(), which in turn should
remove copy_bitmap.

That's all not ideal: it would be better if internal bitmap of
block-copy object is not attached to any node. But that is not possible
now.

The simplest solution is just create copy_bitmap in filter node, where
anyway two other bitmaps are created.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-4-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 0fd05c8d807dc7cd25b2f9bf32dd4135c94acb7a
      
https://github.com/qemu/qemu/commit/0fd05c8d807dc7cd25b2f9bf32dd4135c94acb7a
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M block/backup.c
    M block/block-copy.c
    M block/copy-before-write.c
    M block/copy-before-write.h
    M block/replication.c
    M blockdev.c
    M include/block/block-common.h
    M include/block/block-copy.h
    M include/block/block_int-global-state.h
    M qapi/block-core.json

  Log Message:
  -----------
  qapi: blockdev-backup: add discard-source parameter

Add a parameter that enables discard-after-copy. That is mostly useful
in "push backup with fleecing" scheme, when source is snapshot-access
format driver node, based on copy-before-write filter snapshot-access
API:

[guest]      [snapshot-access] ~~ blockdev-backup ~~> [backup target]
   |            |
   | root       | file
   v            v
[copy-before-write]
   |             |
   | file        | target
   v             v
[active disk]   [temp.img]

In this case discard-after-copy does two things:

 - discard data in temp.img to save disk space
 - avoid further copy-before-write operation in discarded area

Note that we have to declare WRITE permission on source in
copy-before-write filter, for discard to work. Still we can't take it
unconditionally, as it will break normal backup from RO source. So, we
have to add a parameter and pass it thorough bdrv_open flags.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20240313152822.626493-5-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 3a2242bf99a246e8199f8aa29bd8832c80b847bd
      
https://github.com/qemu/qemu/commit/3a2242bf99a246e8199f8aa29bd8832c80b847bd
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    A tests/qemu-iotests/tests/backup-discard-source
    A tests/qemu-iotests/tests/backup-discard-source.out

  Log Message:
  -----------
  iotests: add backup-discard-source

Add test for a new backup option: discard-source.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240313152822.626493-6-vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: a149401048481247bcbaf6035a7a1308974fb464
      
https://github.com/qemu/qemu/commit/a149401048481247bcbaf6035a7a1308974fb464
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M tests/qemu-iotests/pylintrc

  Log Message:
  -----------
  iotests/pylintrc: allow up to 10 similar lines

We want to have similar QMP objects in different tests. Reworking these
objects to make common parts by calling some helper functions doesn't
seem good. It's a lot more comfortable to see the whole QAPI request in
one place.

So, let's increase the limit, to unblock further commit
"iotests: add backup-discard-source"

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 138778089675dd01a0973bc58480ea996ec2614b
      
https://github.com/qemu/qemu/commit/138778089675dd01a0973bc58480ea996ec2614b
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M hw/ufs/trace-events
    M hw/ufs/ufs.c
    M hw/ufs/ufs.h
    M include/block/ufs.h

  Log Message:
  -----------
  Merge tag 'pull-ufs-20240528' of https://gitlab.com/jeuk20.kim/qemu into 
staging

Add support MCQ of UFSHCI 4.0

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEUBfYMVl8eKPZB+73EuIgTA5dtgIFAmZVc78ACgkQEuIgTA5d
# tgIuABAAiKr60DXgXRxhTG0VybhbXMvHI208wY3L0NBhBILCxnYDotecKlRGq0xS
# LqLg8WODJSTtfwMhhjlC3Z98c0fQ/aZogTfIjYa0R12X6tERC2G21bue4zkA6ZWk
# a1qpqLeEtR5Km0B38QtmCIXhFW6/ZAOAs5TDKbSDFWZbHqepOM4EGPbSOTQyhXsZ
# wRAq0k54x63aauQsHbwwAoScp9IcxKBf+iTxUPZRImFtwKKDFPk5mn4naA20MxxR
# X1S6zGpoB4smzwTSDlw91krrhI6Vob0V0NxO/d85Dx6PO+GQIGkgMMtZ6T9E68sj
# HUEWFFvE6Vrj/sVTacyWf/yCLdPNdRLpp5TVtiYYZHHh+79nNlWt0wJDQDcBhTDH
# gWV7vzOJzCdd5GzVQhNhWhR1vnnL1t8YH9gPTt1+L2OScmLuMg88RRE5D7+hxj8h
# BMXG6JRHplOEXWSCj9Ec4XwGkZ6E/u+Emrl/DpHYVzL7ENEM16s+JDOQnxj7VXmt
# 9EJOI3/gJdcgE4A7uhkKuwq8r0k4KRuy+IyBUrM4IOQKWsqsK4nLkHmahKrWZL55
# zAEMQVpSlel0vYIji6dtZcVcIYTyLLglUiH4/lO0gJph4nsav/ZyLWGgiyqULiJB
# vGo9YjIQ2VFR8oaNfLbKeJUP3uw5g6H6YJDUJDdPiF0/IRxlQjQ=
# =sst0
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 27 May 2024 11:03:43 PM PDT
# gpg:                using RSA key 5017D831597C78A3D907EEF712E2204C0E5DB602
# gpg: Good signature from "Jeuk Kim <jeuk20.kim@samsung.com>" [unknown]
# gpg:                 aka "Jeuk Kim <jeuk20.kim@gmail.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: 5017 D831 597C 78A3 D907  EEF7 12E2 204C 0E5D B602

* tag 'pull-ufs-20240528' of https://gitlab.com/jeuk20.kim/qemu:
  hw/ufs: Add support MCQ of UFSHCI 4.0
  hw/ufs: Update MCQ-related fields to block/ufs.h

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: d87a9e8167356893c9efe4e747407d997adf3b54
      
https://github.com/qemu/qemu/commit/d87a9e8167356893c9efe4e747407d997adf3b54
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M block/backup.c
    M block/block-copy.c
    M block/copy-before-write.c
    M block/copy-before-write.h
    M block/mirror.c
    M block/replication.c
    M blockdev.c
    M include/block/block-common.h
    M include/block/block-copy.h
    M include/block/block_int-global-state.h
    M qapi/block-core.json
    M tests/qemu-iotests/257.out
    M tests/qemu-iotests/pylintrc
    A tests/qemu-iotests/tests/backup-discard-source
    A tests/qemu-iotests/tests/backup-discard-source.out

  Log Message:
  -----------
  Merge tag 'pull-block-jobs-2024-04-29-v2' of 
https://gitlab.com/vsementsov/qemu into staging

Block jobs patches for 2024-04-29

v2: add "iotests/pylintrc: allow up to 10 similar lines" to fix
    check-python-minreqs

- backup: discard-source parameter
- blockcommit: Reopen base image as RO after abort

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEi5wmzbL9FHyIDoahVh8kwfGfefsFAmZV4UwACgkQVh8kwfGf
# eftBIA/9Em1xR7yEK5gE9kiGc+qSBsRPB8sJZ/JB+GukDPvzQ+/CktIJJgTryI/q
# QC08KyHnuE6WknUfJPkV5kfINj8vTDtkMjwgccrMu8enc9W5wnRfVBQomS8qWpZY
# maJhyW+Sva7k82v/U1mpdur5cTF1cu8VmwMSNurBYVd84E33KHkgQikEbXSLzFBu
# N8dG4WOgtwuLmP5BMgg5ftzwC3W7qv+sq1DhnZwDATUKVbjX1lLtKAYwu66bH8du
# ekZtWqtJNJqRTcOIiSyl52lPm3xo9+U8khXWQ/lmq1jjvdKcC90y76bT16yIQw98
# 74aBiKSRu2MO/EraEgPQKU2LpSzbzr4Eu1kRjmDXcVDAB183vaFW3Ogym8BuGJ9n
# ZiNFYLZqOqUL4RkyaXEwci6THEyjHqQvK2HYGmjoidZPvATf5G52FWrKZT3S9LVT
# Q4oUhb6dQW4EtU4WoVJpqSg7xozVI/swJ04+gLTjQskitXQm2jX8ifD6MI+85tVp
# nntS5BtMfTe/z5K4L7bv8KOe7J+gK0NUo3YCdw3zQKa+u7tX/QQKnPmNtUK8ohjO
# g6wIuwrxn/GsHxvXaeOKftHyXBGDHYUSuIr7ByQ/WxS9nQaWW1UKk9WFC/XtUFND
# bHMfL+DidkUxMnZBe7Snz6gb16oEr0DsrsSyHe/J2dWrid6QJVA=
# =aSvT
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 28 May 2024 06:51:08 AM PDT
# gpg:                using RSA key 8B9C26CDB2FD147C880E86A1561F24C1F19F79FB
# gpg: Good signature from "Vladimir Sementsov-Ogievskiy 
<vsementsov@yandex-team.ru>" [unknown]
# gpg:                 aka "Vladimir Sementsov-Ogievskiy 
<vsementsov@virtuozzo.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: 8B9C 26CD B2FD 147C 880E  86A1 561F 24C1 F19F 79FB

* tag 'pull-block-jobs-2024-04-29-v2' of https://gitlab.com/vsementsov/qemu:
  iotests/pylintrc: allow up to 10 similar lines
  iotests: add backup-discard-source
  qapi: blockdev-backup: add discard-source parameter
  block/copy-before-write: create block_copy bitmap in filter node
  block/copy-before-write: support unligned snapshot-discard
  block/copy-before-write: fix permission
  blockcommit: Reopen base image as RO after abort

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/34f79c354352...d87a9e816735

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

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