[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/5] pflash: flush rom device memory region
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/5] pflash: flush rom device memory region |
Date: |
Fri, 25 Jan 2019 10:28:42 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Jan 24, 2019 at 12:11:55PM +0100, Philippe Mathieu-Daudé wrote:
> On 1/23/19 10:22 PM, Stefan Hajnoczi wrote:
> > pflash devices should mark the memory region dirty and invalidate TBs
> > after directly writing to the RAM backing the ROM device.
> >
> > Note that pflash_cfi01_get_memory() is used by several machine types to
> > populate ROM contents directly. Callers are untouched by this patch
> > because they only modify memory before the guest is started.
...
> > @@ -763,6 +766,8 @@ static void pflash_cfi01_realize(DeviceState *dev,
> > Error **errp)
> > error_setg(errp, "failed to read the initial flash content");
> > return;
> > }
> > +
> > + memory_region_flush_rom_device(&pfl->mem, 0, total_len);
>
> The device realize() is also executed before the guest is started, is
> this call really necessary?
My rationale was that machine init only happens before the guest is
started while ->realize() is called by hotplug too.
That said, can pflash devices be hotplugged?
If you guys prefer not flushing from pflash ->realize() then I'll drop
it.
Stefan
signature.asc
Description: PGP signature
[Qemu-devel] [PATCH v2 1/5] memory: add memory_region_flush_rom_device(), Stefan Hajnoczi, 2019/01/23
[Qemu-devel] [PATCH v2 3/5] hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories, Stefan Hajnoczi, 2019/01/23
[Qemu-devel] [PATCH v2 5/5] tests/microbit-test: Add tests for nRF51 NVMC, Stefan Hajnoczi, 2019/01/23
[Qemu-devel] [PATCH v2 4/5] arm: Instantiate NRF51 special NVM's and NVMC, Stefan Hajnoczi, 2019/01/23
Re: [Qemu-devel] [PATCH v2 0/5] arm: microbit Non-Volatile Memory Controller, Peter Maydell, 2019/01/24