From: "M. Vefa Bicakci" <m.v.b@runbox.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Platform Driver <platform-driver-x86@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>,
Vishwanath Somayaji <vishwanath.somayaji@intel.com>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>
Subject: Re: [PATCH] platform/x86: intel_pmc_core: Do not ioremap RAM
Date: Fri, 16 Aug 2019 08:20:36 -0400 [thread overview]
Message-ID: <20190816082036.7b60c9f5@runbox.com> (raw)
In-Reply-To: <CAHp75Vc1BP9UXBWW1tv7T8v8vgqxZWngD+tN9=ZKkgc1imUVxQ@mail.gmail.com>
On Fri, 16 Aug 2019 12:21:58 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Fri, Aug 16, 2019 at 4:42 AM M. Vefa Bicakci <m.v.b@runbox.com> wrote:
> >
> > On a Xen-based PVH virtual machine with more than 4 GiB of RAM,
> > intel_pmc_core fails initialization with the following warning message
> > from the kernel, indicating that the driver is attempting to ioremap
> > RAM:
> >
> > ------------[ cut here ]------------
> > ioremap on RAM at 0x00000000fe000000 - 0x00000000fe001fff
>
> > This issue appears to manifest itself because of the following fallback
> > mechanism in the driver:
> >
> > if (lpit_read_residency_count_address(&slp_s0_addr))
> > pmcdev->base_addr = PMC_BASE_ADDR_DEFAULT;
> >
> > The validity of address PMC_BASE_ADDR_DEFAULT (i.e., 0xFE000000) is not
> > verified by the driver, which is what this patch introduces. With this
> > patch, if address PMC_BASE_ADDR_DEFAULT is in RAM, then the driver will
> > not attempt to ioremap the aforementioned address.
>
> Thank you for the patch.
Hello Andy,
Thank you for reviewing the patch!
> Is there anything preventing us to use memremap() in such case?
I re-read the documentation for memremap a few times along with taking
a look at its code, but I think I am missing an important piece of
information. As I understand it, depending on its flags, memremap would
allow a section of RAM to be mapped for the PMC driver.
The intention with this patch is to prevent the driver from being
instantiated when the default/fallback memory address is in RAM, as
this issue occurs with a non-administrative virtual machine (domU in
Xen terminology) that does not simulate or pass-through a corresponding
PMC device.
I think that I have misunderstood your review comment though, so I
would apppreciate it if you could elaborate.
Thanks again for reviewing the patch,
Vefa
(Please note that my next reply may be delayed by about 10 hours.)
next prev parent reply other threads:[~2019-08-16 12:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 1:41 [PATCH] platform/x86: intel_pmc_core: Do not ioremap RAM M. Vefa Bicakci
2019-08-16 1:41 ` [PATCH] platform/x86: intel_pmc_core_pltdrv: Module removal warning fix M. Vefa Bicakci
2019-09-07 16:53 ` Andy Shevchenko
2019-08-16 9:21 ` [PATCH] platform/x86: intel_pmc_core: Do not ioremap RAM Andy Shevchenko
2019-08-16 12:20 ` M. Vefa Bicakci [this message]
2019-09-07 16:58 ` Andy Shevchenko
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=20190816082036.7b60c9f5@runbox.com \
--to=m.v.b@runbox.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rajneesh.bhardwaj@intel.com \
--cc=vishwanath.somayaji@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox