> On 11.12.2013, at 16:15, Alexander Graf < ag...@suse.de > wrote: > > Well, this really is a simplified view of the world. > > On real hardware the system boots up with caches disabled. Firmware is > then responsible for enabling caches and flushing things as it goes. > Firmware loads the kernel into ram, flushing the icache on those regions > it wrote to along the way. The kernel boots and every time it faults in a > page, it flushes caches for that page. > > So really the problem is that we're skipping the "cache disabled > firmware" step. With this patch, we're simulating a bootloader's behavior > when writing a blob into guest memory. Since that's really what we are > trying to behave like - a bootloader.
The cache synchronization is required by self-modifying code not just bootloaders. -Mike