All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: kvm@vger.kernel.org, Thomas Huth <thuth@redhat.com>,
	Andrew Jones <drjones@redhat.com>
Subject: Re: [kvm-unit-tests PATCH v3 3/6] pci: Accomodate 64 bit BARs in pci_dev::resource[]
Date: Tue, 28 Feb 2017 11:22:14 +0100	[thread overview]
Message-ID: <20170228102213.GD6583@agordeev.lab.eng.brq.redhat.com> (raw)
In-Reply-To: <20170228095501.GB13926@pxdev.xzpeter.org>

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

  reply	other threads:[~2017-02-28 10:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 14:12 [kvm-unit-tests PATCH v3 0/6] pci: Complete conversion of PCI API to struct pci_dev Alexander Gordeev
2017-02-27 14:12 ` [kvm-unit-tests PATCH v3 1/6] pci: pci-host-generic: Use INVALID_PHYS_ADDR instead of ~0 Alexander Gordeev
2017-02-27 14:12 ` [kvm-unit-tests PATCH v3 2/6] pci: Do not use 0 for unimplemented BARs in pci_dev::resource[] Alexander Gordeev
2017-02-27 14:12 ` [kvm-unit-tests PATCH v3 3/6] pci: Accomodate 64 bit " Alexander Gordeev
2017-02-28  7:02   ` Peter Xu
2017-02-28  9:02     ` Andrew Jones
2017-02-28  9:31       ` Peter Xu
2017-02-28  9:48         ` Andrew Jones
2017-02-28  9:51     ` Alexander Gordeev
2017-02-28  9:55       ` Peter Xu
2017-02-28 10:22         ` Alexander Gordeev [this message]
2017-02-28 10:40           ` Peter Xu
2017-02-28 10:41           ` Peter Xu
2017-02-28 11:11             ` Alexander Gordeev
2017-02-28 11:56               ` Andrew Jones
2017-02-27 14:12 ` [kvm-unit-tests PATCH v3 4/6] pci: Turn struct pci_dev into device handle for PCI functions Alexander Gordeev
2017-02-27 18:35   ` Andrew Jones
2017-02-27 14:12 ` [kvm-unit-tests PATCH v3 5/6] pci: Rework pci_bar_is_valid() Alexander Gordeev
2017-02-27 14:12 ` [kvm-unit-tests PATCH v3 6/6] pci: Make PCI API consistent wrt using struct pci_dev Alexander Gordeev
2017-02-27 18:37 ` [kvm-unit-tests PATCH v3 0/6] pci: Complete conversion of PCI API to " Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170228102213.GD6583@agordeev.lab.eng.brq.redhat.com \
    --to=agordeev@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=peterx@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.