From: kernel test robot <lkp@intel.com>
To: David Kaplan <david.kaplan@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 16/34] x86/bugs: Restructure l1tf mitigation
Date: Sun, 15 Sep 2024 17:28:45 +0800 [thread overview]
Message-ID: <202409151724.plotIQDU-lkp@intel.com> (raw)
In-Reply-To: <20240912190857.235849-17-david.kaplan@amd.com>
Hi David,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/master]
[also build test WARNING on next-20240913]
[cannot apply to tip/x86/core tip/smp/core tip/auto-latest linus/master v6.11-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Kaplan/x86-bugs-Relocate-mds-taa-mmio-rfds-defines/20240913-031908
base: tip/master
patch link: https://lore.kernel.org/r/20240912190857.235849-17-david.kaplan%40amd.com
patch subject: [RFC PATCH 16/34] x86/bugs: Restructure l1tf mitigation
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240915/202409151724.plotIQDU-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240915/202409151724.plotIQDU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409151724.plotIQDU-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/x86/kvm/vmx/vmx.c:270:11: warning: enumeration value 'L1TF_MITIGATION_AUTO' not handled in switch [-Wswitch]
270 | switch (l1tf_mitigation) {
| ^~~~~~~~~~~~~~~
arch/x86/kvm/vmx/vmx.c:7626:11: warning: enumeration value 'L1TF_MITIGATION_AUTO' not handled in switch [-Wswitch]
7626 | switch (l1tf_mitigation) {
| ^~~~~~~~~~~~~~~
2 warnings generated.
vim +/L1TF_MITIGATION_AUTO +270 arch/x86/kvm/vmx/vmx.c
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 247
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 248 static int vmx_setup_l1d_flush(enum vmx_l1d_flush_state l1tf)
a399477e52c17e arch/x86/kvm/vmx.c Konrad Rzeszutek Wilk 2018-07-02 249 {
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 250 struct page *page;
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 251 unsigned int i;
a399477e52c17e arch/x86/kvm/vmx.c Konrad Rzeszutek Wilk 2018-07-02 252
19a36d329f5b1e arch/x86/kvm/vmx/vmx.c Waiman Long 2019-08-26 253 if (!boot_cpu_has_bug(X86_BUG_L1TF)) {
19a36d329f5b1e arch/x86/kvm/vmx/vmx.c Waiman Long 2019-08-26 254 l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_NOT_REQUIRED;
19a36d329f5b1e arch/x86/kvm/vmx/vmx.c Waiman Long 2019-08-26 255 return 0;
19a36d329f5b1e arch/x86/kvm/vmx/vmx.c Waiman Long 2019-08-26 256 }
19a36d329f5b1e arch/x86/kvm/vmx/vmx.c Waiman Long 2019-08-26 257
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 258 if (!enable_ept) {
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 259 l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_EPT_DISABLED;
a399477e52c17e arch/x86/kvm/vmx.c Konrad Rzeszutek Wilk 2018-07-02 260 return 0;
a399477e52c17e arch/x86/kvm/vmx.c Konrad Rzeszutek Wilk 2018-07-02 261 }
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 262
7974c0643ee3b4 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2024-04-23 263 if (kvm_host.arch_capabilities & ARCH_CAP_SKIP_VMENTRY_L1DFLUSH) {
8e0b2b916662e0 arch/x86/kvm/vmx.c Paolo Bonzini 2018-08-05 264 l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_NOT_REQUIRED;
8e0b2b916662e0 arch/x86/kvm/vmx.c Paolo Bonzini 2018-08-05 265 return 0;
8e0b2b916662e0 arch/x86/kvm/vmx.c Paolo Bonzini 2018-08-05 266 }
8e0b2b916662e0 arch/x86/kvm/vmx.c Paolo Bonzini 2018-08-05 267
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 268 /* If set to auto use the default l1tf mitigation method */
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 269 if (l1tf == VMENTER_L1D_FLUSH_AUTO) {
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 @270 switch (l1tf_mitigation) {
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 271 case L1TF_MITIGATION_OFF:
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 272 l1tf = VMENTER_L1D_FLUSH_NEVER;
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 273 break;
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 274 case L1TF_MITIGATION_FLUSH_NOWARN:
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 275 case L1TF_MITIGATION_FLUSH:
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 276 case L1TF_MITIGATION_FLUSH_NOSMT:
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 277 l1tf = VMENTER_L1D_FLUSH_COND;
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 278 break;
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 279 case L1TF_MITIGATION_FULL:
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 280 case L1TF_MITIGATION_FULL_FORCE:
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 281 l1tf = VMENTER_L1D_FLUSH_ALWAYS;
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 282 break;
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 283 }
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 284 } else if (l1tf_mitigation == L1TF_MITIGATION_FULL_FORCE) {
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 285 l1tf = VMENTER_L1D_FLUSH_ALWAYS;
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 286 }
d90a7a0ec83fb8 arch/x86/kvm/vmx.c Jiri Kosina 2018-07-13 287
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 288 if (l1tf != VMENTER_L1D_FLUSH_NEVER && !vmx_l1d_flush_pages &&
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 289 !boot_cpu_has(X86_FEATURE_FLUSH_L1D)) {
4183683918efc3 arch/x86/kvm/vmx/vmx.c Ben Gardon 2019-02-11 290 /*
4183683918efc3 arch/x86/kvm/vmx/vmx.c Ben Gardon 2019-02-11 291 * This allocation for vmx_l1d_flush_pages is not tied to a VM
4183683918efc3 arch/x86/kvm/vmx/vmx.c Ben Gardon 2019-02-11 292 * lifetime and so should not be charged to a memcg.
4183683918efc3 arch/x86/kvm/vmx/vmx.c Ben Gardon 2019-02-11 293 */
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 294 page = alloc_pages(GFP_KERNEL, L1D_CACHE_ORDER);
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 295 if (!page)
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 296 return -ENOMEM;
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 297 vmx_l1d_flush_pages = page_address(page);
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 298
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 299 /*
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 300 * Initialize each page with a different pattern in
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 301 * order to protect against KSM in the nested
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 302 * virtualization case.
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 303 */
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 304 for (i = 0; i < 1u << L1D_CACHE_ORDER; ++i) {
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 305 memset(vmx_l1d_flush_pages + i * PAGE_SIZE, i + 1,
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 306 PAGE_SIZE);
288d152c23dcf3 arch/x86/kvm/vmx.c Nicolai Stange 2018-07-18 307 }
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 308 }
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 309
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 310 l1tf_vmx_mitigation = l1tf;
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 311
895ae47f991883 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 312 if (l1tf != VMENTER_L1D_FLUSH_NEVER)
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 313 static_branch_enable(&vmx_l1d_should_flush);
895ae47f991883 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 314 else
895ae47f991883 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 315 static_branch_disable(&vmx_l1d_should_flush);
895ae47f991883 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 316
427362a142441f arch/x86/kvm/vmx.c Nicolai Stange 2018-07-21 317 if (l1tf == VMENTER_L1D_FLUSH_COND)
427362a142441f arch/x86/kvm/vmx.c Nicolai Stange 2018-07-21 318 static_branch_enable(&vmx_l1d_flush_cond);
895ae47f991883 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 319 else
427362a142441f arch/x86/kvm/vmx.c Nicolai Stange 2018-07-21 320 static_branch_disable(&vmx_l1d_flush_cond);
7db92e165ac814 arch/x86/kvm/vmx.c Thomas Gleixner 2018-07-13 321 return 0;
a399477e52c17e arch/x86/kvm/vmx.c Konrad Rzeszutek Wilk 2018-07-02 322 }
a399477e52c17e arch/x86/kvm/vmx.c Konrad Rzeszutek Wilk 2018-07-02 323
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-09-15 9:29 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20240912190857.235849-17-david.kaplan@amd.com>]
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=202409151724.plotIQDU-lkp@intel.com \
--to=lkp@intel.com \
--cc=david.kaplan@amd.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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