On Tue, Feb 28, 2017 at 05:55:01PM +0800, Peter Xu wrote: > > bool pci_bar_is_valid(struct pci_dev *dev, int bar_num) > > { > > return dev->resource[bar_num] != INVALID_PHYS_ADDR; > > } (*) > I see. Could I ask why we cannot just use INVALID_PHYS_ADDR for > res[bar_num+1] when bar_num is 64bit (just like what patch 2 did)? INVALID_PHYS_ADDR is already used to mark unimplemented BARs (*). INVALID_PHYS_ADDR is also confusing if we think of index into high-part of 64-bit address. A high-part is apparently valid. > Thanks, > > -- peterx