All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Mares <mj@ucw.cz>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Rajat Jain <rajatja@google.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] lspci: Indicate if the OS / kernel go out-of-sync on BAR
Date: Sun, 27 May 2018 13:55:32 +0200	[thread overview]
Message-ID: <mj+md-20180527.115322.70863.nikam@ucw.cz> (raw)
In-Reply-To: <20180525183049.GB63280@bhelgaas-glaptop.roam.corp.google.com>

Hello!

> I don't disagree; that does sound like it could be useful.  I just
> don't know the best way to accomplish it.  Seems like you'd have to do
> something in resource_show() to re-read the BAR and validate the
> cache.  I don't know what you do if you find that it's invalid.

I also do not see how to do it in a reasonably simple way.

I checked lspci and it turned out that it already add a "[virtual]"
marker in cases when the BAR is zero (which was this case -- am I right?)
and the kernel reports a non-zero address.

However, it turned out that the check is never triggered on I/O regions,
because the BAR contains a non-zero type bit.

I have modified the check to take into account just the address part
of the BAR. You can check it in the master branch.

				Martin

      parent reply	other threads:[~2018-05-27 11:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16  1:33 [PATCH] lspci: Indicate if the OS / kernel go out-of-sync on BAR Rajat Jain
2018-05-24 22:37 ` Bjorn Helgaas
2018-05-25 16:57   ` Rajat Jain
2018-05-25 18:30     ` Bjorn Helgaas
2018-05-25 18:38       ` Rajat Jain
2018-05-25 18:38         ` Rajat Jain
2018-05-27 11:55       ` Martin Mares [this message]

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=mj+md-20180527.115322.70863.nikam@ucw.cz \
    --to=mj@ucw.cz \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rajatja@google.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.