[PATCH v1 7/7] migration: Support responsive CPU throttle

2024-09-15 Thread Hyman Huang
ce degradation. In conclusion, this refinement significantly reduces the processing time required for the throttle percentage step to its maximum while the VM is under a high memory load. Signed-off-by: Hyman Huang --- migration/ram.c | 55 ++-- migratio

[PATCH v1 3/7] qapi/migration: Introduce the iteration-count

2024-09-15 Thread Hyman Huang
The original migration information dirty-sync-count could no longer reflect iteration count due to the introduction of background synchronization in the next commit; add the iteration count to compensate. Signed-off-by: Hyman Huang --- migration/migration-stats.h | 4 migration

[PATCH v1 6/7] qapi/migration: Introduce cpu-responsive-throttle parameter

2024-09-15 Thread Hyman Huang
To enable the responsive throttle that will be implemented in the next commit, introduce the cpu-responsive-throttle parameter. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 8 migration/options.c| 20 migration/options.h

[PATCH v1 0/7] migration: auto-converge refinements for huge VM

2024-09-15 Thread Hyman Huang
ve optimization is there, but the performance degradation occurs more quickly. Since it is inconvenient to display the graphic data, one can independently verify it. Please review, any comments and advice are appreciated. Thanks, Yong Hyman Huang (7): migration: Introduce structs for backgrou

[PATCH v1 4/7] migration: Implment background sync watcher

2024-09-15 Thread Hyman Huang
The background sync watcher is used to detect that if the iteration lasts a long time, if so, trigger the background sync. Signed-off-by: Hyman Huang --- migration/ram.c| 110 + migration/ram.h| 3 ++ migration/trace-events | 3 ++ 3

[PATCH v1 2/7] migration: Refine util functions to support background sync

2024-09-15 Thread Hyman Huang
Supply the migration_bitmap_sync function along with the background argument. Introduce the sync_mode global variable to track the sync mode and support background sync while keeping backward compatibility. Signed-off-by: Hyman Huang --- include/exec/ram_addr.h | 107

[PATCH v1 5/7] migration: Support background dirty bitmap sync and throttle

2024-09-15 Thread Hyman Huang
to fix the above issue by synchronizing the remote dirty bitmap and triggering the throttle once detect that iteration lasts a long time. This is a trade-off between synchronization overhead and CPU throttle impact. Signed-off-by: Hyman Huang --- migration/migration.c| 12 +++ t

[PATCH v1 1/7] migration: Introduce structs for background sync

2024-09-15 Thread Hyman Huang
shadow_bmap, iter_bmap and iter_dirty_pages are introduced to satisfy the need for background sync. Meanwhile, introduce enumeration of sync method. Signed-off-by: Hyman Huang --- include/exec/ramblock.h | 45 + migration/ram.c | 6 ++ 2

[PATCH RESEND RFC 04/10] qapi/migration: Introduce the iteration-count

2024-09-09 Thread Hyman Huang
The original migration information dirty-sync-count could no longer reflect iteration count due to the introduction of periodic synchronization in the next commit; add the iteration count to compensate. Signed-off-by: Hyman Huang --- migration/migration-stats.h | 4 migration/migration.c

[PATCH RESEND RFC 10/10] tests/migration-tests: Add test case for responsive CPU throttle

2024-09-09 Thread Hyman Huang
Despite the fact that the responsive CPU throttle is enabled, the dirty sync count may not always increase because this is an optimization that might not happen in any situation. This test case just making sure it doesn't interfere with any current functionality. Signed-off-by: Hyman

[PATCH RESEND RFC 08/10] migration: Introduce cpu-responsive-throttle parameter

2024-09-09 Thread Hyman Huang
To enable the responsive throttle that will be implemented in the next commit, introduce the cpu-responsive-throttle parameter. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 8 migration/options.c| 20 migration/options.h

[PATCH RESEND RFC 01/10] migration: Introduce structs for periodic CPU throttle

2024-09-09 Thread Hyman Huang
shadow_bmap, iter_bmap, iter_dirty_pages and periodic_sync_shown_up are introduced to satisfy the need for periodic CPU throttle. Meanwhile, introduce enumeration of dirty bitmap sync method. Signed-off-by: Hyman Huang --- include/exec/ramblock.h | 45

[PATCH RESEND RFC 05/10] migration: Introduce util functions for periodic CPU throttle

2024-09-09 Thread Hyman Huang
Provide useful utilities to manage the periodic_throttle_thread's lifespan. Additionally, to set up sync mode, provide periodic_throttle_setup. Signed-off-by: Hyman Huang --- migration/ram.c| 98 +- migration/ram.h| 4 ++ migration/

