)]}'
{
  "commit": "f7d9c7b7b902f9f532738d47593d9679b0b182d9",
  "tree": "61af54605ead13b71f664a0ce4776720d10a3ef1",
  "parents": [
    "8c35f237fb5664d30aa90448c3d6cea0cbb43f35"
  ],
  "author": {
    "name": "Avi Kivity",
    "email": "avi@qumranet.com",
    "time": "Tue Feb 26 22:12:10 2008 +0200"
  },
  "committer": {
    "name": "Avi Kivity",
    "email": "avi@qumranet.com",
    "time": "Tue Mar 04 15:19:49 2008 +0200"
  },
  "message": "KVM: MMU: Fix race when instantiating a shadow pte\n\nFor improved concurrency, the guest walk is performed concurrently with other\nvcpus.  This means that we need to revalidate the guest ptes once we have\nwrite-protected the guest page tables, at which point they can no longer be\nmodified.\n\nThe current code attempts to avoid this check if the shadow page table is not\nnew, on the assumption that if it has existed before, the guest could not have\nmodified the pte without the shadow lock.  However the assumption is incorrect,\nas the racing vcpu could have modified the pte, then instantiated the shadow\npage, before our vcpu regains control:\n\n  vcpu0        vcpu1\n\n  fault\n  walk pte\n\n               modify pte\n               fault in same pagetable\n               instantiate shadow page\n\n  lookup shadow page\n  conclude it is old\n  instantiate spte based on stale guest pte\n\nWe could do something clever with generation counters, but a test run by\nMarcelo suggests this is unnecessary and we can just do the revalidation\nunconditionally.  The pte will be in the processor cache and the check can\nbe quite fast.\n\nSigned-off-by: Avi Kivity \u003cavi@qumranet.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "194ece6974e6619953ef183a1dc207928dc6bca8",
      "old_mode": 33188,
      "old_path": "arch/x86/kvm/mmu.c",
      "new_id": "d8172aabc660de7503c43b697fea470d81f7eb9a",
      "new_mode": 33188,
      "new_path": "arch/x86/kvm/mmu.c"
    },
    {
      "type": "modify",
      "old_id": "5588fa594b61616af2daaea2852c471f97526c90",
      "old_mode": 33188,
      "old_path": "arch/x86/kvm/paging_tmpl.h",
      "new_id": "ecc0856268c47c8c7a5c5773ac0d239d37dbc58e",
      "new_mode": 33188,
      "new_path": "arch/x86/kvm/paging_tmpl.h"
    }
  ]
}
