Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
qemu-version: qemu-kvm-1.5.3-19.el7
bug exists in qemu upstream
-------------------------------------
We have the following comment about the default limit rate:
/* 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)
--------------
But the current rate is (INT64_MAX) bytes per (1 << 16) ms, it's 128,000 TB/s
2TB/s is a reasonable rate, so this patch fixes the code, not update the document.
* change the default period to 60,000 ms --> 1 mins
* change the default max-bytes to 2^47 bytes --> INT64_MAX >> 16
INT64_MAX = 0x 8000 0000 0000 0000 - 1 = 2 ^ 63 - 1
INT64_MAX >> 16 = 0x 8000 0000 0000 - 1 = 2 ^ 47
===========================================================================
diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h
index debaa15..d64e804 100644
--- a/include/hw/virtio/virtio-rng.h
+++ b/include/hw/virtio/virtio-rng.h
@@ -53,7 +53,7 @@ typedef struct VirtIORNG {
*/
#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)
+ INT64_MAX >> 16), \
+ DEFINE_PROP_UINT32("period", _state, _conf_field.period_ms, 60000)
#endif
qemu-version: qemu-kvm-1.5.3-19.el7 bug exists in qemu upstream ------------------------------------- We have the following comment about the default limit rate: /* 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) -------------- But the current rate is (INT64_MAX) bytes per (1 << 16) ms, it's 128,000 TB/s 2TB/s is a reasonable rate, so this patch fixes the code, not update the document. * change the default period to 60,000 ms --> 1 mins * change the default max-bytes to 2^47 bytes --> INT64_MAX >> 16 INT64_MAX = 0x 8000 0000 0000 0000 - 1 = 2 ^ 63 - 1 INT64_MAX >> 16 = 0x 8000 0000 0000 - 1 = 2 ^ 47 =========================================================================== diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h index debaa15..d64e804 100644 --- a/include/hw/virtio/virtio-rng.h +++ b/include/hw/virtio/virtio-rng.h @@ -53,7 +53,7 @@ typedef struct VirtIORNG { */ #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) + INT64_MAX >> 16), \ + DEFINE_PROP_UINT32("period", _state, _conf_field.period_ms, 60000) #endif