Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-18 Thread Alistair Francis
On Thu, Jul 14, 2022 at 3:29 AM Jason A. Donenfeld wrote: > > Hi again, > > On Mon, Jul 11, 2022 at 06:45:42PM +0200, Jason A. Donenfeld wrote: > > I've reproduced the problem and determined the root cause. This is a > > generic issue with the mmio get_cycles() implementation before 5.9 on > > no-

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-13 Thread Jason A. Donenfeld
Hi again, On Mon, Jul 11, 2022 at 06:45:42PM +0200, Jason A. Donenfeld wrote: > I've reproduced the problem and determined the root cause. This is a > generic issue with the mmio get_cycles() implementation before 5.9 on > no-MMU configs, which was fixed during the 5.9 cycle. I don't believe > tha

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-11 Thread Jason A. Donenfeld
Hi Alistair, On Mon, Jul 11, 2022 at 01:36:28PM +1000, Alistair Francis wrote: > On Mon, Jul 11, 2022 at 10:28 AM Jason A. Donenfeld wrote: > > > > On 7/11/22, Alistair Francis wrote: > > > On Fri, Jul 8, 2022 at 7:56 PM Jason A. Donenfeld wrote: > > >> > > >> Hi Alistair, > > >> > > >> On 7/8/

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-10 Thread Alistair Francis
On Mon, Jul 11, 2022 at 10:28 AM Jason A. Donenfeld wrote: > > On 7/11/22, Alistair Francis wrote: > > On Fri, Jul 8, 2022 at 7:56 PM Jason A. Donenfeld wrote: > >> > >> Hi Alistair, > >> > >> On 7/8/22, Alistair Francis wrote: > >> > >> >> > but I think that's just the way things go unfortunat

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-10 Thread Jason A. Donenfeld
On 7/11/22, Alistair Francis wrote: > On Fri, Jul 8, 2022 at 7:56 PM Jason A. Donenfeld wrote: >> >> Hi Alistair, >> >> On 7/8/22, Alistair Francis wrote: >> >> >> > but I think that's just the way things go unfortunately. >> > >> > Hmm... That's a pain. So there is a bug in older kernels where

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-10 Thread Alistair Francis
On Fri, Jul 8, 2022 at 7:56 PM Jason A. Donenfeld wrote: > > Hi Alistair, > > On 7/8/22, Alistair Francis wrote: > > >> > but I think that's just the way things go unfortunately. > > > > Hmm... That's a pain. So there is a bug in older kernels where they > > won't boot if we specify this? > > > >

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-08 Thread Jason A. Donenfeld
Hi Alistair, On 7/8/22, Alistair Francis wrote: >> > but I think that's just the way things go unfortunately. > > Hmm... That's a pain. So there is a bug in older kernels where they > won't boot if we specify this? > > Can you point to the fixes? Actually, in trying to reproduce this, I don't a

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-08 Thread Alistair Francis
On Thu, Jul 7, 2022 at 11:04 AM Jason A. Donenfeld wrote: > > Hey Alistair, > > On Tue, Jul 05, 2022 at 03:09:09AM +0200, Jason A. Donenfeld wrote: > > Hi Alistair, > > > > On Wed, Jun 29, 2022 at 4:09 AM Alistair Francis > > wrote: > > > I have a Linux 5.8 test case that is failing due to this

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-06 Thread Jason A. Donenfeld
Hey Alistair, On Tue, Jul 05, 2022 at 03:09:09AM +0200, Jason A. Donenfeld wrote: > Hi Alistair, > > On Wed, Jun 29, 2022 at 4:09 AM Alistair Francis wrote: > > I have a Linux 5.8 test case that is failing due to this patch. > > Before I started fixing things in random.c, there were a lot of ea

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-04 Thread Jason A. Donenfeld
Hi Alistair, On Wed, Jun 29, 2022 at 4:09 AM Alistair Francis wrote: > I have a Linux 5.8 test case that is failing due to this patch. Before I started fixing things in random.c, there were a lot of early boot bugs with the RNG in Linux. I backported the fixes for these to all stable kernels. It

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-28 Thread Alistair Francis
On Mon, Jun 13, 2022 at 10:10 PM Jason A. Donenfeld wrote: > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > initialize early. Set this using the usual guest random number > generation function. This is confirmed to successfully initialize the > RNG on Linux 5.19-rc2.

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-16 Thread Alistair Francis
On Thu, Jun 16, 2022 at 8:01 PM Jason A. Donenfeld wrote: > > Hi Alistair, > > On Thu, Jun 16, 2022 at 12:32:36PM +1000, Alistair Francis wrote: > > Applied to riscv-to-apply.next with the full stop removed > > Great, thanks. Just wondering: am I looking in the right repo? I don't > see it here: h

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-16 Thread Jason A. Donenfeld
Hi Alistair, On Thu, Jun 16, 2022 at 12:32:36PM +1000, Alistair Francis wrote: > Applied to riscv-to-apply.next with the full stop removed Great, thanks. Just wondering: am I looking in the right repo? I don't see it here: https://github.com/alistair23/qemu/commits/riscv-to-apply.next Jason

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-15 Thread Alistair Francis
On Wed, Jun 15, 2022 at 2:07 PM Bin Meng wrote: > > On Mon, Jun 13, 2022 at 8:08 PM Jason A. Donenfeld wrote: > > > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > > initialize early. Set this using the usual guest random number > > generation function. This is confirm

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-14 Thread Bin Meng
On Mon, Jun 13, 2022 at 8:08 PM Jason A. Donenfeld wrote: > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > initialize early. Set this using the usual guest random number > generation function. This is confirmed to successfully initialize the > RNG on Linux 5.19-rc2. >

[PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-13 Thread Jason A. Donenfeld
If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to initialize early. Set this using the usual guest random number generation function. This is confirmed to successfully initialize the RNG on Linux 5.19-rc2. Cc: Alistair Francis Signed-off-by: Jason A. Donenfeld --- hw/riscv