From: Dave Hansen <dave.hansen@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
kernel test robot <fengguang.wu@intel.com>, LKP <lkp@01.org>,
kvm@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
wfg@linux.intel.com, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
"Brown, Len" <len.brown@intel.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: 2f47e7e19f ("x86/mm/kaiser: Use PCID feature to make user and .."): WARNING: CPU: 0 PID: 1 at mm/early_ioremap.c:114 __early_ioremap
Date: Mon, 27 Nov 2017 17:22:02 -0800 [thread overview]
Message-ID: <9f73a515-ce07-c833-4e6b-2062fe03f354@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0hyAt1cPj3jpm9njOZAo02WmN-83ozeyvDF5qipBXqH=Q@mail.gmail.com>
I think I narrowed this down.
__native_flush_tlb_single() depends on cpu_tlbstate.loaded_mm_asid
matching what is in CR3. But, while we are still "early" in boot, CR3
has hardware ASID=0, but cpu_tlbstate.loaded_mm_asid=0 which is actually
hardware ASID=1.
So, we have ASID=0 in CR3 and we try to *flush* ASID=1 with INVPCID,
which does nothing for us, effectively missing the TLB flush.
I think we need to steer __native_flush_tlb_single() into the
"!this_cpu_has(X86_FEATURE_INVPCID_SINGLE)" path if we get called before
initialize_tlbstate_and_flush() gives us a "real" ASID in CR3, but I
haven't found a nice way to do it, yet.
We probably also need a debugging warning in there to read CR3 and check
it against cpu_tlbstate.loaded_mm_asid. I'll look at this in some more
detail tomorrow if nobody beats me to it.
prev parent reply other threads:[~2017-11-28 1:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5a1aaa36.CWNgvwmmRFzeAlPc%fengguang.wu@intel.com>
[not found] ` <20171127101814.jsglrh7typy3pxxp@gmail.com>
2017-11-27 16:14 ` 2f47e7e19f ("x86/mm/kaiser: Use PCID feature to make user and .."): WARNING: CPU: 0 PID: 1 at mm/early_ioremap.c:114 __early_ioremap Dave Hansen
2017-11-27 22:13 ` Rafael J. Wysocki
2017-11-27 22:33 ` Rafael J. Wysocki
2017-11-28 1:22 ` Dave Hansen [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=9f73a515-ce07-c833-4e6b-2062fe03f354@linux.intel.com \
--to=dave.hansen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=fengguang.wu@intel.com \
--cc=jbarnes@virtuousgeek.org \
--cc=kvm@vger.kernel.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mingo@kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=wfg@linux.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