[PATCH RESEND RFC 09/10] migration: Support responsive CPU throttle

2024-09-09 Thread Hyman Huang
ce degradation. In conclusion, this refinement significantly reduces the processing time required for the throttle percentage step to its maximum while the VM is under a high memory load. Signed-off-by: Hyman Huang --- migration/ram.c | 55 ++-- migratio

[PATCH RESEND RFC 03/10] qapi/migration: Introduce periodic CPU throttling parameters

2024-09-09 Thread Hyman Huang
To activate the periodic CPU throttleing feature, introduce the cpu-periodic-throttle. To control the frequency of throttling, introduce the cpu-periodic-throttle-interval. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 17 +++ migration/options.c| 54

[PATCH RESEND RFC 02/10] migration: Refine util functions to support periodic CPU throttle

2024-09-09 Thread Hyman Huang
Supply the migration_bitmap_sync function along with a periodic argument. Introduce the sync_mode global variable to track the sync mode and support periodic throttling while keeping backward compatibility. Signed-off-by: Hyman Huang --- include/exec/ram_addr.h | 107

[PATCH RESEND RFC 06/10] migration: Support periodic CPU throttle

2024-09-09 Thread Hyman Huang
the above issue by synchronizing the remote dirty bitmap and triggering the throttle periodically. This is a trade-off between synchronization overhead and CPU throttle impact. Signed-off-by: Hyman Huang --- migration/migration.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[PATCH RESEND RFC 07/10] tests/migration-tests: Add test case for periodic throttle

2024-09-09 Thread Hyman Huang
To make sure periodic throttle feature doesn't regression any features and functionalities, enable this feature in the auto-converge migration test. Signed-off-by: Hyman Huang --- tests/qtest/migration-test.c | 56 +++- 1 file changed, 55 insertions(

[PATCH RESEND RFC 00/10] migration: auto-converge refinements for huge VM

2024-09-09 Thread Hyman Huang
cy and hence accelerate the throttle's invocation. The RFC version of the refinement may be a rudimentary implementation, I would appreciate hearing more feedback. Yong, thanks. Hyman Huang (10): migration: Introduce structs for periodic CPU throttle migration: Refine util functio

[PATCH RFC 10/10] tests/migration-tests: Add test case for responsive CPU throttle

2024-09-09 Thread Hyman Huang
Despite the fact that the responsive CPU throttle is enabled, the dirty sync count may not always increase because this is an optimization that might not happen in any situation. This test case just making sure it doesn't interfere with any current functionality. Signed-off-by: Hyman

[PATCH RFC 06/10] migration: Support periodic CPU throttle

2024-09-09 Thread Hyman Huang
the above issue by synchronizing the remote dirty bitmap and triggering the throttle periodically. This is a trade-off between synchronization overhead and CPU throttle impact. Signed-off-by: Hyman Huang --- migration/migration.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[PATCH RFC 03/10] qapi/migration: Introduce periodic CPU throttling parameters

2024-09-09 Thread Hyman Huang
To activate the periodic CPU throttleing feature, introduce the cpu-periodic-throttle. To control the frequency of throttling, introduce the cpu-periodic-throttle-interval. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 17 +++ migration/options.c| 54

[PATCH RFC 07/10] tests/migration-tests: Add test case for periodic throttle

2024-09-09 Thread Hyman Huang
To make sure periodic throttle feature doesn't regression any features and functionalities, enable this feature in the auto-converge migration test. Signed-off-by: Hyman Huang --- tests/qtest/migration-test.c | 56 +++- 1 file changed, 55 insertions(

[PATCH RFC 02/10] migration: Refine util functions to support periodic CPU throttle

2024-09-09 Thread Hyman Huang
Supply the migration_bitmap_sync function along with a periodic argument. Introduce the sync_mode global variable to track the sync mode and support periodic throttling while keeping backward compatibility. Signed-off-by: Hyman Huang --- include/exec/ram_addr.h | 117

[PATCH RFC 01/10] migration: Introduce structs for periodic CPU throttle

2024-09-09 Thread Hyman Huang
shadow_bmap, iter_bmap, iter_dirty_pages and periodic_sync_shown_up are introduced to satisfy the need for periodic CPU throttle. Meanwhile, introduce enumeration of dirty bitmap sync method. Signed-off-by: Hyman Huang --- include/exec/ramblock.h | 45

[PATCH RFC 00/10] migration: auto-converge refinements for huge VM

2024-09-09 Thread Hyman Huang
cy and hence accelerate the throttle's invocation. The RFC version of the refinement may be a rudimentary implementation, I would appreciate hearing more feedback. Yong, thanks. Hyman Huang (10): migration: Introduce structs for periodic CPU throttle migration: Refine util functio

