From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 1/3] Enable non page boundary BAR device assignment Date: Tue, 15 Dec 2009 23:12:36 +0200 Message-ID: <20091215211236.GD26712@redhat.com> References: <1260901828-5145-1-git-send-email-agraf@suse.de> <1260901828-5145-2-git-send-email-agraf@suse.de> <20091215183840.GA25724@redhat.com> <4B27D9C7.7020402@suse.de> <20091215185018.GA25764@redhat.com> <4B27DDAA.4040802@suse.de> <20091215195023.GF15084@x200.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Graf , kvm list , Gleb Natapov , Muli Ben-Yehuda To: Chris Wright Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18299 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755537AbZLOVPX (ORCPT ); Tue, 15 Dec 2009 16:15:23 -0500 Content-Disposition: inline In-Reply-To: <20091215195023.GF15084@x200.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Dec 15, 2009 at 11:50:23AM -0800, Chris Wright wrote: > * Alexander Graf (agraf@suse.de) wrote: > > >>>> @@ -405,7 +511,7 @@ static int assigned_dev_register_regions(PCIRegion *io_regions, > > >>>> } else { > > >>>> pci_dev->v_addrs[i].u.r_virtbase = > > >>>> mmap(NULL, > > >>>> - (cur_region->size + 0xFFF) & 0xFFFFF000, > > >>>> + cur_region->size, > > >>>> > > >>>> > > >>> Hmm, one assumes this code did work at some point ... > > >>> do you know why was it done this way? > > >>> > > >> Nope :-). > > > > > > So maybe keep it that way or make the change in a separate patch. > > > > Well we're sure the normal path is size aligned, no? In fact, you > > recommended I should change the code to what this looks like ;-). > > Sort of moot. The typical case is page size aligned, and the kernel is > going to round up anyway. Why was this code here originally then? Any idea? -- MST