From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755476AbbFRNTY (ORCPT ); Thu, 18 Jun 2015 09:19:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37551 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755380AbbFRNTL (ORCPT ); Thu, 18 Jun 2015 09:19:11 -0400 Date: Thu, 18 Jun 2015 15:19:06 +0200 From: "Michael S. Tsirkin" To: Paolo Bonzini Cc: Igor Mammedov , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, andrey@xdel.ru Subject: Re: [PATCH 3/5] vhost: support upto 509 memory regions Message-ID: <20150618142455-mutt-send-email-mst@redhat.com> References: <20150617163028-mutt-send-email-mst@redhat.com> <20150617171257.11fe405d@nial.brq.redhat.com> <20150617173736-mutt-send-email-mst@redhat.com> <20150617180921.7972345d@igors-macbook-pro.local> <20150617182917-mutt-send-email-mst@redhat.com> <20150618111224.0aa6dff7@nial.brq.redhat.com> <20150618112004-mutt-send-email-mst@redhat.com> <20150618133912.63636a47@nial.brq.redhat.com> <20150618134040-mutt-send-email-mst@redhat.com> <5582B088.1090207@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5582B088.1090207@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 18, 2015 at 01:50:32PM +0200, Paolo Bonzini wrote: > > > On 18/06/2015 13:41, Michael S. Tsirkin wrote: > > On Thu, Jun 18, 2015 at 01:39:12PM +0200, Igor Mammedov wrote: > >> Lets leave decision upto users instead of making them live with > >> crashing guests. > > > > Come on, let's fix it in userspace. > > It's not trivial to fix it in userspace. Since QEMU uses RCU there > isn't a single memory map to use for a linear gpa->hva map. Could you elaborate? I'm confused by this mention of RCU. You use RCU for accesses to the memory map, correct? So memory map itself is a write side operation, as such all you need to do is take some kind of lock to prevent conflicting with other memory maps, do rcu sync under this lock. > I find it absurd that we're fighting over 12K of memory. > > Paolo I wouldn't worry so much if it didn't affect kernel/userspace API. Need to be careful there. -- MST