From: Avi Kivity Subject: [PATCH 0/5] Fix some mmu/emulator atomicity issues (v2) Date: Mon, 15 Mar 2010 13:59:52 +0200 Message-ID: <1268654397-6650-1-git-send-email-avi@redhat.com> Cc: kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:65274 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936177Ab0COL77 (ORCPT ); Mon, 15 Mar 2010 07:59:59 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2FBxwi3015572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Mar 2010 07:59:58 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2FBxvmG028020 for ; Mon, 15 Mar 2010 07:59:58 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Currently when we emulate a locked operation into a shadowed guest page table, we perform a write rather than a true atomic. This is indicated by the "emulating exchange as write" message that shows up in dmesg. In addition, the pte prefetch operation during invlpg suffered from a race. This was fixed by removing the operation. This patchset fixes both issues and reinstates pte prefetch on invlpg. v3: - rebase against next branch (resolves conflicts via hypercall patch) v2: - fix truncated description for patch 1 - add new patch 4, which fixes a bug in patch 5 Avi Kivity (5): KVM: MMU: Consolidate two guest pte reads in kvm_mmu_pte_write() KVM: Make locked operations truly atomic KVM: Don't follow an atomic operation by a non-atomic one KVM: MMU: Do not instantiate nontrapping spte on unsync page KVM: MMU: Reinstate pte prefetch on invlpg arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mmu.c | 78 +++++++++++++++++---------------- arch/x86/kvm/paging_tmpl.h | 25 ++++++++++- arch/x86/kvm/x86.c | 90 +++++++++++++++++++++++++++------------ 4 files changed, 127 insertions(+), 67 deletions(-)