On Fri, 8 Sept 2023 at 18:56, Ho, Tong <tong...@amd.com> wrote: > > Hi Peter, > > The Versal TRNG device is required to support both TRNG mode and PRNG mode, > and target/guest > software selects and changes the mode at will during runtime. > > I do agree that, in the TRNG mode, the model using qemu_guest_getrandom() > will work without any issues. > > When software selects the PRNG mode, the Versal TRNG device is expected to > output a reproducible > and deterministic sequence of values for a given seed. This is part of the > hardware spec. > > I fail to see how qemu_guest_getrandom() can be used to model such > requirement correctly.
If the hardware documents a specific RNG that it must use, then yes, we should model that, and the comments need to make it clear that we're modelling a very specific thing, not merely "here is an arbitrary PRNG". -- PMM