[PATCH RFC 09/10] migration: Support responsive CPU throttle

2024-09-09 Thread Hyman Huang
ce degradation. In conclusion, this refinement significantly reduces the processing time required for the throttle percentage step to its maximum while the VM is under a high memory load. Signed-off-by: Hyman Huang --- migration/ram.c | 55 ++-- migratio

[PATCH RFC 08/10] migration: Introduce cpu-responsive-throttle parameter

2024-09-09 Thread Hyman Huang
To enable the responsive throttle that will be implemented in the next commit, introduce the cpu-responsive-throttle parameter. Signed-off-by: Hyman Huang --- migration/migration-hmp-cmds.c | 8 migration/options.c| 20 migration/options.h

[PATCH RFC 04/10] qapi/migration: Introduce the iteration-count

2024-09-09 Thread Hyman Huang
The original migration information dirty-sync-count could no longer reflect iteration count due to the introduction of periodic synchronization in the next commit; add the iteration count to compensate. Signed-off-by: Hyman Huang --- migration/migration-stats.h | 4 migration/migration.c

[PATCH RFC 05/10] migration: Introduce util functions for periodic CPU throttle

2024-09-09 Thread Hyman Huang
Provide useful utilities to manage the periodic_throttle_thread's lifespan. Additionally, to set up sync mode, provide periodic_throttle_setup. Signed-off-by: Hyman Huang --- migration/ram.c| 98 +- migration/ram.h| 4 ++ migration/

Re: [PATCH v1 1/5] tests/migration: Move the guestperf tool to scripts directory

2024-08-09 Thread Hyman Huang
在 2024/8/9 20:57, Fabiano Rosas 写道: yong.hu...@smartx.com writes: From: Hyman Huang Guestperf was designed to test the performance of migration, with a loose connection to the fundamental test cases of QEMU. To improve the repository's structure, move it to the scripts directory. S

[PATCH] migration: Refine the convergence detection

2024-07-24 Thread Hyman Huang
egative optimization does not appear, and morover, the throttle algorithm seems to become more responsive to dirty rate increases due to the refined detection. Signed-off-by: Hyman Huang --- migration/ram.c| 48 +++--- migration/trace-events | 1 + 2 file

[PATCH v1 0/1] Fix the overrun check of the receive ring buffer

2024-07-08 Thread Hyman Huang
This patch is based on the previouse version: https://patchew.org/QEMU/c7338afab65df208772f215567f323ae9b3c5910.1720210988.git.yong.hu...@smartx.com/ Some code clean was made in this patch. Please review. Thanks Hyman Huang (1): e1000: Fix the overrun check of the receive ring buffer hw

[PATCH v1 1/1] e1000: Fix the overrun check of the receive ring buffer

2024-07-08 Thread Hyman Huang
t to consume the receive ring. While, guest have nothing to consume on the receive ring and never update the RDT location, this makes the network down. To get around this issue, just mark the overrun if RDH equals RDT at the end of placing the packet on the ring buffer for the producer. This reve

[PATCH] e1000: Fix the unexpected assumption that the receive buffer is full

2024-07-05 Thread Hyman Huang
uest have nothing to consume on the receive ring and never update the RDT location, this makes the network down. To get around this issue, just mark the overrun if RDH equals RDT at the end of placing the packet on the ring buffer for the producer. Signed-off-by: Hyman Huang --- hw/net/e1000.

[PULL 0/1] Dirty page rate and dirty page limit 20240617 patches

2024-06-17 Thread Hyman Huang
The following changes since commit 05ad1440b8428b0ade9b8e5c01469adb8fbf83e3: Merge tag 'virtio-grants-v8-tag' of https://gitlab.com/sstabellini/qemu into staging (2024-06-15 20:13:06 -0700) are available in the Git repository at: https://github.com/newfriday/qemu.git tags/dirtylimit-dirtyr

[PULL 1/1] migration/dirtyrate: Fix segmentation fault

2024-06-17 Thread Hyman Huang
1-1-...@sfc.wide.ad.jp> [Assert kvm_state when kvm_dirty_ring_enabled was called to fix it. - Hyman] Signed-off-by: Hyman Huang --- accel/kvm/kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 009b49de44..854cb86b22 100644

[PATCH 0/2] migrate inflight emulated SCSI request for the scsi disk device

2024-05-23 Thread Hyman Huang
ated SCSI request be migrated during live migration, similar to the DMA SCSI request. Hyman Huang (2): scsi-disk: Introduce the migrate_emulate_scsi_request field scsi-disk: Fix crash for VM configured with USB CDROM after live migration hw/scsi/scsi-disk.c | 35 +++

