mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
virtio-rng: move qdev properties into virtio-rng.c
As only one place in virtio-rng.c uses DEFINE_VIRTIO_RNG_PROPERTIES, there is no need to expose it. Inline it into virtio-rng.c to avoid wrongly use. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
0c63237a90
commit
fe704809b9
2 changed files with 7 additions and 11 deletions
|
@ -46,14 +46,4 @@ typedef struct VirtIORNG {
|
|||
int64_t quota_remaining;
|
||||
} VirtIORNG;
|
||||
|
||||
/* Set a default rate limit of 2^47 bytes per minute or roughly 2TB/s. If
|
||||
you have an entropy source capable of generating more entropy than this
|
||||
and you can pass it through via virtio-rng, then hats off to you. Until
|
||||
then, this is unlimited for all practical purposes.
|
||||
*/
|
||||
#define DEFINE_VIRTIO_RNG_PROPERTIES(_state, _conf_field) \
|
||||
DEFINE_PROP_UINT64("max-bytes", _state, _conf_field.max_bytes, \
|
||||
INT64_MAX), \
|
||||
DEFINE_PROP_UINT32("period", _state, _conf_field.period_ms, 1 << 16)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue