Re: [PATCH 1/3] Enable non page boundary BAR device assignment

Michael S. Tsirkin
2009-12-15T21:15:23Z

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