lkml.org 
[lkml]   [2021]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 20/54] KVM: x86/mmu: Add struct and helpers to retrieve MMU role bits from regs
    Hi Sean,

    I love your patch! Perhaps something to improve:

    [auto build test WARNING on kvm/queue]
    [also build test WARNING on next-20210622]
    [cannot apply to linus/master vhost/linux-next v5.13-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]

    url: https://github.com/0day-ci/linux/commits/Sean-Christopherson/KVM-x86-mmu-Bug-fixes-and-summer-cleaning/20210623-020645
    base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
    config: x86_64-randconfig-a002-20210622 (attached as .config)
    compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b3634d3e88b7f26534a5057bff182b7dced584fc)
    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
    # install x86_64 cross compiling tool for clang build
    # apt-get install binutils-x86-64-linux-gnu
    # https://github.com/0day-ci/linux/commit/01d7a0135a12b1e0e5134d0575e424fd20d1a90f
    git remote add linux-review https://github.com/0day-ci/linux
    git fetch --no-tags linux-review Sean-Christopherson/KVM-x86-mmu-Bug-fixes-and-summer-cleaning/20210623-020645
    git checkout 01d7a0135a12b1e0e5134d0575e424fd20d1a90f
    # save the attached .config to linux build tree
    COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

    If you fix the issue, kindly add following tag as appropriate
    Reported-by: kernel test robot <lkp@intel.com>

    All warnings (new ones prefixed by >>):

    >> arch/x86/kvm/mmu/mmu.c:209:26: warning: no previous prototype for function 'vcpu_to_role_regs' [-Wmissing-prototypes]
    struct kvm_mmu_role_regs vcpu_to_role_regs(struct kvm_vcpu *vcpu)
    ^
    arch/x86/kvm/mmu/mmu.c:209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    struct kvm_mmu_role_regs vcpu_to_role_regs(struct kvm_vcpu *vcpu)
    ^
    static
    arch/x86/kvm/mmu/mmu.c:199:1: warning: unused function '____is_cr0_wp' [-Wunused-function]
    BUILD_MMU_ROLE_REGS_ACCESSOR(cr0, wp, X86_CR0_WP);
    ^
    arch/x86/kvm/mmu/mmu.c:194:20: note: expanded from macro 'BUILD_MMU_ROLE_REGS_ACCESSOR'
    static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
    ^
    <scratch space>:58:1: note: expanded from here
    ____is_cr0_wp
    ^
    arch/x86/kvm/mmu/mmu.c:200:1: warning: unused function '____is_cr4_pse' [-Wunused-function]
    BUILD_MMU_ROLE_REGS_ACCESSOR(cr4, pse, X86_CR4_PSE);
    ^
    arch/x86/kvm/mmu/mmu.c:194:20: note: expanded from macro 'BUILD_MMU_ROLE_REGS_ACCESSOR'
    static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
    ^
    <scratch space>:62:1: note: expanded from here
    ____is_cr4_pse
    ^
    arch/x86/kvm/mmu/mmu.c:202:1: warning: unused function '____is_cr4_smep' [-Wunused-function]
    BUILD_MMU_ROLE_REGS_ACCESSOR(cr4, smep, X86_CR4_SMEP);
    ^
    arch/x86/kvm/mmu/mmu.c:194:20: note: expanded from macro 'BUILD_MMU_ROLE_REGS_ACCESSOR'
    static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
    ^
    <scratch space>:70:1: note: expanded from here
    ____is_cr4_smep
    ^
    arch/x86/kvm/mmu/mmu.c:203:1: warning: unused function '____is_cr4_smap' [-Wunused-function]
    BUILD_MMU_ROLE_REGS_ACCESSOR(cr4, smap, X86_CR4_SMAP);
    ^
    arch/x86/kvm/mmu/mmu.c:194:20: note: expanded from macro 'BUILD_MMU_ROLE_REGS_ACCESSOR'
    static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
    ^
    <scratch space>:74:1: note: expanded from here
    ____is_cr4_smap
    ^
    arch/x86/kvm/mmu/mmu.c:204:1: warning: unused function '____is_cr4_pke' [-Wunused-function]
    BUILD_MMU_ROLE_REGS_ACCESSOR(cr4, pke, X86_CR4_PKE);
    ^
    arch/x86/kvm/mmu/mmu.c:194:20: note: expanded from macro 'BUILD_MMU_ROLE_REGS_ACCESSOR'
    static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
    ^
    <scratch space>:78:1: note: expanded from here
    ____is_cr4_pke
    ^
    arch/x86/kvm/mmu/mmu.c:205:1: warning: unused function '____is_cr4_la57' [-Wunused-function]
    BUILD_MMU_ROLE_REGS_ACCESSOR(cr4, la57, X86_CR4_LA57);
    ^
    arch/x86/kvm/mmu/mmu.c:194:20: note: expanded from macro 'BUILD_MMU_ROLE_REGS_ACCESSOR'
    static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
    ^
    <scratch space>:82:1: note: expanded from here
    ____is_cr4_la57
    ^
    arch/x86/kvm/mmu/mmu.c:206:1: warning: unused function '____is_efer_nx' [-Wunused-function]
    BUILD_MMU_ROLE_REGS_ACCESSOR(efer, nx, EFER_NX);
    ^
    arch/x86/kvm/mmu/mmu.c:194:20: note: expanded from macro 'BUILD_MMU_ROLE_REGS_ACCESSOR'
    static inline bool ____is_##reg##_##name(struct kvm_mmu_role_regs *regs)\
    ^
    <scratch space>:85:1: note: expanded from here
    ____is_efer_nx
    ^
    8 warnings generated.


    vim +/vcpu_to_role_regs +209 arch/x86/kvm/mmu/mmu.c

    208
    > 209 struct kvm_mmu_role_regs vcpu_to_role_regs(struct kvm_vcpu *vcpu)
    210 {
    211 struct kvm_mmu_role_regs regs = {
    212 .cr0 = kvm_read_cr0_bits(vcpu, KVM_MMU_CR0_ROLE_BITS),
    213 .cr4 = kvm_read_cr4_bits(vcpu, KVM_MMU_CR4_ROLE_BITS),
    214 .efer = vcpu->arch.efer,
    215 };
    216
    217 return regs;
    218 }
    219

    ---
    0-DAY CI Kernel Test Service, Intel Corporation
    https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
    [unhandled content-type:application/gzip]
    \
     
     \ /
      Last update: 2021-06-23 03:58    [W:4.109 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site