Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165236827
D15506.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15506.id.diff
View Options
Index: head/sys/amd64/amd64/pmap.c
===================================================================
--- head/sys/amd64/amd64/pmap.c
+++ head/sys/amd64/amd64/pmap.c
@@ -1721,6 +1721,18 @@
if (cpuid != i)
pmap->pm_pcids[i].pm_gen = 0;
}
+
+ /*
+ * The fence is between stores to pm_gen and the read of
+ * the pm_active mask. We need to ensure that it is
+ * impossible for us to miss the bit update in pm_active
+ * and simultaneously observe a non-zero pm_gen in
+ * pmap_activate_sw(), otherwise TLB update is missed.
+ * Without the fence, IA32 allows such an outcome.
+ * Note that pm_active is updated by a locked operation,
+ * which provides the reciprocal fence.
+ */
+ atomic_thread_fence_seq_cst();
}
mask = &pmap->pm_active;
}
@@ -1792,6 +1804,8 @@
if (cpuid != i)
pmap->pm_pcids[i].pm_gen = 0;
}
+ /* See comment int pmap_invalidate_page(). */
+ atomic_thread_fence_seq_cst();
}
mask = &pmap->pm_active;
}
@@ -1863,6 +1877,8 @@
if (cpuid != i)
pmap->pm_pcids[i].pm_gen = 0;
}
+ /* See comment int pmap_invalidate_page(). */
+ atomic_thread_fence_seq_cst();
}
mask = &pmap->pm_active;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 8, 2:01 AM (16 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36196444
Default Alt Text
D15506.id.diff (1 KB)
Attached To
Mode
D15506: Add missed barrier for pm_gen/pm_active interaction.
Attached
Detach File
Event Timeline
Log In to Comment