qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device


From: Peter Maydell
Subject: Re: [PATCH 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device
Date: Fri, 8 Sep 2023 19:34:53 +0100

On Fri, 8 Sept 2023 at 18:56, Ho, Tong <tong.ho@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]