From: Avi Kivity Subject: [PATCH 0/4] Fix some mmu/emulator atomicity issues Date: Mon, 15 Feb 2010 14:48:25 +0200 Message-ID: <1266238109-30280-1-git-send-email-avi@redhat.com> To: Marcelo Tosatti , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8178 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585Ab0BOMsb (ORCPT ); Mon, 15 Feb 2010 07:48:31 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1FCmUA6012198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Feb 2010 07:48:30 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1FCmT8J032049 for ; Mon, 15 Feb 2010 07:48:30 -0500 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. Avi Kivity (4): KVM: MMU: Consolidate two guest pte reads in kvm_mmu_pte_write() KVM: Make locked operations truly atomic KVM: Don't follow an atmoic operation by a non-atomic one 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 | 15 ++++++ arch/x86/kvm/x86.c | 101 ++++++++++++++++++++++++++++----------- 4 files changed, 129 insertions(+), 66 deletions(-)