On 02/24/16 09:34, Ard Biesheuvel wrote:
> This implements a UEFI driver model driver for the VirtIO RNG device.
>
> Changes since v3:
> - add patch to add the driver to OvmfPkg builds (#4)
> - add Jordan's ack to patch #1
Also, you've implemented the change I requested for the main patch
("OvmfPkg: implement UEFI driver for Virtio RNG devices").
For patch 4 (thank you for picking that up too!):
Reviewed-by: Laszlo Ersek <[email protected]>
Please go ahead and push it.
Thank you!
Laszlo
> Changes since v2:
> - incorporate feedback from Laszlo (patch #2)
> - added patch to wire up the driver in ArmVirtQemu (#3)
>
> Changes since v1:
> - validate args rather than ASSERT () their validity
> - use a volatile intermediate buffer so the compiler does not optimize the
> access away
> - include Laszlo's patch #1 which greatly simplifies the next item
> - poke the virtio RNG device as long as we need to satisfy our full request,
> since a single invocation may return less data than we asked for
>
> I have tested the driver with a rate limit of 19 bytes per 1000 ms, with a
> file containing a predictable pattern. The RngTest output is below, it took
> a minute or so for the full output to appear, but it looks like the repeated
> polling of the device is working as expected.
>
> while true; do echo -n 00112233445566778899AABBCCDDEEFF; done | \
> xxd -r -p | dd iflag=fullblock count=2 bs=1M of=/tmp/unrandom
>
> and pass
>
> -object rng-random,filename=/tmp/unrandom,id=rng0 \
> -device virtio-rng-pci,rng=rng0,max-bytes=19,period=1000 \
>
> on the QEMU command line
>
> Ard Biesheuvel (3):
> OvmfPkg: implement UEFI driver for Virtio RNG devices
> ArmVirtPkg: ArmVirtQemu: add driver for Virtio-RNG device
> OvmfPkg: add driver for Virtio-RNG device
>
> Laszlo Ersek (1):
> OvmfPkg: VirtioFlush(): return the number of bytes written by the host
>
> ArmVirtPkg/ArmVirtQemu.dsc | 1 +
> ArmVirtPkg/ArmVirtQemu.fdf | 1 +
> OvmfPkg/Include/Library/VirtioLib.h | 11 +-
> OvmfPkg/Library/VirtioLib/VirtioLib.c | 26 +-
> OvmfPkg/OvmfPkgIa32.dsc | 1 +
> OvmfPkg/OvmfPkgIa32.fdf | 1 +
> OvmfPkg/OvmfPkgIa32X64.dsc | 1 +
> OvmfPkg/OvmfPkgIa32X64.fdf | 1 +
> OvmfPkg/OvmfPkgX64.dsc | 1 +
> OvmfPkg/OvmfPkgX64.fdf | 1 +
> OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 3 +-
> OvmfPkg/VirtioRngDxe/VirtioRng.c | 653 ++++++++++++++++++++
> OvmfPkg/VirtioRngDxe/VirtioRng.h | 46 ++
> OvmfPkg/VirtioRngDxe/VirtioRng.inf | 45 ++
> OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 2 +-
> 15 files changed, 788 insertions(+), 6 deletions(-)
> create mode 100644 OvmfPkg/VirtioRngDxe/VirtioRng.c
> create mode 100644 OvmfPkg/VirtioRngDxe/VirtioRng.h
> create mode 100644 OvmfPkg/VirtioRngDxe/VirtioRng.inf
>
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel