[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] roms: Flush icache when writing roms to guest m
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] roms: Flush icache when writing roms to guest memory |
Date: |
Sat, 14 Dec 2013 11:58:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 13/12/2013 20:18, Scott Wood ha scritto:
>> Also are you sure flush_icache_range()
>> works correctly when multiple threads (multiple vCPUs,
>> potentially executing on different host CPUs) are involved?
>
> On PPC these cache operations broadcast, and are the architecturally
> defined way of doing self-modifying code.
I expect that to be the same on any cache-coherent system.
On a VIVT cache with shadow paging, some kernel collaboration may be
necessary because you have to flush using guest addresses rather than
host addresses (or alternatively you have to flush a whole context id).
But we can fix the problem when it happens.
Paolo
Re: [Qemu-devel] [PATCH] roms: Flush icache when writing roms to guest memory, Peter Maydell, 2013/12/11