diff options
Diffstat (limited to 'hw/virtio/virtio-crypto.c')
-rw-r--r-- | hw/virtio/virtio-crypto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c index f872c87cb9..6318fcf01b 100644 --- a/hw/virtio/virtio-crypto.c +++ b/hw/virtio/virtio-crypto.c @@ -799,6 +799,7 @@ static void virtio_crypto_device_realize(DeviceState *dev, Error **errp) } virtio_crypto_init_config(vdev); + cryptodev_backend_set_used(vcrypto->cryptodev, true); } static void virtio_crypto_device_unrealize(DeviceState *dev, Error **errp) @@ -818,6 +819,7 @@ static void virtio_crypto_device_unrealize(DeviceState *dev, Error **errp) g_free(vcrypto->vqs); virtio_cleanup(vdev); + cryptodev_backend_set_used(vcrypto->cryptodev, false); } static const VMStateDescription vmstate_virtio_crypto = { |