On 15/12/2014 13:56, Mark Burton wrote: > A third proposal is to mark pages as IO when a ld/st ex is performed to > them. Then to augment the memory API to indicate that a ld/st ex is in > hand, allowing the memory chain to decide if it should allow the write > or cause a fault. This would seem to be the closest approach to the real > H/W. However it means marking pages as IO (which could cause us issues > if there was code on that page?, or slow things down) - and it means > adding to the memory API.
What are the intended semantics for reads/writes from the outside world? Should they cause the ll/sc pair to retry or not? If not, it should not need any change to the memory API; you can do it entirely within cputlb.c, roughly the same as the handling of TLB_NOTDIRTY. It also marks pages as I/O, but only internally within TCG. Paolo