[PATCH 1/2] scsi-disk: Introduce the migrate_emulate_scsi_request field

2024-05-23 Thread Hyman Huang
a CDROM during live migration. Signed-off-by: Hyman Huang Message-Id: <2da3a08785453478079cfd46d8293ee68d284391.1712577715.git.yong.hu...@smartx.com> --- hw/scsi/scsi-disk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scs

[PATCH 2/2] scsi-disk: Fix crash for VM configured with USB CDROM after live migration

2024-05-23 Thread Hyman Huang
emulated SCSI request be migrated during live migration, similar to the DMA SCSI request. Signed-off-by: Hyman Huang --- hw/scsi/scsi-disk.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 0985676f73..d6

[PATCH RESEND 1/2] scsi-disk: Introduce the migrate_emulate_scsi_request field

2024-04-08 Thread Hyman Huang
a CDROM during live migration. Signed-off-by: Hyman Huang --- hw/scsi/scsi-disk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 4bd7af9d0c..0985676f73 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c

[PATCH RESEND 0/2] Fix crash of VMs configured with the CDROM device

2024-04-08 Thread Hyman Huang
Hyman Huang (2): scsi-disk: Introduce the migrate_emulate_scsi_request field scsi-disk: Fix crash of VMs configured with the CDROM device hw/scsi/scsi-disk.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) -- 2.39.3

[PATCH RESEND 2/2] scsi-disk: Fix crash of VMs configured with the CDROM device

2024-04-08 Thread Hyman Huang
ndef -> setup usb_msd_data_in 8/8 (scsi 8) shutting down, reason=crashed To summarize, the missing scsi request during a live migration may cause a VM configured with a CDROM to crash. Migrating the SCSI request that the scsi-disk is handling is the simple approach, assuming that it actually ex

[PATCH 1/2] scsi-disk: Introduce the migrate_emulate_scsi_request field

2024-04-03 Thread Hyman Huang
a CDROM during live migration. Signed-off-by: Hyman Huang --- hw/scsi/scsi-disk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 4bd7af9d0c..0985676f73 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c

[PATCH 2/2] scsi-disk: Fix the migration crash of the CDROM device with USB bus

2024-04-03 Thread Hyman Huang
ndef -> setup usb_msd_data_in 8/8 (scsi 8) shutting down, reason=crashed To summarize, the missing scsi request during a live migration may cause a VM configured with a CDROM to crash. Migrating the SCSI request that the scsi-disk is handling is the simple approach, assuming that it actually ex

[PATCH RFC 0/3] Support GM/T 0018-2012 cryptographic standard

2024-02-24 Thread Hyman Huang
ll, we uploaded this series with the intention of receiving feedback, as the title suggests. We would welcome any suggestions and feedback regarding this feature. Hyman Huang (3): crypto: Introduce GM/T 0018-2012 cryptographic driver meson.build: Support GM/T 0018-2012 cryptographic standard

[PATCH RFC 1/3] crypto: Introduce GM/T 0018-2012 cryptographic driver

2024-02-24 Thread Hyman Huang
https://github.com/guanzhi/GM-Standards/blob/master/GMT密码行标/ GMT%200018-2012%20密码设备应用接口规范.pdf" This patch implement the basic functions of GM/T 0018-2012 standard. Currently, for block encryption, it support SM4 cipher algorithm only. Signed-off-by: Hyman Huang --- MAINTAINERS | 3

[PATCH RFC 3/3] crypto: Allow GM/T 0018-2012 to support SM4 cipher algorithm

2024-02-24 Thread Hyman Huang
Since GM/T 0018-2012 was probed by SM4 cipher algorithm, allow it to support SM4 cipher algorithm in block encryption. Signed-off-by: Hyman Huang --- crypto/block-luks.c | 4 ++-- crypto/cipher.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/block-luks.c b

[PATCH RFC 2/3] meson.build: Support GM/T 0018-2012 cryptographic standard

2024-02-24 Thread Hyman Huang
API and enable the feature if crypto-gmt is given explictly. This feature defaults to disabled. Signed-off-by: Hyman Huang --- crypto/meson.build| 3 +++ meson.build | 30 ++ meson_options.txt | 2 ++ scripts/meson

[PATCH v4 1/3] qmp: Switch x-query-virtio-status back to numeric encoding

2024-02-21 Thread Hyman Huang
ible change; acceptable because x-query-virtio-status comes without a stability promise. Signed-off-by: Hyman Huang Acked-by: Markus Armbruster --- hw/virtio/virtio-hmp-cmds.c | 25 +++-- hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json| 192 ---

[PATCH v4 2/3] virtio: Declare the decoding functions to static

