On 11/29/18 4:39 AM, Benjamin Herrenschmidt wrote: > On Thu, 2018-11-29 at 11:47 +1100, David Gibson wrote: >> >> 1) read/write accessors which take a word number
ok for single word updates of the structures. >> 2) A "get" accessor which copies the whole structure, ok >> but "write" >> accessor which takes a word number. The asymmetry is a bit ugly, but >> it's the non-atomic writeback of the whole structure which I'm most >> uncomfortable with. And, how would you make the update of the whole structure in RAM look "atomic" under QEMU ? > It shouldn't be a big deal though, there are HW facilities to access > the structures "atomically" anyway, due to the caching done by the > XIVE. Are you suggesting that the PowerNV model should update the VPC, EQC, IVC in the VST accessors before updating the VSTs in RAM ? >> 3) A map/unmap interface which gives you / releases a pointer to the >> "live" structure. For powernv that would become >> address_space_map()/unmap(). yes. >> For PAPR it would just be reutn pointer / no-op. ok I think I will introduce these handlers progressively in the patchset. Thanks, C.