All of lore.kernel.org
 help / color / mirror / Atom feed
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

  reply	other threads:[~2024-09-15  9:29 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 19:08 [RFC PATCH 00/34] x86/bugs: Attack vector controls David Kaplan
2024-09-12 19:08 ` [RFC PATCH 01/34] x86/bugs: Relocate mds/taa/mmio/rfds defines David Kaplan
2024-10-24 13:07   ` Borislav Petkov
2024-09-12 19:08 ` [RFC PATCH 02/34] x86/bugs: Add AUTO mitigations for mds/taa/mmio/rfds David Kaplan
2024-09-12 19:08 ` [RFC PATCH 03/34] x86/bugs: Restructure mds mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 04/34] x86/bugs: Restructure taa mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 05/34] x86/bugs: Restructure mmio mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 06/34] x86/bugs: Restructure rfds mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 07/34] x86/bugs: Remove md_clear_*_mitigation() David Kaplan
2024-10-08  8:40   ` Nikolay Borisov
2024-09-12 19:08 ` [RFC PATCH 08/34] x86/bugs: Restructure srbds mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 09/34] x86/bugs: Restructure gds mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 10/34] x86/bugs: Restructure spectre_v1 mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 11/34] x86/bugs: Restructure retbleed mitigation David Kaplan
2024-10-08  8:32   ` Nikolay Borisov
2024-10-08 14:28     ` Kaplan, David
2024-09-12 19:08 ` [RFC PATCH 12/34] x86/bugs: Restructure spectre_v2_user mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 13/34] x86/bugs: Restructure bhi mitigation David Kaplan
2024-10-08 12:41   ` Nikolay Borisov
2024-10-08 14:25     ` Kaplan, David
2024-09-12 19:08 ` [RFC PATCH 14/34] x86/bugs: Restructure spectre_v2 mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 15/34] x86/bugs: Restructure ssb mitigation David Kaplan
2024-10-08 15:21   ` Nikolay Borisov
2024-09-12 19:08 ` [RFC PATCH 16/34] x86/bugs: Restructure l1tf mitigation David Kaplan
2024-09-15  9:28   ` kernel test robot [this message]
2024-09-12 19:08 ` [RFC PATCH 17/34] x86/bugs: Restructure srso mitigation David Kaplan
2024-09-12 19:08 ` [RFC PATCH 18/34] Documentation/x86: Document the new attack vector controls David Kaplan
2024-10-01  0:43   ` Manwaring, Derek
2024-10-01  1:53     ` Kaplan, David
2024-10-01 22:21       ` Manwaring, Derek
2024-09-12 19:08 ` [RFC PATCH 19/34] x86/bugs: Define attack vectors David Kaplan
2024-09-12 19:08 ` [RFC PATCH 20/34] x86/bugs: Determine relevant vulnerabilities based on attack vector controls David Kaplan
2024-09-12 19:08 ` [RFC PATCH 21/34] x86/bugs: Add attack vector controls for mds David Kaplan
2024-10-01  0:50   ` Manwaring, Derek
2024-10-01  1:58     ` Kaplan, David
2024-10-01 22:37       ` Manwaring, Derek
2024-10-02 14:28         ` Kaplan, David
2024-10-02 20:11           ` Manwaring, Derek
2024-10-02 20:26             ` Kaplan, David
2024-10-02 15:50         ` Pawan Gupta
2024-10-02 19:40           ` Manwaring, Derek
2024-09-12 19:08 ` [RFC PATCH 22/34] x86/bugs: Add attack vector controls for taa David Kaplan
2024-09-12 19:08 ` [RFC PATCH 23/34] x86/bugs: Add attack vector controls for mmio David Kaplan
2024-09-12 19:08 ` [RFC PATCH 24/34] x86/bugs: Add attack vector controls for rfds David Kaplan
2024-09-12 19:08 ` [RFC PATCH 25/34] x86/bugs: Add attack vector controls for srbds David Kaplan
2024-09-12 19:08 ` [RFC PATCH 26/34] x86/bugs: Add attack vector controls for gds David Kaplan
2024-09-12 19:08 ` [RFC PATCH 27/34] x86/bugs: Add attack vector controls for spectre_v1 David Kaplan
2024-09-12 19:37   ` Dave Hansen
2024-09-12 19:57     ` Kaplan, David
2024-09-12 20:16       ` Dave Hansen
2024-09-12 21:15         ` Kaplan, David
2024-10-01  0:39           ` Manwaring, Derek
2024-10-01  1:46             ` Kaplan, David
2024-10-01 22:18               ` Manwaring, Derek
2024-09-13 14:20       ` Borislav Petkov
2024-09-12 19:08 ` [RFC PATCH 28/34] x86/bugs: Add attack vector controls for retbleed David Kaplan
2024-09-12 19:08 ` [RFC PATCH 29/34] x86/bugs: Add attack vector controls for spectre_v2_user David Kaplan
2024-09-12 19:08 ` [RFC PATCH 30/34] x86/bugs: Add attack vector controls for bhi David Kaplan
2024-09-12 19:08 ` [RFC PATCH 31/34] x86/bugs: Add attack vector controls for spectre_v2 David Kaplan
2024-09-12 19:08 ` [RFC PATCH 32/34] x86/bugs: Add attack vector controls for l1tf David Kaplan
2024-09-12 19:08 ` [RFC PATCH 33/34] x86/bugs: Add attack vector controls for srso David Kaplan
2024-09-12 19:08 ` [RFC PATCH 34/34] x86/pti: Add attack vector controls for pti David Kaplan
2024-09-17 17:04 ` [RFC PATCH 00/34] x86/bugs: Attack vector controls Pawan Gupta
2024-09-18  6:29   ` Kaplan, David

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 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.