Re: [PATCH v2 2/2] hw/pflash: implement update buffer for block writes

2024-01-16 Thread Peter Xu
On Tue, Jan 16, 2024 at 05:08:28PM +0100, Philippe Mathieu-Daudé wrote: > On 12/1/24 17:54, Peter Maydell wrote: > > On Mon, 8 Jan 2024 at 13:06, Philippe Mathieu-Daudé > > wrote: > > > > > > Hi Gerd, > > > > > > On 8/1/24 13:53, Philippe Mathieu-Daudé wrote: > > > > From: Gerd Hoffmann > > >

Re: [PATCH v2 2/2] hw/pflash: implement update buffer for block writes

2024-01-16 Thread Peter Maydell
On Tue, 16 Jan 2024 at 16:08, Philippe Mathieu-Daudé wrote: > > On 12/1/24 17:54, Peter Maydell wrote: > > On Mon, 8 Jan 2024 at 13:06, Philippe Mathieu-Daudé > > wrote: > >> > >> Hi Gerd, > >> > >> On 8/1/24 13:53, Philippe Mathieu-Daudé wrote: > >>> From: Gerd Hoffmann > >>> > >>> Add an

Re: [PATCH v2 2/2] hw/pflash: implement update buffer for block writes

2024-01-16 Thread Philippe Mathieu-Daudé
On 12/1/24 17:54, Peter Maydell wrote: On Mon, 8 Jan 2024 at 13:06, Philippe Mathieu-Daudé wrote: Hi Gerd, On 8/1/24 13:53, Philippe Mathieu-Daudé wrote: From: Gerd Hoffmann Add an update buffer where all block updates are staged. Flush or discard updates properly, so we should never see

Re: [PATCH v2 2/2] hw/pflash: implement update buffer for block writes

2024-01-12 Thread Peter Maydell
On Mon, 8 Jan 2024 at 13:06, Philippe Mathieu-Daudé wrote: > > Hi Gerd, > > On 8/1/24 13:53, Philippe Mathieu-Daudé wrote: > > From: Gerd Hoffmann > > > > Add an update buffer where all block updates are staged. > > Flush or discard updates properly, so we should never see > > half-completed

Re: [PATCH v2 2/2] hw/pflash: implement update buffer for block writes

2024-01-09 Thread Richard Henderson
On 1/8/24 23:53, Philippe Mathieu-Daudé wrote: @@ -818,6 +867,9 @@ static void pflash_cfi01_realize(DeviceState *dev, Error **errp) pfl->cmd = 0x00; pfl->status = 0x80; /* WSM ready */ pflash_cfi01_fill_cfi_table(pfl); + +pfl->blk_bytes = g_malloc(pfl->writeblock_size);

Re: [PATCH v2 2/2] hw/pflash: implement update buffer for block writes

2024-01-08 Thread Philippe Mathieu-Daudé
Hi Gerd, On 8/1/24 13:53, Philippe Mathieu-Daudé wrote: From: Gerd Hoffmann Add an update buffer where all block updates are staged. Flush or discard updates properly, so we should never see half-completed block writes in pflash storage. Drop a bunch of FIXME comments ;) Signed-off-by: Gerd

[PATCH v2 2/2] hw/pflash: implement update buffer for block writes

2024-01-08 Thread Philippe Mathieu-Daudé
From: Gerd Hoffmann Add an update buffer where all block updates are staged. Flush or discard updates properly, so we should never see half-completed block writes in pflash storage. Drop a bunch of FIXME comments ;) Signed-off-by: Gerd Hoffmann Message-ID: