From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpYvQ-0001RH-AF for qemu-devel@nongnu.org; Tue, 05 May 2015 05:14:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpYvJ-0007JQ-MJ for qemu-devel@nongnu.org; Tue, 05 May 2015 05:14:00 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:33396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpYvJ-0007JK-GR for qemu-devel@nongnu.org; Tue, 05 May 2015 05:13:53 -0400 Received: by wgin8 with SMTP id n8so175289951wgi.0 for ; Tue, 05 May 2015 02:13:53 -0700 (PDT) From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Fangu=C3=A8de?= Date: Tue, 5 May 2015 11:13:43 +0200 Message-Id: <1430817227-6278-1-git-send-email-j.fanguede@virtualopensystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC 0/4] arm/arm64: KVM: Get around cache incoherency List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?J=C3=A9r=C3=A9my=20Fangu=C3=A8de?= , tech@virtualopensystems.com, kvmarm@lists.cs.columbia.edu This RFC series shows how we can solve cache incohenrency issues on ARM/ARM64. This implementation uses an ioctl that flushes the data cache for a given range of the guest physical memory, this possible solution was already broached in the previous discussion [1][2]. Each access (read or write) to the guest memory that could lead to inconsistency is flushed if needed. A light optimization is done to minimize the ioctl call. Currently tested with the following devices: e1000, megasas, lsi53c895a, nec-usb-xhci, usb-ehci (with usb-host, usb-tablet, usb-kbd and usb-mouse), which were failling with KVM and now work fine with this patch. The kernel needs this patch: [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl [1] https://lists.cs.columbia.edu/pipermail/kvmarm/2015-February/013593.html [2] https://lists.nongnu.org/archive/html/qemu-devel/2015-03/msg01254.html Jérémy Fanguède (4): linux-headers update target-arm/kvm: Flush data cache support kvm-all: Pre-run cache coherency maintenance exec: Flush data cache when needed exec.c | 19 ++++++++++++++++++ include/sysemu/kvm.h | 3 +++ kvm-all.c | 1 + linux-headers/linux/kvm.h | 6 ++++++ stubs/kvm.c | 9 +++++++++ target-arm/kvm.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 89 insertions(+) -- 1.9.1