From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED Date: Thu, 14 May 2015 15:03:18 +0200 Message-ID: <20150514130318.GC12812@localhost.localdomain> References: <1431516714-25816-1-git-send-email-drjones@redhat.com> <20150514103150.GA12812@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 31609514D5 for ; Thu, 14 May 2015 08:54:28 -0400 (EDT) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PiG5KkCQtPrj for ; Thu, 14 May 2015 08:54:26 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 6B756514D2 for ; Thu, 14 May 2015 08:54:26 -0400 (EDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Peter Maydell Cc: Ard Biesheuvel , Marc Zyngier , Catalin Marinas , QEMU Developers , Paolo Bonzini , Laszlo Ersek , "kvmarm@lists.cs.columbia.edu" List-Id: kvmarm@lists.cs.columbia.edu On Thu, May 14, 2015 at 11:37:46AM +0100, Peter Maydell wrote: > On 14 May 2015 at 11:31, Andrew Jones wrote: > > Forgot to (4): switch from setting userspace's mapping to > > device memory to normal, non-cacheable. Using device memory > > caused a problem that Alex Graf found, and Peter Maydell suggested > > using normal, non-cacheable instead. > > Did you check that non-cacheable is definitely the correct > kind of Normal memory attribute we want? (ie not write-through). I was concerned that write-through wouldn't be sufficient. If the guest writes to its non-cached memory, and QEMU needs to see what it wrote, then won't write-through fail to work? Unless we some how invalidate the cache first? drew From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yssne-0005A8-9L for qemu-devel@nongnu.org; Thu, 14 May 2015 09:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YssnY-0002IH-NY for qemu-devel@nongnu.org; Thu, 14 May 2015 09:03:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YssnY-0002GW-Gs for qemu-devel@nongnu.org; Thu, 14 May 2015 09:03:36 -0400 Date: Thu, 14 May 2015 15:03:18 +0200 From: Andrew Jones Message-ID: <20150514130318.GC12812@localhost.localdomain> References: <1431516714-25816-1-git-send-email-drjones@redhat.com> <20150514103150.GA12812@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Ard Biesheuvel , Marc Zyngier , Catalin Marinas , QEMU Developers , Alexander Graf , Paolo Bonzini , Laszlo Ersek , "kvmarm@lists.cs.columbia.edu" , Christoffer Dall On Thu, May 14, 2015 at 11:37:46AM +0100, Peter Maydell wrote: > On 14 May 2015 at 11:31, Andrew Jones wrote: > > Forgot to (4): switch from setting userspace's mapping to > > device memory to normal, non-cacheable. Using device memory > > caused a problem that Alex Graf found, and Peter Maydell suggested > > using normal, non-cacheable instead. > > Did you check that non-cacheable is definitely the correct > kind of Normal memory attribute we want? (ie not write-through). I was concerned that write-through wouldn't be sufficient. If the guest writes to its non-cached memory, and QEMU needs to see what it wrote, then won't write-through fail to work? Unless we some how invalidate the cache first? drew