From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E948C433EF for ; Fri, 27 May 2022 02:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235054AbiE0C15 (ORCPT ); Thu, 26 May 2022 22:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233969AbiE0C1y (ORCPT ); Thu, 26 May 2022 22:27:54 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8269CE52A9 for ; Thu, 26 May 2022 19:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653618473; x=1685154473; h=date:from:to:cc:subject:message-id:mime-version; bh=Yp2/XqJRwjTQ9JGo6EQdjU2/rA9oMw9X3T9CsPhkoRs=; b=ijE3a8pVk+Tn/4mydk4GnWEZwe1ZNlXH0lXfCdaDEbPbdljGLwmx6JnY nwQImEwfhyjLWcrpoHh5+y3V7a/CXUmk1Uz72faWuENVsed/Lw9j+dUuK mfJPnK826qIE3/u49a8jYJ3E3Ao42lxGdGjpwQ5z/SWb1sspkG0NIruLG FFnbq6ngahl48KfsgcS+iM8p2szj7QPuMYXENxuBtCMIkrq/8AdI3ZzUX BGaeAFul+L/9GbRVcwFeRq04ysUBjDPL6iw3PQHT7EViRNgAUPfHn3YBa yW/uDGtGMkQq1ll99nyC3AYN0QD6loLu2o43e9sKxBBpfPhiJXDQFJWNx w==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="335003411" X-IronPort-AV: E=Sophos;i="5.91,254,1647327600"; d="scan'208";a="335003411" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 19:27:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,254,1647327600"; d="scan'208";a="704896264" Received: from lkp-server01.sh.intel.com (HELO db63a1be7222) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 26 May 2022 19:27:51 -0700 Received: from kbuild by db63a1be7222 with local (Exim 4.95) (envelope-from ) id 1nuPhe-0004Kk-9o; Fri, 27 May 2022 02:27:50 +0000 Date: Fri, 27 May 2022 10:27:28 +0800 From: kernel test robot To: Sean Christopherson Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Mike Rapoport , linux-kernel@vger.kernel.org, Yang Weijiang , Paolo Bonzini Subject: [rppt:cet/kvm 38/51] arch/x86/kvm/x86.c:6587:3: warning: unannotated fall-through between switch labels Message-ID: <202205271026.o40Lr8iX-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git cet/kvm head: 6c13d37e6c4ff3a7f86c5490b3d0f4f12d0a40da commit: 6189c6f50e022a416cbd8620b5c17b0a88b6a0c7 [38/51] KVM: x86: Report XSS as an MSR to be saved if there are supported features config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220527/202205271026.o40Lr8iX-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6f4644d194da594562027a5d458d9fb7a20ebc39) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/commit/?id=6189c6f50e022a416cbd8620b5c17b0a88b6a0c7 git remote add rppt https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git git fetch --no-tags rppt cet/kvm git checkout 6189c6f50e022a416cbd8620b5c17b0a88b6a0c7 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kvm/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> arch/x86/kvm/x86.c:6587:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case MSR_IA32_XSS: ^ arch/x86/kvm/x86.c:6587:3: note: insert '__attribute__((fallthrough));' to silence this warning case MSR_IA32_XSS: ^ __attribute__((fallthrough)); arch/x86/kvm/x86.c:6587:3: note: insert 'break;' to avoid fall-through case MSR_IA32_XSS: ^ break; 1 warning generated. vim +6587 arch/x86/kvm/x86.c 6513 6514 static void kvm_init_msr_list(void) 6515 { 6516 struct x86_pmu_capability x86_pmu; 6517 u32 dummy[2]; 6518 unsigned i; 6519 6520 BUILD_BUG_ON_MSG(INTEL_PMC_MAX_FIXED != 4, 6521 "Please update the fixed PMCs in msrs_to_saved_all[]"); 6522 6523 perf_get_x86_pmu_capability(&x86_pmu); 6524 6525 num_msrs_to_save = 0; 6526 num_emulated_msrs = 0; 6527 num_msr_based_features = 0; 6528 6529 for (i = 0; i < ARRAY_SIZE(msrs_to_save_all); i++) { 6530 if (rdmsr_safe(msrs_to_save_all[i], &dummy[0], &dummy[1]) < 0) 6531 continue; 6532 6533 /* 6534 * Even MSRs that are valid in the host may not be exposed 6535 * to the guests in some cases. 6536 */ 6537 switch (msrs_to_save_all[i]) { 6538 case MSR_IA32_BNDCFGS: 6539 if (!kvm_mpx_supported()) 6540 continue; 6541 break; 6542 case MSR_TSC_AUX: 6543 if (!kvm_cpu_cap_has(X86_FEATURE_RDTSCP) && 6544 !kvm_cpu_cap_has(X86_FEATURE_RDPID)) 6545 continue; 6546 break; 6547 case MSR_IA32_UMWAIT_CONTROL: 6548 if (!kvm_cpu_cap_has(X86_FEATURE_WAITPKG)) 6549 continue; 6550 break; 6551 case MSR_IA32_RTIT_CTL: 6552 case MSR_IA32_RTIT_STATUS: 6553 if (!kvm_cpu_cap_has(X86_FEATURE_INTEL_PT)) 6554 continue; 6555 break; 6556 case MSR_IA32_RTIT_CR3_MATCH: 6557 if (!kvm_cpu_cap_has(X86_FEATURE_INTEL_PT) || 6558 !intel_pt_validate_hw_cap(PT_CAP_cr3_filtering)) 6559 continue; 6560 break; 6561 case MSR_IA32_RTIT_OUTPUT_BASE: 6562 case MSR_IA32_RTIT_OUTPUT_MASK: 6563 if (!kvm_cpu_cap_has(X86_FEATURE_INTEL_PT) || 6564 (!intel_pt_validate_hw_cap(PT_CAP_topa_output) && 6565 !intel_pt_validate_hw_cap(PT_CAP_single_range_output))) 6566 continue; 6567 break; 6568 case MSR_IA32_RTIT_ADDR0_A ... MSR_IA32_RTIT_ADDR3_B: 6569 if (!kvm_cpu_cap_has(X86_FEATURE_INTEL_PT) || 6570 msrs_to_save_all[i] - MSR_IA32_RTIT_ADDR0_A >= 6571 intel_pt_validate_hw_cap(PT_CAP_num_address_ranges) * 2) 6572 continue; 6573 break; 6574 case MSR_ARCH_PERFMON_PERFCTR0 ... MSR_ARCH_PERFMON_PERFCTR0 + 17: 6575 if (msrs_to_save_all[i] - MSR_ARCH_PERFMON_PERFCTR0 >= 6576 min(INTEL_PMC_MAX_GENERIC, x86_pmu.num_counters_gp)) 6577 continue; 6578 break; 6579 case MSR_ARCH_PERFMON_EVENTSEL0 ... MSR_ARCH_PERFMON_EVENTSEL0 + 17: 6580 if (msrs_to_save_all[i] - MSR_ARCH_PERFMON_EVENTSEL0 >= 6581 min(INTEL_PMC_MAX_GENERIC, x86_pmu.num_counters_gp)) 6582 continue; 6583 break; 6584 case MSR_IA32_XFD: 6585 case MSR_IA32_XFD_ERR: 6586 if (!kvm_cpu_cap_has(X86_FEATURE_XFD)) > 6587 case MSR_IA32_XSS: 6588 if (!supported_xss) 6589 continue; 6590 break; 6591 default: 6592 break; 6593 } 6594 6595 msrs_to_save[num_msrs_to_save++] = msrs_to_save_all[i]; 6596 } 6597 6598 for (i = 0; i < ARRAY_SIZE(emulated_msrs_all); i++) { 6599 if (!static_call(kvm_x86_has_emulated_msr)(NULL, emulated_msrs_all[i])) 6600 continue; 6601 6602 emulated_msrs[num_emulated_msrs++] = emulated_msrs_all[i]; 6603 } 6604 6605 for (i = 0; i < ARRAY_SIZE(msr_based_features_all); i++) { 6606 struct kvm_msr_entry msr; 6607 6608 msr.index = msr_based_features_all[i]; 6609 if (kvm_get_msr_feature(&msr)) 6610 continue; 6611 6612 msr_based_features[num_msr_based_features++] = msr_based_features_all[i]; 6613 } 6614 } 6615 -- 0-DAY CI Kernel Test Service https://01.org/lkp