[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RESEND 3/5] virtio-crypto-pci: add check for cry
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH RESEND 3/5] virtio-crypto-pci: add check for cryptodev object |
Date: |
Thu, 22 Dec 2016 03:18:40 +0000 |
>
> Subject: [PATCH RESEND 3/5] virtio-crypto-pci: add check for cryptodev object
>
> We must assure each virtio crypto pci device has
> an invaild cryptodev backend object.
>
Oops, a typo.
s/an invalid/ a valid/
Michael, can you pls correct it if no other comments?
Thanks,
-Gonglei
> Signed-off-by: Gonglei <address@hidden>
> ---
> hw/virtio/virtio-crypto-pci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/virtio/virtio-crypto-pci.c b/hw/virtio/virtio-crypto-pci.c
> index a1b0906..14bd12c 100644
> --- a/hw/virtio/virtio-crypto-pci.c
> +++ b/hw/virtio/virtio-crypto-pci.c
> @@ -31,6 +31,11 @@ static void virtio_crypto_pci_realize(VirtIOPCIProxy
> *vpci_dev, Error **errp)
> VirtIOCryptoPCI *vcrypto = VIRTIO_CRYPTO_PCI(vpci_dev);
> DeviceState *vdev = DEVICE(&vcrypto->vdev);
>
> + if (vcrypto->vdev.conf.cryptodev == NULL) {
> + error_setg(errp, "'cryptodev' parameter expects a valid object");
> + return;
> + }
> +
> qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
> virtio_pci_force_virtio_1(vpci_dev);
> object_property_set_bool(OBJECT(vdev), true, "realized", errp);
> --
> 1.8.3.1
>
- [Qemu-devel] [PATCH RESEND 0/5] hotplugging support for both cryptdoev and virtio crypto device, Gonglei, 2016/12/21
- [Qemu-devel] [PATCH RESEND 4/5] virtio-crypto: avoid one cryptodev device is used by multiple virtio crypto devices, Gonglei, 2016/12/21
- [Qemu-devel] [PATCH RESEND 5/5] virtio-crypto-pci: tag virtio-crypto device hot pluggable, Gonglei, 2016/12/21
- [Qemu-devel] [PATCH RESEND 1/5] cryptodev: introduce a new is_used property, Gonglei, 2016/12/21
- [Qemu-devel] [PATCH RESEND 2/5] cryptodev: wrap the ready flag, Gonglei, 2016/12/21
- [Qemu-devel] [PATCH RESEND 3/5] virtio-crypto-pci: add check for cryptodev object, Gonglei, 2016/12/21
- Re: [Qemu-devel] [PATCH RESEND 3/5] virtio-crypto-pci: add check for cryptodev object,
Gonglei (Arei) <=