All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/3] KVM: x86: add system attribute to retrieve full set of supported xsave states
Date: Thu, 27 Jan 2022 05:56:10 +0800	[thread overview]
Message-ID: <202201270505.Zw7qAhV1-lkp@intel.com> (raw)
In-Reply-To: <20220126152210.3044876-3-pbonzini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4330 bytes --]

Hi Paolo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on kvm/queue]
[also build test WARNING on tip/master linus/master v5.17-rc1 next-20220125]
[cannot apply to linux/master]
[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/Paolo-Bonzini/KVM-x86-export-supported_xcr0-via-UAPI/20220126-232404
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220127/202201270505.Zw7qAhV1-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/b2fde1186382c3f79ca5fd335b692b80de2f94af
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Paolo-Bonzini/KVM-x86-export-supported_xcr0-via-UAPI/20220126-232404
        git checkout b2fde1186382c3f79ca5fd335b692b80de2f94af
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/

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 >>):

   In file included from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from include/linux/huge_mm.h:8,
                    from include/linux/mm.h:717,
                    from include/linux/kvm_host.h:16,
                    from arch/x86/kvm/x86.c:19:
   arch/x86/kvm/x86.c: In function 'kvm_x86_dev_get_attr':
>> arch/x86/kvm/x86.c:4344:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    4344 |   if (put_user(supported_xcr0, (u64 __user *)attr->addr))
         |                                ^
   arch/x86/include/asm/uaccess.h:221:24: note: in definition of macro 'do_put_user_call'
     221 |  register __typeof__(*(ptr)) __val_pu asm("%"_ASM_AX);  \
         |                        ^~~
   arch/x86/kvm/x86.c:4344:7: note: in expansion of macro 'put_user'
    4344 |   if (put_user(supported_xcr0, (u64 __user *)attr->addr))
         |       ^~~~~~~~
>> arch/x86/kvm/x86.c:4344:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    4344 |   if (put_user(supported_xcr0, (u64 __user *)attr->addr))
         |                                ^
   arch/x86/include/asm/uaccess.h:223:14: note: in definition of macro 'do_put_user_call'
     223 |  __ptr_pu = (ptr);      \
         |              ^~~
   arch/x86/kvm/x86.c:4344:7: note: in expansion of macro 'put_user'
    4344 |   if (put_user(supported_xcr0, (u64 __user *)attr->addr))
         |       ^~~~~~~~
>> arch/x86/kvm/x86.c:4344:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    4344 |   if (put_user(supported_xcr0, (u64 __user *)attr->addr))
         |                                ^
   arch/x86/include/asm/uaccess.h:230:31: note: in definition of macro 'do_put_user_call'
     230 |          [size] "i" (sizeof(*(ptr)))   \
         |                               ^~~
   arch/x86/kvm/x86.c:4344:7: note: in expansion of macro 'put_user'
    4344 |   if (put_user(supported_xcr0, (u64 __user *)attr->addr))
         |       ^~~~~~~~


vim +4344 arch/x86/kvm/x86.c

  4336	
  4337	static int kvm_x86_dev_get_attr(struct kvm_device_attr *attr)
  4338	{
  4339		if (attr->group)
  4340			return -ENXIO;
  4341	
  4342		switch (attr->attr) {
  4343		case KVM_X86_XCOMP_GUEST_SUPP:
> 4344			if (put_user(supported_xcr0, (u64 __user *)attr->addr))
  4345				return -EFAULT;
  4346			return 0;
  4347		default:
  4348			return -ENXIO;
  4349			break;
  4350		}
  4351	}
  4352	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

  reply	other threads:[~2022-01-26 21:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 15:22 [PATCH 0/3] KVM: x86: export supported_xcr0 via UAPI Paolo Bonzini
2022-01-26 15:22 ` [PATCH 1/3] selftests: kvm: move vm_xsave_req_perm call to amx_test Paolo Bonzini
2022-01-26 15:22 ` [PATCH 2/3] KVM: x86: add system attribute to retrieve full set of supported xsave states Paolo Bonzini
2022-01-26 21:56   ` kernel test robot [this message]
2022-01-27 15:35   ` Sean Christopherson
2022-01-28  2:41     ` Yang Zhong
2022-01-28  6:07     ` Yang Zhong
2022-01-28 12:33     ` Paolo Bonzini
2022-01-26 15:22 ` [PATCH 3/3] selftests: kvm: check dynamic bits against KVM_X86_XCOMP_GUEST_SUPP Paolo Bonzini
2022-01-27  5:39 ` [PATCH 0/3] KVM: x86: export supported_xcr0 via UAPI Yang Zhong

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=202201270505.Zw7qAhV1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.