| 24 | struct virtio_hw_internal crypto_virtio_hw_internal[RTE_MAX_VIRTIO_CRYPTO]; |
| 25 | |
| 26 | static inline int |
| 27 | check_vq_phys_addr_ok(struct virtqueue *vq) |
| 28 | { |
| 29 | /* Virtio PCI device VIRTIO_PCI_QUEUE_PF register is 32bit, |
| 30 | * and only accepts 32 bit page frame number. |
| 31 | * Check if the allocated physical memory exceeds 16TB. |
| 32 | */ |
| 33 | if ((vq->vq_ring_mem + vq->vq_ring_size - 1) >> |
| 34 | (VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) { |
| 35 | VIRTIO_CRYPTO_INIT_LOG_ERR("vring address shouldn't be above 16TB!"); |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | return 1; |
| 40 | } |
| 41 | |
| 42 | static inline void |
| 43 | io_write64_twopart(uint64_t val, uint32_t *lo, uint32_t *hi) |
no outgoing calls
no test coverage detected