@@ -67,7 +67,7 @@ following two cases:
67672. Write-Protection: The SPTE is present and the fault is caused by
6868 write-protect. That means we just need to change the W bit of the spte.
6969
70- What we use to avoid all the race is the Host-writable bit and MMU-writable bit
70+ What we use to avoid all the races is the Host-writable bit and MMU-writable bit
7171on the spte:
7272
7373- Host-writable means the gfn is writable in the host kernel page tables and in
@@ -130,7 +130,7 @@ to gfn. For indirect sp, we disabled fast page fault for simplicity.
130130A solution for indirect sp could be to pin the gfn, for example via
131131kvm_vcpu_gfn_to_pfn_atomic, before the cmpxchg. After the pinning:
132132
133- - We have held the refcount of pfn that means the pfn can not be freed and
133+ - We have held the refcount of pfn; that means the pfn can not be freed and
134134 be reused for another gfn.
135135- The pfn is writable and therefore it cannot be shared between different gfns
136136 by KSM.
@@ -186,22 +186,22 @@ writable between reading spte and updating spte. Like below case:
186186The Dirty bit is lost in this case.
187187
188188In order to avoid this kind of issue, we always treat the spte as "volatile"
189- if it can be updated out of mmu-lock, see spte_has_volatile_bits(), it means,
189+ if it can be updated out of mmu-lock [ see spte_has_volatile_bits()]; it means
190190the spte is always atomically updated in this case.
191191
1921923) flush tlbs due to spte updated
193193
194- If the spte is updated from writable to readonly , we should flush all TLBs,
194+ If the spte is updated from writable to read-only , we should flush all TLBs,
195195otherwise rmap_write_protect will find a read-only spte, even though the
196196writable spte might be cached on a CPU's TLB.
197197
198198As mentioned before, the spte can be updated to writable out of mmu-lock on
199- fast page fault path, in order to easily audit the path, we see if TLBs need
200- be flushed caused by this reason in mmu_spte_update() since this is a common
199+ fast page fault path. In order to easily audit the path, we see if TLBs needing
200+ to be flushed caused this reason in mmu_spte_update() since this is a common
201201function to update spte (present -> present).
202202
203203Since the spte is "volatile" if it can be updated out of mmu-lock, we always
204- atomically update the spte, the race caused by fast page fault can be avoided,
204+ atomically update the spte and the race caused by fast page fault can be avoided.
205205See the comments in spte_has_volatile_bits() and mmu_spte_update().
206206
207207Lockless Access Tracking:
@@ -283,9 +283,9 @@ time it will be set using the Dirty tracking mechanism described above.
283283:Arch: x86
284284:Protects: wakeup_vcpus_on_cpu
285285:Comment: This is a per-CPU lock and it is used for VT-d posted-interrupts.
286- When VT-d posted-interrupts is supported and the VM has assigned
286+ When VT-d posted-interrupts are supported and the VM has assigned
287287 devices, we put the blocked vCPU on the list blocked_vcpu_on_cpu
288- protected by blocked_vcpu_on_cpu_lock, when VT-d hardware issues
288+ protected by blocked_vcpu_on_cpu_lock. When VT-d hardware issues
289289 wakeup notification event since external interrupts from the
290290 assigned devices happens, we will find the vCPU on the list to
291291 wakeup.
0 commit comments