2024-02-21 Thread Hyman Huang
qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() are now only used in virtio-hmp-cmds.c. So move them into there, redeclare them to static, and replace the qmp_ prefix with hmp_. Signed-off-by: Hyman Huang --- hw/virtio/meson.build | 4 +- hw/virtio/virtio-hmp

[PATCH v4 3/3] qapi: Define VhostDeviceProtocols and VirtioDeviceFeatures as plain C types

2024-02-21 Thread Hyman Huang
VhostDeviceProtocols and VirtioDeviceFeatures are only used in virtio-hmp-cmds.c. So define them as plain C types there, and drop them from the QAPI schema. Signed-off-by: Hyman Huang Reviewed-by: Markus Armbruster --- hw/virtio/virtio-hmp-cmds.c | 16 +++ qapi/virtio.json

[PATCH v4 0/3] Adjust the output of x-query-virtio-status

2024-02-21 Thread Hyman Huang
the HMP output, display the human-readable information and drop the unknown bits in practice. 3. For the QMP output, remove the descriptive strings and only display bits encoded as numbers. Hyman Huang (3): qmp: Switch x-query-virtio-status back to numeric encoding virtio: Declare the

[PATCH] qapi: Craft the BlockdevCreateOptionsLUKS comment

2024-02-20 Thread Hyman Huang
Add comment in detail for commit 433957bb7f (qapi: Make parameter 'file' optional for BlockdevCreateOptionsLUKS). Signed-off-by: Hyman Huang --- qapi/block-core.json | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/

[PATCH] docs/devel: Add introduction to LUKS volume with detached header

2024-02-19 Thread Hyman Huang
Signed-off-by: Hyman Huang --- MAINTAINERS | 1 + docs/devel/luks-detached-header.rst | 182 2 files changed, 183 insertions(+) create mode 100644 docs/devel/luks-detached-header.rst diff --git a/MAINTAINERS b/MAINTAINERS index a24c2b51b6

[PATCH v3 2/3] virtio: Declare the decoding functions to static

2024-02-02 Thread Hyman Huang
qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() are now only used in virtio-hmp-cmds.c. So move them into there, redeclare them to static, and replace the qmp_ prefix with hmp_. Signed-off-by: Hyman Huang --- hw/virtio/meson.build | 3 +- hw/virtio/virtio-hmp

[PATCH v3 1/3] qmp: Switch x-query-virtio-status back to numeric encoding

2024-02-02 Thread Hyman Huang
change; acceptable because x-query-virtio-status does comes without a stability promise. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 25 +++-- hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json| 192 3 files changed, 45 ins

[PATCH v3 3/3] qapi: Define VhostDeviceProtocols and VirtioDeviceFeatures as plain C types

2024-02-02 Thread Hyman Huang
VhostDeviceProtocols and VirtioDeviceFeatures are only used in virtio-hmp-cmds.c. So define them as plain C types there, and drop them from the QAPI schema. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 16 +++ qapi/virtio.json| 39

[PATCH v3 0/3] Adjust the output of x-query-virtio-status

2024-02-02 Thread Hyman Huang
output just in HMP. 2. For the HMP output, display the human-readable information and drop the unknown bits in practice. 3. For the QMP output, remove the descriptive strings and only display bits encoded as numbers. Hyman Huang (3): qmp: Switch x-query-virtio-status back to numeric

[PATCH v2 1/2] i386/sev: Sort the error message

2024-01-07 Thread Hyman Huang
he command line is invalid Signed-off-by: Hyman Huang --- target/i386/sev.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 9a71246682..96eff73001 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -923,7 +92

[PATCH v2 0/2] Nitpick at the error message's output

2024-01-07 Thread Hyman Huang
v2: - rebase on master - add a commit to sort the error message so that an explanation error number can be returned on all failure paths Hyman Huang (2): i386/sev: Sort the error message i386/sev: Nitpick at the error message's output target/i386/sev.c | 10 +++--- 1 file chang

[PATCH v2 2/2] i386/sev: Nitpick at the error message's output

2024-01-07 Thread Hyman Huang
irectly on the failure path. Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrangé Message-Id: --- target/i386/sev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 96eff73001..3fef8cf163 100644 --- a/target/i386/sev.c +++ b/t

[PATCH] i386/sev: Nitpick at the error message's output

2024-01-05 Thread Hyman Huang
irectly on the failure path. Signed-off-by: Hyman Huang --- target/i386/sev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index 9a71246682..4a69ca457c 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -1019,7 +1019,7 @@ int se

[PATCH v2 1/2] qapi/virtio: Keep feature and status bits in the QMP output

