diff options
author | Jason Jin <Jason.Jin@freescale.com> | 2015-03-19 05:40:14 (GMT) |
---|---|---|
committer | Jason Jin <Jason.Jin@freescale.com> | 2015-03-19 05:40:14 (GMT) |
commit | b2d58e506b33b18574807e63007e87ebca0f9c07 (patch) | |
tree | fc2afd772ba5cdac0dd091f65c492695b27d9a17 /Documentation/virtual | |
parent | 2bbe09ef71ce8446ba0b3e29df2099150e9e6fdf (diff) | |
parent | eb985cb9b5e02d470870617b41fa51a1d9360c7f (diff) | |
download | linux-fsl-qoriq-b2d58e506b33b18574807e63007e87ebca0f9c07.tar.xz |
Merge branch 'qoriq-sdk' into LS1-SDK
Diffstat (limited to 'Documentation/virtual')
-rw-r--r-- | Documentation/virtual/kvm/mmu.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt index 2908941..53838d9 100644 --- a/Documentation/virtual/kvm/mmu.txt +++ b/Documentation/virtual/kvm/mmu.txt @@ -425,6 +425,20 @@ fault through the slow path. Since only 19 bits are used to store generation-number on mmio spte, all pages are zapped when there is an overflow. +Unfortunately, a single memory access might access kvm_memslots(kvm) multiple +times, the last one happening when the generation number is retrieved and +stored into the MMIO spte. Thus, the MMIO spte might be created based on +out-of-date information, but with an up-to-date generation number. + +To avoid this, the generation number is incremented again after synchronize_srcu +returns; thus, the low bit of kvm_memslots(kvm)->generation is only 1 during a +memslot update, while some SRCU readers might be using the old copy. We do not +want to use an MMIO sptes created with an odd generation number, and we can do +this without losing a bit in the MMIO spte. The low bit of the generation +is not stored in MMIO spte, and presumed zero when it is extracted out of the +spte. If KVM is unlucky and creates an MMIO spte while the low bit is 1, +the next access to the spte will always be a cache miss. + Further reading =============== |