From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings Date: Mon, 2 Mar 2015 18:05:19 +0100 Message-ID: <20150302170519.GB14186@hawk.usersys.redhat.com> References: <20150219175518.GB26965@hawk.usersys.redhat.com> <54E62404.9040702@redhat.com> <20150220142905.GA10942@hawk.usersys.redhat.com> <20150220153626.GB10942@hawk.usersys.redhat.com> <20150224145529.GA5498@hawk.usersys.redhat.com> <20150302163146.GB9686@lvm> <54F49418.5070108@redhat.com> <54F49610.6090000@redhat.com> 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 846434760B for ; Mon, 2 Mar 2015 11:59:39 -0500 (EST) 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 P23u6aejD05f for ; Mon, 2 Mar 2015 11:59:32 -0500 (EST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id AFDBF475D8 for ; Mon, 2 Mar 2015 11:59:32 -0500 (EST) Content-Disposition: inline In-Reply-To: <54F49610.6090000@redhat.com> 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: Laszlo Ersek Cc: KVM devel mailing list , Ard Biesheuvel , Marc Zyngier , Paolo Bonzini , "kvmarm@lists.cs.columbia.edu" , "linux-arm-kernel@lists.infradead.org" List-Id: kvmarm@lists.cs.columbia.edu On Mon, Mar 02, 2015 at 05:55:44PM +0100, Laszlo Ersek wrote: > On 03/02/15 17:47, Paolo Bonzini wrote: > > > > Also, we may want to invalidate the cache for dirty pages before > > returning the dirty bitmap, and probably should do that directly in > > KVM_GET_DIRTY_LOG. > > "I agree." > > If KVM_GET_DIRTY_LOG is supposed to be atomic fetch and clear (from > userspace's aspect), then the cache invalidation should be an atomic > part of it too (from the same aspect). > > (Sorry if I just said something incredibly stupid.) > With the path I'm headed down, all cache maintenance operations will be done before exiting to userspace (and after returning). I was actually already letting a feature creep into this PoC by setting KVM_MEM_LOG_DIRTY_PAGES when we see KVM_MEM_INCOHERENT has been set, and the region isn't readonly. The dirty log would then be used by KVM internally to know exactly which pages need to be invalidated before the exit. drew