2024-01-04 Thread Hyman Huang
y, without the need for additional feature encoding. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 29 -- hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json| 192 3 files changed, 48 insertions(+), 196 deletions(-) diff

[PATCH v2 2/2] hmp: Drop unknown feature and status bits

2024-01-04 Thread Hyman Huang
The QMP command "x-query-virtio-status" outputs the full feature and status bit information, so there is no need to maintain it in the HMP output; drop it. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 13 - 1 file changed, 13 deletions(-) diff --git a

[PATCH v2 0/2] Adjust the output of x-query-virtio-status

2024-01-04 Thread Hyman Huang
descriptive strings and only display bits encoded as numbers. Hyman Huang (2): qapi/virtio: Keep feature and status bits in the QMP output hmp: Drop unknown feature and status bits hw/virtio/virtio-hmp-cmds.c | 42 hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json

[PATCH 2/2] hmp: Drop unknown feature and status bits

2023-12-28 Thread Hyman Huang
The QMP command "x-query-virtio-status" outputs the full feature and status bit information, so there is no need to maintain it in the HMP output; drop it. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 13 - 1 file changed, 13 deletions(-) diff --git a

[PATCH 0/2] Adjust the output of x-query-virtio-status

2023-12-28 Thread Hyman Huang
HMP. 2. For the HMP output, display the human-readable information and drop the unknown bits in practice. 3. For the QMP output, remove the descriptive strings and only display bits encoded as numbers. Please review, thanks, Yong Hyman Huang (2): qapi/virtio: Keep feature and status bits

[PATCH 1/2] qapi/virtio: Keep feature and status bits in the QMP output

2023-12-28 Thread Hyman Huang
y, without the need for additional feature encoding. Signed-off-by: Hyman Huang --- hw/virtio/virtio-hmp-cmds.c | 25 +++-- hw/virtio/virtio-qmp.c | 23 ++--- qapi/virtio.json| 192 3 files changed, 45 insertions(+), 195 deletions(-) diff

[PULL 1/1] migration/dirtyrate: Remove an extra parameter

2023-12-25 Thread Hyman Huang
From: Wafer vcpu_dirty_stat_collect() has an unused parameter so remove it. Signed-off-by: Wafer Reviewed-by: Hyman Huang Message-Id: <20231204012230.4123-1-wa...@jaguarmicro.com> --- migration/dirtyrate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mig

[PULL 0/1] Dirty page rate and dirty page limit 20231225 patch

2023-12-25 Thread Hyman Huang
The following changes since commit 191710c221f65b1542f6ea7fa4d30dde6e134fd7: Merge tag 'pull-request-2023-12-20' of https://gitlab.com/thuth/qemu into staging (2023-12-20 09:40:16 -0500) are available in the Git repository at: https://github.com/newfriday/qemu.git tags/dirtylimit-dirtyrate

[PATCH RESEND v3 00/10] Support generic Luks encryption

2023-12-24 Thread Hyman Huang
ments":{"node-name":"libvirt-2-format", "driver":"luks", > "file":"libvirt-1-format", "header":"libvirt-2-storage", > "key-secret":"libvirt-2-format-secret0"}}' 6. add the virt

[PATCH RESEND v3 04/10] crypto: Introduce creation option and structure for detached LUKS header

2023-12-24 Thread Hyman Huang
Introduce 'header' field in BlockdevCreateOptionsLUKS to support detached LUKS header creation. Meanwhile, introduce header-related field in QCryptoBlock. Signed-off-by: Hyman Huang --- crypto/blockpriv.h | 3 +++ qapi/block-core.json | 3 +++ qapi/crypto.json | 5 - 3 fil

[PATCH RESEND v3 10/10] MAINTAINERS: Add section "Detached LUKS header"

2023-12-24 Thread Hyman Huang
I've built interests in block cryptography and also have been working on projects related to this subsystem. Add a section to the MAINTAINERS file for detached LUKS header, it only has a test case in it currently. Signed-off-by: Hyman Huang --- MAINTAINERS | 5 + 1 file chang

[PATCH RESEND v3 05/10] crypto: Mark the payload_offset_sector invalid for detached LUKS header

2023-12-24 Thread Hyman Huang
Set the payload_offset_sector to a value that is nearly never reached in order to mark it as invalid and indicate that 0 should be the offset of the read/write operation on the 'file' protocol blockdev node. Signed-off-by: Hyman Huang --- crypto/block-l

[PATCH RESEND v3 09/10] tests: Add detached LUKS header case

2023-12-24 Thread Hyman Huang
Signed-off-by: Hyman Huang --- tests/qemu-iotests/tests/luks-detached-header | 214 ++ .../tests/luks-detached-header.out| 5 + 2 files changed, 219 insertions(+) create mode 100755 tests/qemu-iotests/tests/luks-detached-header create mode 100644 tests/qemu

