occurred:
Multifd must be set before incoming starts
Supporting deferred migration will fix it.
Signed-off-by: Hyman Huang
---
scripts/migration/guestperf/engine.py | 19 +++
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/scripts/migration/guestperf/engine.py
b
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.
Add myself as a maintainer for the guestperf so that I can
help to fix bugs.
Signed-off-by:
multifd behavior
4. A nitpick for multifd migration
5. Support multifd compression option
Hyman Huang (5):
tests/migration: Move the guestperf tool to scripts directory
tests/migration: Make initrd-stress.img built by default
guestperf: Support deferred migration for multifd
guestperf: Nitpick
Signed-off-by: Hyman Huang
Reviewed-by: Fabiano Rosas
---
scripts/migration/guestperf/comparison.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/migration/guestperf/comparison.py
b/scripts/migration/guestperf/comparison.py
index 42cc0372d1..40e9d2eb1d 100644
-batch.py \
--dst-host localhost --transport unix \
--filter compr-multifd-compression* --output outputdir
Signed-off-by: Hyman Huang
---
scripts/migration/guestperf/comparison.py | 13 +
scripts/migration/guestperf/engine.py | 14 ++
scripts/migration/guestperf
The initrd-stress.img was compiled by specifying the target,
to make it easier for developers to play the guestperf tool,
make it built when dependencies suffices.
Signed-off-by: Hyman Huang
---
tests/migration/meson.build | 33 -
1 file changed, 20 insertions
在 2024/9/27 23:35, Peter Xu 写道:
On Fri, Sep 27, 2024 at 10:50:01AM +0800, Yong Huang wrote:
On Fri, Sep 27, 2024 at 3:55 AM Peter Xu wrote:
On Fri, Sep 27, 2024 at 02:13:47AM +0800, Yong Huang wrote:
On Thu, Sep 26, 2024 at 3:17 AM Peter Xu wrote:
On Fri, Sep 20, 2024 at 10:43:31AM +080
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
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
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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(
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
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
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
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
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(
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
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
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
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
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
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
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/
在 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
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
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
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
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.
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
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
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 +++
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
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
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
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
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
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
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
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
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
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
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
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 ---
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
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
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
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/
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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/
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":
> &
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
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
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
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
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":
> &
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/
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
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
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
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
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
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
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
1 - 100 of 406 matches
Mail list logo