* [kvm:queue 211/233] arch/x86/kvm/cpuid.c:739:2: error: unannotated fall-through between switch labels
@ 2022-03-16 16:54 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-16 16:54 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: llvm, kbuild-all, kvm, Robert Hu, Farrah Chen, Danmei Wei
tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head: 2ca1ba339ed8e476b007b6ebf130125e4bbea01a
commit: 413f986a59872bd62f9e60017f5638dbee0df3e1 [211/233] KVM: x86: synthesize CPUID leaf 0x80000021h if useful
config: i386-randconfig-r012-20220314 (https://download.01.org/0day-ci/archive/20220317/202203170046.ZHNPrXH7-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb)
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/virt/kvm/kvm.git/commit/?id=413f986a59872bd62f9e60017f5638dbee0df3e1
git remote add kvm https://git.kernel.org/pub/scm/virt/kvm/kvm.git
git fetch --no-tags kvm queue
git checkout 413f986a59872bd62f9e60017f5638dbee0df3e1
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/x86/kvm/cpuid.c:739:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
default:
^
arch/x86/kvm/cpuid.c:739:2: note: insert 'break;' to avoid fall-through
default:
^
break;
1 error generated.
vim +739 arch/x86/kvm/cpuid.c
e53c95e8d41ef99 Sean Christopherson 2020-03-02 707
e53c95e8d41ef99 Sean Christopherson 2020-03-02 708 static struct kvm_cpuid_entry2 *do_host_cpuid(struct kvm_cpuid_array *array,
aa10a7dc8858f6c Sean Christopherson 2020-03-02 709 u32 function, u32 index)
00b27a3efb11606 Avi Kivity 2011-11-23 710 {
e53c95e8d41ef99 Sean Christopherson 2020-03-02 711 struct kvm_cpuid_entry2 *entry;
e53c95e8d41ef99 Sean Christopherson 2020-03-02 712
e53c95e8d41ef99 Sean Christopherson 2020-03-02 713 if (array->nent >= array->maxnent)
aa10a7dc8858f6c Sean Christopherson 2020-03-02 714 return NULL;
e53c95e8d41ef99 Sean Christopherson 2020-03-02 715
e53c95e8d41ef99 Sean Christopherson 2020-03-02 716 entry = &array->entries[array->nent++];
aa10a7dc8858f6c Sean Christopherson 2020-03-02 717
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 718 memset(entry, 0, sizeof(*entry));
00b27a3efb11606 Avi Kivity 2011-11-23 719 entry->function = function;
00b27a3efb11606 Avi Kivity 2011-11-23 720 entry->index = index;
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 721 switch (function & 0xC0000000) {
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 722 case 0x40000000:
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 723 /* Hypervisor leaves are always synthesized by __do_cpuid_func. */
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 724 return entry;
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 725
413f986a59872bd Paolo Bonzini 2021-10-21 726 case 0x80000000:
413f986a59872bd Paolo Bonzini 2021-10-21 727 /*
413f986a59872bd Paolo Bonzini 2021-10-21 728 * 0x80000021 is sometimes synthesized by __do_cpuid_func, which
413f986a59872bd Paolo Bonzini 2021-10-21 729 * would result in out-of-bounds calls to do_host_cpuid.
413f986a59872bd Paolo Bonzini 2021-10-21 730 */
413f986a59872bd Paolo Bonzini 2021-10-21 731 {
413f986a59872bd Paolo Bonzini 2021-10-21 732 static int max_cpuid_80000000;
413f986a59872bd Paolo Bonzini 2021-10-21 733 if (!READ_ONCE(max_cpuid_80000000))
413f986a59872bd Paolo Bonzini 2021-10-21 734 WRITE_ONCE(max_cpuid_80000000, cpuid_eax(0x80000000));
413f986a59872bd Paolo Bonzini 2021-10-21 735 if (function > READ_ONCE(max_cpuid_80000000))
413f986a59872bd Paolo Bonzini 2021-10-21 736 return entry;
413f986a59872bd Paolo Bonzini 2021-10-21 737 }
413f986a59872bd Paolo Bonzini 2021-10-21 738
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 @739 default:
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 740 break;
2746a6b72ab9a92 Paolo Bonzini 2021-10-28 741 }
ab8bcf64971180e Paolo Bonzini 2019-06-24 742
00b27a3efb11606 Avi Kivity 2011-11-23 743 cpuid_count(entry->function, entry->index,
00b27a3efb11606 Avi Kivity 2011-11-23 744 &entry->eax, &entry->ebx, &entry->ecx, &entry->edx);
d9aadaf689928ba Paolo Bonzini 2019-07-04 745
d9aadaf689928ba Paolo Bonzini 2019-07-04 746 switch (function) {
d9aadaf689928ba Paolo Bonzini 2019-07-04 747 case 4:
d9aadaf689928ba Paolo Bonzini 2019-07-04 748 case 7:
d9aadaf689928ba Paolo Bonzini 2019-07-04 749 case 0xb:
d9aadaf689928ba Paolo Bonzini 2019-07-04 750 case 0xd:
a06dcd625d61817 Jim Mattson 2019-09-12 751 case 0xf:
a06dcd625d61817 Jim Mattson 2019-09-12 752 case 0x10:
a06dcd625d61817 Jim Mattson 2019-09-12 753 case 0x12:
d9aadaf689928ba Paolo Bonzini 2019-07-04 754 case 0x14:
a06dcd625d61817 Jim Mattson 2019-09-12 755 case 0x17:
a06dcd625d61817 Jim Mattson 2019-09-12 756 case 0x18:
690a757d610e50c Jing Liu 2022-01-05 757 case 0x1d:
690a757d610e50c Jing Liu 2022-01-05 758 case 0x1e:
a06dcd625d61817 Jim Mattson 2019-09-12 759 case 0x1f:
d9aadaf689928ba Paolo Bonzini 2019-07-04 760 case 0x8000001d:
d9aadaf689928ba Paolo Bonzini 2019-07-04 761 entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
d9aadaf689928ba Paolo Bonzini 2019-07-04 762 break;
d9aadaf689928ba Paolo Bonzini 2019-07-04 763 }
aa10a7dc8858f6c Sean Christopherson 2020-03-02 764
aa10a7dc8858f6c Sean Christopherson 2020-03-02 765 return entry;
00b27a3efb11606 Avi Kivity 2011-11-23 766 }
00b27a3efb11606 Avi Kivity 2011-11-23 767
:::::: The code at line 739 was first introduced by commit
:::::: 2746a6b72ab9a92bd188c4ac3e4122ee1c18f754 KVM: x86: skip host CPUID call for hypervisor leaves
:::::: TO: Paolo Bonzini <pbonzini@redhat.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-16 16:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 16:54 [kvm:queue 211/233] arch/x86/kvm/cpuid.c:739:2: error: unannotated fall-through between switch labels kernel test robot
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.