[PATCH RESEND v3 01/10] crypto: Introduce option and structure for detached LUKS header

2023-12-24 Thread Hyman Huang
Add the "header" option for the LUKS format. This field would be used to identify the blockdev's position where a detachable LUKS header is stored. In addition, introduce header field in struct BlockCrypto Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berra

[PATCH RESEND v3 08/10] crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS

2023-12-24 Thread Hyman Huang
When querying the LUKS disk with the qemu-img tool or other APIs, add information about whether the LUKS header is detached. Additionally, update the test case with the appropriate modification. Signed-off-by: Hyman Huang --- crypto/block-luks.c| 2 ++ qapi/crypto.json | 3

[PATCH RESEND v3 03/10] qapi: Make parameter 'file' optional for BlockdevCreateOptionsLUKS

2023-12-24 Thread Hyman Huang
To support detached LUKS header creation, make the existing 'file' filed in BlockdevCreateOptionsLUKS optional, while also adding an extra optional 'header' field in the next commit. Signed-off-by: Hyman Huang --- block/crypto.c | 21 ++--- qapi/

[PATCH RESEND v3 06/10] block: Support detached LUKS header creation using blockdev-create

2023-12-24 Thread Hyman Huang
add protocol blockdev node for payload $ virsh qemu-monitor-command vm '{"execute":"blockdev-add", > "arguments": {"driver":"file", "filename": > "/path/to/detached_luks_payload_raw.img", "node-name": > &

[PATCH RESEND v3 02/10] crypto: Support generic LUKS encryption

2023-12-24 Thread Hyman Huang
ode-name":"libvirt-2-format", "driver":"luks", > "file":"libvirt-1-format", "header":"libvirt-2-storage", > "key-secret":"libvirt-2-format-secret0"}}' 6. add the virtio-blk device finally $ virsh qemu-m

[PATCH RESEND v3 07/10] block: Support detached LUKS header creation using qemu-img

2023-12-24 Thread Hyman Huang
Add the 'detached-mode' option to specify the creation of a detached LUKS header. This is how it is used: $ qemu-img create --object secret,id=sec0,data=abc123 -f luks > -o cipher-alg=aes-256,cipher-mode=xts -o key-secret=sec0 > -o detached-mode=true header.luks Signed-off

[v3 04/10] crypto: Introduce creation option and structure for detached LUKS header

2023-12-24 Thread Hyman Huang
Introduce 'header' field in BlockdevCreateOptionsLUKS to support detached LUKS header creation. Meanwhile, introduce header-related field in QCryptoBlock. Signed-off-by: Hyman Huang --- crypto/blockpriv.h | 3 +++ qapi/block-core.json | 3 +++ qapi/crypto.json | 5 - 3 fil

[v3 09/10] tests: Add detached LUKS header case

2023-12-24 Thread Hyman Huang
Signed-off-by: Hyman Huang --- tests/qemu-iotests/tests/luks-detached-header | 214 ++ .../tests/luks-detached-header.out| 5 + 2 files changed, 219 insertions(+) create mode 100755 tests/qemu-iotests/tests/luks-detached-header create mode 100644 tests/qemu

[v3 06/10] block: Support detached LUKS header creation using blockdev-create

2023-12-24 Thread Hyman Huang
add protocol blockdev node for payload $ virsh qemu-monitor-command vm '{"execute":"blockdev-add", > "arguments": {"driver":"file", "filename": > "/path/to/detached_luks_payload_raw.img", "node-name": > &

[v3 03/10] qapi: Make parameter 'file' optional for BlockdevCreateOptionsLUKS

2023-12-24 Thread Hyman Huang
To support detached LUKS header creation, make the existing 'file' filed in BlockdevCreateOptionsLUKS optional, while also adding an extra optional 'header' field in the next commit. Signed-off-by: Hyman Huang --- block/crypto.c | 21 ++--- qapi/

[v3 08/10] crypto: Introduce 'detached-header' field in QCryptoBlockInfoLUKS

2023-12-24 Thread Hyman Huang
When querying the LUKS disk with the qemu-img tool or other APIs, add information about whether the LUKS header is detached. Additionally, update the test case with the appropriate modification. Signed-off-by: Hyman Huang --- crypto/block-luks.c| 2 ++ qapi/crypto.json | 3

[v3 02/10] crypto: Support generic LUKS encryption

2023-12-24 Thread Hyman Huang
ode-name":"libvirt-2-format", "driver":"luks", > "file":"libvirt-1-format", "header":"libvirt-2-storage", > "key-secret":"libvirt-2-format-secret0"}}' 6. add the virtio-blk device finally $ virsh qemu-m

