Re: [kvm-unit-tests PATCH v3 3/6] pci: Accomodate 64 bit BARs in pci_dev::resource[]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux