Skip to contentSkip to conversation

softmmu: clarify meaning of TLB_NOTDIRTY bit

PATCH New Stefan Hajnoczi 1 participant 1 message Nov 26, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 softmmu: clarify meaning of TLB_NOTDIRTY bit

It wasn't obvious to me why the TLB entries should cache the memory dirty bitmap state.

---
 include/exec/cpu-all.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/exec/cpu-all.h +2 -1
index c085804..e71e47e 100644
@@ -329,7 +329,8 @@ extern RAMList ram_list;
 /* Zero if TLB entry is valid.  */
 #define TLB_INVALID_MASK   (1 << 3)
 /* Set if TLB entry references a clean RAM page.  The iotlb entry will
-   contain the page physical address.  */
+   contain the page physical address.  Forces us to take the slow path so pages
+   get marked dirty, whereas the fast path does not mark pages dirty.  */
 #define TLB_NOTDIRTY    (1 << 4)
 /* Set if TLB entry is an IO callback.  */
 #define TLB_MMIO        (1 << 5)
Signature · 1 line
2.1.0