[libvirt] [PATCH v2 2/4] conf: Parse virtio-crypto in the domain XML

Longpeng (Mike) longpeng2 at huawei.com
Wed Feb 8 03:25:21 UTC 2017


Hi Martin,

On 2017/2/7 20:15, Martin Kletzander wrote:

> On Wed, Jan 11, 2017 at 04:28:24PM +0800, Longpeng(Mike) wrote:
>> This patch parse the domain XML with virtio-crypto
>> support, the virtio-crypto XML looks like this:
>>
>>  <crypto model='virtio'>
>>    <backend type='builtin' queues='1'/>
>>  </crypto>
>>
>> Signed-off-by: Longpeng(Mike) <longpeng2 at huawei.com>
>> ---
>> src/conf/domain_conf.c         | 213 ++++++++++++++++++++++++++++++++++++++++-
>> src/conf/domain_conf.h         |  32 +++++++
>> src/libvirt_private.syms       |   2 +
>> src/qemu/qemu_domain.c         |   2 +
>> src/qemu/qemu_domain_address.c |   1 +
>> src/qemu/qemu_driver.c         |   6 ++
>> src/qemu/qemu_hotplug.c        |   1 +
>> 7 files changed, 256 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>> index 52aee2b..ef44930 100644
>> --- a/src/conf/domain_conf.c
>> +++ b/src/conf/domain_conf.c
>> @@ -18967,6 +19096,25 @@ virDomainRNGDefCheckABIStability(virDomainRNGDefPtr src,
>>
>>
>> static bool
>> +virDomainCryptoDefCheckABIStability(virDomainCryptoDefPtr src,
>> +                                    virDomainCryptoDefPtr dst)
>> +{
>> +    if (src->model != dst->model) {
>> +        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>> +                       _("Target Crypto model '%s' does not match source '%s'"),
>> +                       virDomainCryptoModelTypeToString(dst->model),
>> +                       virDomainCryptoModelTypeToString(src->model));
>> +        return false;
>> +    }
>> +
> 
> The number of queues is not part of ABI?  That'd make sense, I'm just
> making sure.


Oh, yep! I think it's necessary to check 'queues' for future scalability,
although QEMU cryptodev only support one queue currently.

I will take all your other suggestions and rebase the patchset on master in V3.

Thanks. :)

> 
...
>>     case VIR_DOMAIN_DEVICE_LAST:
>>     case VIR_DOMAIN_DEVICE_NONE:
>>         return 0;


-- 
Regards,
Longpeng(Mike)




More information about the libvir-list mailing list