[v3 05/10] crypto: Mark the payload_offset_sector invalid for detached LUKS header

2023-12-24 Thread Hyman Huang
Set the payload_offset_sector to a value that is nearly never reached in order to mark it as invalid and indicate that 0 should be the offset of the read/write operation on the 'file' protocol blockdev node. Signed-off-by: Hyman Huang --- crypto/block-l

[v3 07/10] block: Support detached LUKS header creation using qemu-img

2023-12-24 Thread Hyman Huang
Add the 'detached-mode' option to specify the creation of a detached LUKS header. This is how it is used: $ qemu-img create --object secret,id=sec0,data=abc123 -f luks > -o cipher-alg=aes-256,cipher-mode=xts -o key-secret=sec0 > -o detached-mode=true header.luks Signed-off

[v3 10/10] MAINTAINERS: Add section "Detached LUKS header"

2023-12-24 Thread Hyman Huang
I've built interests in block cryptography and also have been working on projects related to this subsystem. Add a section to the MAINTAINERS file for detached LUKS header, it only has a test case in it currently. Signed-off-by: Hyman Huang --- MAINTAINERS | 5 + 1 file chang

[v3 00/10] Support generic Luks encryption

2023-12-24 Thread Hyman Huang
header querying - Do some code clean Hyman Huang (10): crypto: Introduce option and structure for detached LUKS header crypto: Support generic LUKS encryption qapi: Make parameter 'file' optional for BlockdevCreateOptionsLUKS crypto: Introduce creation option and structure for det

[v3 01/10] crypto: Introduce option and structure for detached LUKS header

2023-12-24 Thread Hyman Huang
Add the "header" option for the LUKS format. This field would be used to identify the blockdev's position where a detachable LUKS header is stored. In addition, introduce header field in struct BlockCrypto Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berra

[PATCH v6] crypto: Introduce SM4 symmetric cipher algorithm

2023-12-07 Thread Hyman Huang
enable the feature silently if it is available. Signed-off-by: Hyman Huang Reviewed-by: Philippe Mathieu-Daudé --- crypto/block-luks.c | 11 crypto/cipher-gcrypt.c.inc | 8 ++ crypto/cipher-nettle.c.inc | 49 + crypto/cipher.c

[PATCH v5] crypto: Introduce SM4 symmetric cipher algorithm

2023-12-07 Thread Hyman Huang
to explicitly control the feature, which would be detected by default. Signed-off-by: Hyman Huang Reviewed-by: Philippe Mathieu-Daudé --- crypto/block-luks.c | 11 crypto/cipher-gcrypt.c.inc | 8 ++ crypto/cipher-nettle.c.inc | 49

[v2 0/4] Support generic Luks encryption

2023-12-06 Thread Hyman Huang
gt; "file":"libvirt-1-format", "header":"libvirt-2-storage", > "key-secret":"libvirt-2-format-secret0"}}' 6. add the virtio-blk device finally $ virsh qemu-monitor-command vm '{"execute":"device_add", > &qu

[v2 2/4] crypto: Introduce payload offset set function

2023-12-06 Thread Hyman Huang
Signed-off-by: Hyman Huang --- crypto/block.c | 4 include/crypto/block.h | 1 + 2 files changed, 5 insertions(+) diff --git a/crypto/block.c b/crypto/block.c index 7bb4b74a37..3dcf22a69f 100644 --- a/crypto/block.c +++ b/crypto/block.c @@ -319,6 +319,10 @@ QCryptoHashAlgorithm

[v2 3/4] crypto: Support generic LUKS encryption

2023-12-06 Thread Hyman Huang
ode-name":"libvirt-2-format", "driver":"luks", > "file":"libvirt-1-format", "header":"libvirt-2-storage", > "key-secret":"libvirt-2-format-secret0"}}' 6. add the virtio-blk device finally $ virsh qem

[v2 4/4] block: Support detached LUKS header creation for blockdev-create

2023-12-06 Thread Hyman Huang
uot;blockdev-create", > "arguments":{"job-id":"job0", "options":{"driver":"luks", > "size":0, "file":"libvirt-1-storage", "detached-mode":true, > "cipher-alg&qu

[v2 1/4] crypto: Introduce option and structure for detached LUKS header

2023-12-06 Thread Hyman Huang
Add the "header" option for the LUKS format. This field would be used to identify the blockdev's position where a detachable LUKS header is stored. In addition, introduce header field in struct BlockCrypto Signed-off-by: Hyman Huang --- block/crypto.c | 1 + qapi/bloc

  1   2   3   4   >