~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to hw/virtio/virtio-crypto-pci.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    VirtIOCryptoPCI *vcrypto = VIRTIO_CRYPTO_PCI(vpci_dev);
32
32
    DeviceState *vdev = DEVICE(&vcrypto->vdev);
33
33
 
 
34
    if (vcrypto->vdev.conf.cryptodev == NULL) {
 
35
        error_setg(errp, "'cryptodev' parameter expects a valid object");
 
36
        return;
 
37
    }
 
38
 
34
39
    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
35
40
    virtio_pci_force_virtio_1(vpci_dev);
36
41
    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
48
53
    k->realize = virtio_crypto_pci_realize;
49
54
    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
50
55
    dc->props = virtio_crypto_pci_properties;
51
 
    dc->hotpluggable = false;
52
56
    pcidev_k->class_id = PCI_CLASS_OTHERS;
53
57
}
54
58