2580b452 | 01-Mar-2023 |
zhenwei pi <pizhenwei@bytedance.com> |
cryptodev: support QoS
Add 'throttle-bps' and 'throttle-ops' limitation to set QoS. The two arguments work with both QEMU command line and QMP command.
Example of QEMU command line: -object cryptod
cryptodev: support QoS
Add 'throttle-bps' and 'throttle-ops' limitation to set QoS. The two arguments work with both QEMU command line and QMP command.
Example of QEMU command line: -object cryptodev-backend-builtin,id=cryptodev1,throttle-bps=1600,\ throttle-ops=100
Example of QMP command: virsh qemu-monitor-command buster --hmp qom-set /objects/cryptodev1 \ throttle-ops 100
or cancel limitation: virsh qemu-monitor-command buster --hmp qom-set /objects/cryptodev1 \ throttle-ops 0
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20230301105847.253084-11-pizhenwei@bytedance.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
5dcb0198 | 01-Mar-2023 |
zhenwei pi <pizhenwei@bytedance.com> |
cryptodev: Introduce 'query-cryptodev' QMP command
Now we have a QMP command to query crypto devices: virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq { "return": [ {
cryptodev: Introduce 'query-cryptodev' QMP command
Now we have a QMP command to query crypto devices: virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq { "return": [ { "service": [ "akcipher", "mac", "hash", "cipher" ], "id": "cryptodev1", "client": [ { "queue": 0, "type": "builtin" } ] }, { "service": [ "akcipher" ], "id": "cryptodev0", "client": [ { "queue": 0, "type": "lkcf" } ] } ], "id": "libvirt-417" }
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20230301105847.253084-6-pizhenwei@bytedance.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
bc304a64 | 01-Mar-2023 |
zhenwei pi <pizhenwei@bytedance.com> |
cryptodev: Introduce server type in QAPI
Introduce cryptodev service type in cryptodev.json, then apply this to related codes. Now we can remove VIRTIO_CRYPTO_SERVICE_xxx dependence from QEMU crypto
cryptodev: Introduce server type in QAPI
Introduce cryptodev service type in cryptodev.json, then apply this to related codes. Now we can remove VIRTIO_CRYPTO_SERVICE_xxx dependence from QEMU cryptodev.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20230301105847.253084-5-pizhenwei@bytedance.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
999c789f | 01-Mar-2023 |
zhenwei pi <pizhenwei@bytedance.com> |
cryptodev: Introduce cryptodev alg type in QAPI
Introduce cryptodev alg type in cryptodev.json, then apply this to related codes, and drop 'enum CryptoDevBackendAlgType'.
There are two options: 1,
cryptodev: Introduce cryptodev alg type in QAPI
Introduce cryptodev alg type in cryptodev.json, then apply this to related codes, and drop 'enum CryptoDevBackendAlgType'.
There are two options: 1, { 'enum': 'QCryptodevBackendAlgType', 'prefix': 'CRYPTODEV_BACKEND_ALG', 'data': ['sym', 'asym']} Then we can keep 'CRYPTODEV_BACKEND_ALG_SYM' and avoid lots of changes. 2, changes in this patch(with prefix 'QCRYPTODEV_BACKEND_ALG').
To avoid breaking the rule of QAPI, use 2 here.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20230301105847.253084-4-pizhenwei@bytedance.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
0f385a24 | 29-Jan-2023 |
Or Ozeri <oro@il.ibm.com> |
block/rbd: Add support for layered encryption
Starting from ceph Reef, RBD has built-in support for layered encryption, where each ancestor image (in a cloned image setting) can be possibly encrypte
block/rbd: Add support for layered encryption
Starting from ceph Reef, RBD has built-in support for layered encryption, where each ancestor image (in a cloned image setting) can be possibly encrypted using a unique passphrase.
A new function, rbd_encryption_load2, was added to librbd API. This new function supports an array of passphrases (via "spec" structs).
This commit extends the qemu rbd driver API to use this new librbd API, in order to support this new layered encryption feature.
Signed-off-by: Or Ozeri <oro@il.ibm.com> Message-Id: <20230129113120.722708-4-oro@oro.sl.cloud9.ibm.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
c04d0ab0 | 20-Jun-2022 |
Hanna Reitz <hreitz@redhat.com> |
qemu-img: Let info print block graph
For every node in the backing chain, collect its BlockGraphInfo struct using bdrv_query_block_graph_info(). Print all nodes' information, indenting child nodes
qemu-img: Let info print block graph
For every node in the backing chain, collect its BlockGraphInfo struct using bdrv_query_block_graph_info(). Print all nodes' information, indenting child nodes and labelling them with a path constructed from the child names leading to the node from the root (e.g. /file/file).
Note that we open each image with BDRV_O_NO_BACKING, so its backing child is omitted from this graph, and thus presented in the previous manner: By simply concatenating all images' information, separated with blank lines.
This affects two iotests: - 065: Here we try to get the format node's format specific information. The pre-patch code does so by taking all lines from "Format specific information:" until an empty line. This format specific information is no longer followed by an empty line, though, but by child node information, so limit the range by "Child node '/file':". - 302: Calls qemu_img() for qemu-img info directly, which does not filter the output, so the child node information ends up in the output.
Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220620162704.80987-12-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
6cab3399 | 20-Jun-2022 |
Hanna Reitz <hreitz@redhat.com> |
block/qapi: Introduce BlockGraphInfo
Introduce a new QAPI type BlockGraphInfo and an associated bdrv_query_block_graph_info() function that recursively gathers BlockNodeInfo objects through a block
block/qapi: Introduce BlockGraphInfo
Introduce a new QAPI type BlockGraphInfo and an associated bdrv_query_block_graph_info() function that recursively gathers BlockNodeInfo objects through a block graph.
A follow-up patch is going to make "qemu-img info" use this to print information about all nodes that are (usually implicitly) opened for a given image file.
Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220620162704.80987-8-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
b1f4cd15 | 20-Jun-2022 |
Hanna Reitz <hreitz@redhat.com> |
qemu-img: Use BlockNodeInfo
qemu-img info never uses ImageInfo's backing-image field, because it opens the backing chain one by one with BDRV_O_NO_BACKING, and prints all backing chain nodes' inform
qemu-img: Use BlockNodeInfo
qemu-img info never uses ImageInfo's backing-image field, because it opens the backing chain one by one with BDRV_O_NO_BACKING, and prints all backing chain nodes' information consecutively. Use BlockNodeInfo to make it clear that we only print information about a single node, and that we are not using the backing-image field.
Notably, bdrv_image_info_dump() does not evaluate the backing-image field, so we can easily make it take a BlockNodeInfo pointer (and consequentially rename it to bdrv_node_info_dump()). It makes more sense this way, because again, the interface now makes it syntactically clear that backing-image is ignored by this function.
Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220620162704.80987-6-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
a2085f89 | 20-Jun-2022 |
Hanna Reitz <hreitz@redhat.com> |
block: Split BlockNodeInfo off of ImageInfo
ImageInfo sometimes contains flat information, and sometimes it does not. Split off a BlockNodeInfo struct, which only contains information about a singl
block: Split BlockNodeInfo off of ImageInfo
ImageInfo sometimes contains flat information, and sometimes it does not. Split off a BlockNodeInfo struct, which only contains information about a single node and has no link to the backing image.
We do this so we can extend BlockNodeInfo to a BlockGraphInfo struct, which has links to all child nodes, not just the backing node. It would be strange to base BlockGraphInfo on ImageInfo, because then this extended struct would have two links to the backing node (one in BlockGraphInfo as one of all the child links, and one in ImageInfo).
Furthermore, it is quite common to ignore the backing-image field altogether: bdrv_query_image_info() does not set it, and bdrv_image_info_dump() does not evaluate it. That signals that we should have different structs for describing a single node and one that has a link to the backing image.
Still, bdrv_query_image_info() and bdrv_image_info_dump() are not changed too much in this patch. Follow-up patches will handle them.
Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220620162704.80987-5-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
456e7517 | 20-Jun-2022 |
Hanna Reitz <hreitz@redhat.com> |
block/vmdk: Change extent info type
VMDK's implementation of .bdrv_get_specific_info() returns information about its extent files, ostensibly in the form of ImageInfo objects. However, it does not g
block/vmdk: Change extent info type
VMDK's implementation of .bdrv_get_specific_info() returns information about its extent files, ostensibly in the form of ImageInfo objects. However, it does not get this information through bdrv_query_image_info(), but fills only a select few fields with custom information that does not always match the fields' purposes.
For example, @format, which is supposed to be a block driver name, is filled with the extent type, e.g. SPARSE or FLAT.
In ImageInfo, @compressed shows whether the data that can be seen in the image is stored in compressed form or not. For example, a compressed qcow2 image will store compressed data in its data file, but when accessing the qcow2 node, you will see normal data. This is not how VMDK uses the @compressed field for its extent files: Instead, it signifies whether accessing the extent file will yield compressed data (which the VMDK driver then (de-)compresses).
Create a new structure to represent the extent information. This allows us to clarify the fields' meanings, and it clearly shows that these are not complete ImageInfo objects. (That is, if a user wants an extent file's ImageInfo object, they will need to query it separately, and will not get it from ImageInfoSpecificVmdk.extents.)
Note that this removes the last use of ['ImageInfo'] (i.e. an array of ImageInfo objects), so the QAPI generator will no longer generate ImageInfoList by default. However, we use it in qemu-img.c, so we need to create a dummy object to force the generate to create that type, similarly to DummyForceArrays in machine.json (introduced in commit 9f08c8ec73878122ad4b061ed334f0437afaaa32 ("qapi: Lazy creation of array types")).
Signed-off-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220620162704.80987-4-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
7a92a857 | 23-Jan-2023 |
Daniel P. Berrangé <berrange@redhat.com> |
qapi, audio: Make introspection reflect build configuration more closely
Currently the -audiodev accepts any audiodev type regardless of what is built in to QEMU. An error only occurs later at runti
qapi, audio: Make introspection reflect build configuration more closely
Currently the -audiodev accepts any audiodev type regardless of what is built in to QEMU. An error only occurs later at runtime when a sound device tries to use the audio backend.
With this change QEMU will immediately reject -audiodev args that are not compiled into the binary. The QMP schema will also be introspectable to identify what is compiled in.
This also helps to avoid compiling code that is not required in the binary. Note: When building the audiodevs as modules, the patch only compiles out code for modules that we don't build at all.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> [thuth: Rebase, take sndio and dbus devices into account] Message-Id: <20230123083957.20349-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|