summaryrefslogtreecommitdiffstats
path: root/qemu/include/sysemu/rng.h
diff options
context:
space:
mode:
authorRajithaY <rajithax.yerrumsetty@intel.com>2017-04-25 03:31:15 -0700
committerRajitha Yerrumchetty <rajithax.yerrumsetty@intel.com>2017-05-22 06:48:08 +0000
commitbb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch)
treeca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/include/sysemu/rng.h
parenta14b48d18a9ed03ec191cf16b162206998a895ce (diff)
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to kvmfornfv repo and make use of the updated latest qemu for the execution of all testcase Change-Id: I1280af507a857675c7f81d30c95255635667bdd7 Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/include/sysemu/rng.h')
-rw-r--r--qemu/include/sysemu/rng.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/qemu/include/sysemu/rng.h b/qemu/include/sysemu/rng.h
deleted file mode 100644
index 45629c4c5..000000000
--- a/qemu/include/sysemu/rng.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * QEMU Random Number Generator Backend
- *
- * Copyright IBM, Corp. 2012
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#ifndef QEMU_RNG_H
-#define QEMU_RNG_H
-
-#include "qom/object.h"
-#include "qemu-common.h"
-
-#define TYPE_RNG_BACKEND "rng-backend"
-#define RNG_BACKEND(obj) \
- OBJECT_CHECK(RngBackend, (obj), TYPE_RNG_BACKEND)
-#define RNG_BACKEND_GET_CLASS(obj) \
- OBJECT_GET_CLASS(RngBackendClass, (obj), TYPE_RNG_BACKEND)
-#define RNG_BACKEND_CLASS(klass) \
- OBJECT_CLASS_CHECK(RngBackendClass, (klass), TYPE_RNG_BACKEND)
-
-typedef struct RngRequest RngRequest;
-typedef struct RngBackendClass RngBackendClass;
-typedef struct RngBackend RngBackend;
-
-typedef void (EntropyReceiveFunc)(void *opaque,
- const void *data,
- size_t size);
-
-struct RngRequest
-{
- EntropyReceiveFunc *receive_entropy;
- uint8_t *data;
- void *opaque;
- size_t offset;
- size_t size;
- QSIMPLEQ_ENTRY(RngRequest) next;
-};
-
-struct RngBackendClass
-{
- ObjectClass parent_class;
-
- void (*request_entropy)(RngBackend *s, RngRequest *req);
-
- void (*opened)(RngBackend *s, Error **errp);
-};
-
-struct RngBackend
-{
- Object parent;
-
- /*< protected >*/
- bool opened;
- QSIMPLEQ_HEAD(requests, RngRequest) requests;
-};
-
-
-/**
- * rng_backend_request_entropy:
- * @s: the backend to request entropy from
- * @size: the number of bytes of data to request
- * @receive_entropy: a function to be invoked when entropy is available
- * @opaque: data that should be passed to @receive_entropy
- *
- * This function is used by the front-end to request entropy from an entropy
- * source. This function can be called multiple times before @receive_entropy
- * is invoked with different values of @receive_entropy and @opaque. The
- * backend will queue each request and handle appropriately.
- *
- * The backend does not need to pass the full amount of data to @receive_entropy
- * but will pass a value greater than 0.
- */
-void rng_backend_request_entropy(RngBackend *s, size_t size,
- EntropyReceiveFunc *receive_entropy,
- void *opaque);
-
-/**
- * rng_backend_free_request:
- * @s: the backend that created the request
- * @req: the request to finalize
- *
- * Used by child rng backend classes to finalize requests once they've been
- * processed. The request is removed from the list of active requests and
- * deleted.
- */
-void rng_backend_finalize_request(RngBackend *s, RngRequest *req);
-#endif