From patchwork Mon Jun 29 12:20:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 32940 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5TCKk0E025975 for ; Mon, 29 Jun 2009 12:20:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751621AbZF2MUi (ORCPT ); Mon, 29 Jun 2009 08:20:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751476AbZF2MUi (ORCPT ); Mon, 29 Jun 2009 08:20:38 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53683 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbZF2MUh (ORCPT ); Mon, 29 Jun 2009 08:20:37 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5TCKbPS032517; Mon, 29 Jun 2009 08:20:37 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5TCKaxQ012056; Mon, 29 Jun 2009 08:20:36 -0400 Received: from redhat.com (vpn-6-102.tlv.redhat.com [10.35.6.102]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5TCKXuX016384; Mon, 29 Jun 2009 08:20:33 -0400 Date: Mon, 29 Jun 2009 15:20:04 +0300 From: "Michael S. Tsirkin" To: Gregory Haskins , avi@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mtosatti@redhat.com, paulmck@linux.vnet.ibm.com, markmc@redhat.com Subject: Re: [PATCHv3 4/4] kvm: remove in_range from io devices Message-ID: <20090629122004.GA21640@redhat.com> References: <20090629120919.GE21273@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090629120919.GE21273@redhat.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Jun 29, 2009 at 03:09:19PM +0300, Michael S. Tsirkin wrote: > This changes bus accesses to use high-level kvm_io_bus_read/kvm_io_bus_write > functions. in_range now becomes unused so it is removed from device ops in > favor of read/write callbacks performing range checks internally. > > This allows aliasing (mostly for in-kernel virtio), as well as better error > handling by making it possible to pass errors up to userspace. > > Signed-off-by: Michael S. Tsirkin Ugh, forgot this trivial typo fix. Sorry. --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 790bd55..82e76da 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2276,7 +2276,7 @@ static int vcpu_mmio_read(struct kvm_vcpu *vcpu, gpa_t addr, int len, void *v) !kvm_iodevice_read(&vcpu->arch.apic->dev, addr, len, v)) return 0; - return kvm_io_bus_read(vcpu->kvm, &vcpu->kvm->mmio_bus, addr, len, v); + return kvm_io_bus_read(&vcpu->kvm->mmio_bus, addr, len, v); } static int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes,