On 10/10/2016 03:43 AM, Gonglei wrote: > Introduce the virtio_crypto.h which follows > virtio-crypto specification. > > Signed-off-by: Gonglei <arei.gong...@huawei.com> > --- > include/standard-headers/linux/virtio_crypto.h | 381 > +++++++++++++++++++++++++ > 1 file changed, 381 insertions(+) > create mode 100644 include/standard-headers/linux/virtio_crypto.h > > diff --git a/include/standard-headers/linux/virtio_crypto.h > b/include/standard-headers/linux/virtio_crypto.h > new file mode 100644 > index 0000000..a62d192 > --- /dev/null > +++ b/include/standard-headers/linux/virtio_crypto.h > @@ -0,0 +1,381 @@ > +#ifndef _VIRTIO_CRYPTO_H > +#define _VIRTIO_CRYPTO_H
Missing a copyright and license notice. Is this header copied from Linux, or is it new to qemu? At any rate, being explicit about your license is important (in qemu, files without a license are GPLv2+; whereas the Linux kernel tends to favor GPLv2-only). > + > +#include "standard-headers/linux/types.h" > +#include "standard-headers/linux/virtio_config.h" > +#include "standard-headers/linux/virtio_types.h" > + > + > +#define VIRTIO_CRYPTO_SERVICE_CIPHER (0) > +#define VIRTIO_CRYPTO_SERVICE_HASH (1) > +#define VIRTIO_CRYPTO_SERVICE_MAC (2) > +#define VIRTIO_CRYPTO_SERVICE_AEAD (3) Technically over-parenthesized, but doesn't hurt. > + > +#define VIRTIO_CRYPTO_OPCODE(service, op) ((service << 8) | (op)) Under-parenthesized. You need more () around service. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature