From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: KVM swapping with mmu notifiers Date: Mon, 21 Jan 2008 12:37:15 +0100 Message-ID: <20080121113715.GE6970@v2.random> References: <20080114134539.GB15200@dmt> <478B6CFF.9070801@qumranet.com> <20080114142457.GF7062@v2.random> <478B833E.1020801@qumranet.com> <20080114174447.GA30812@v2.random> <478CC5D3.2040201@qumranet.com> <20080115155253.GA7059@v2.random> <478CD7CF.3080603@qumranet.com> <20080115160936.GC7059@v2.random> <479365B3.3000600@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <479365B3.3000600-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Sun, Jan 20, 2008 at 05:16:03PM +0200, Avi Kivity wrote: > Yes, it's supposed to work (we can't prevent userspace from doing it). Hmm, I think we already prevent it, so I don't think I need to update my swap code until the below is removed. /* Check for overlaps */ r = -EEXIST; for (i = 0; i < KVM_MEMORY_SLOTS; ++i) { struct kvm_memory_slot *s = &kvm->memslots[i]; if (s == memslot) continue; if (!((base_gfn + npages <= s->base_gfn) || (base_gfn >= s->base_gfn + s->npages))) goto out_free; } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/