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

Chris Wright
2009-12-15T19:50:28Z

* 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.