From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2 5/6] kvm: add PV MMIO Date: Thu, 04 Apr 2013 16:56:11 +0200 Message-ID: <515D948B.8080407@redhat.com> References: <183f242d45ed0e10dd6feb73fd3f434738c08ae4.1365071407.git.mst@redhat.com> <515D7613.4010805@redhat.com> <20130404131015.GF6467@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, gleb@redhat.com, mtosatti@redhat.com, Avi Kivity To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:2536 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762515Ab3DDO4U (ORCPT ); Thu, 4 Apr 2013 10:56:20 -0400 In-Reply-To: <20130404131015.GF6467@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 04/04/2013 15:10, Michael S. Tsirkin ha scritto: > > I would like Avi to comment on this, because I think this is not the > > "memory-API approved" way of doing things. You need KVM to define its > > own AddressSpace, and make KVM's listener use > > memory_region_to_address_space to figure out if it is for PV MMIO. > > > > To handle accesses from TCG, the PV AddressSpace can simply have just an > > alias to the actual MemoryRegion where the doorbell is. > > This is not really different from other eventfd flags like datamatch. > Separate address space is not appropriate here. > This is regular memory space, KVM eventfd simply has a flag that says > "guest is well behaved so please make eventfd go faster". Having a separate address space would match what you do in the kernel though. I just don't like functions with a dozen arguments... Can you just make datamatch and pv a single flags argument, as is the case with the KVM API? Paolo