All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	kvm@vger.kernel.org, Farrah Chen <farrah.chen@intel.com>
Subject: [kvm:planes-20250401 46/62] arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_debugregs'
Date: Thu, 3 Apr 2025 02:00:14 +0800	[thread overview]
Message-ID: <202504030136.Uapa2ld0-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git planes-20250401
head:   73685d9c23b7122b44f07d59244416f8b56ed48e
commit: 3455b6bc4ac390780723801ed54b80fed8311764 [46/62] KVM: implement vCPU creation for extra planes
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250403/202504030136.Uapa2ld0-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/20250403/202504030136.Uapa2ld0-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/202504030136.Uapa2ld0-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4471:15: warning: unused variable 'argp' [-Wunused-variable]
    4471 |         void __user *argp = (void __user *)arg;
         |                      ^~~~
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^~~~~~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1427:35: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:13:4: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: error: array has incomplete element type 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^
   include/uapi/linux/kvm.h:1427:35: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                   ^
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                                                     ^
   include/asm-generic/ioctl.h:13:25: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |                                ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^~~~~~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1427:35: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:14:4: note: expanded from macro '_IOC_TYPECHECK'
      14 |           sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^~~~~~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1427:35: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:15:4: note: expanded from macro '_IOC_TYPECHECK'
      15 |           sizeof(t) : __invalid_size_argument_for_IOC)
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4531:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_debugregs'
    4531 |         case KVM_SET_DEBUGREGS:
         |              ^~~~~~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1428:35: note: expanded from macro 'KVM_SET_DEBUGREGS'
    1428 | #define KVM_SET_DEBUGREGS         _IOW(KVMIO,  0xa2, struct kvm_debugregs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:13:4: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4531:7: error: array has incomplete element type 'struct kvm_debugregs'
    4531 |         case KVM_SET_DEBUGREGS:
         |              ^
   include/uapi/linux/kvm.h:1428:35: note: expanded from macro 'KVM_SET_DEBUGREGS'
    1428 | #define KVM_SET_DEBUGREGS         _IOW(KVMIO,  0xa2, struct kvm_debugregs)
         |                                   ^
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                                                      ^
   include/asm-generic/ioctl.h:13:25: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |                                ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4531:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_debugregs'
    4531 |         case KVM_SET_DEBUGREGS:
         |              ^~~~~~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1428:35: note: expanded from macro 'KVM_SET_DEBUGREGS'
    1428 | #define KVM_SET_DEBUGREGS         _IOW(KVMIO,  0xa2, struct kvm_debugregs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:14:4: note: expanded from macro '_IOC_TYPECHECK'
      14 |           sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4531:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_debugregs'
    4531 |         case KVM_SET_DEBUGREGS:
         |              ^~~~~~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1428:35: note: expanded from macro 'KVM_SET_DEBUGREGS'
    1428 | #define KVM_SET_DEBUGREGS         _IOW(KVMIO,  0xa2, struct kvm_debugregs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:15:4: note: expanded from macro '_IOC_TYPECHECK'
      15 |           sizeof(t) : __invalid_size_argument_for_IOC)
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4530:7: note: forward declaration of 'struct kvm_debugregs'
    4530 |         case KVM_GET_DEBUGREGS:
         |              ^
   include/uapi/linux/kvm.h:1427:61: note: expanded from macro 'KVM_GET_DEBUGREGS'
    1427 | #define KVM_GET_DEBUGREGS         _IOR(KVMIO,  0xa1, struct kvm_debugregs)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1395:35: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:13:4: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: error: array has incomplete element type 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^
   include/uapi/linux/kvm.h:1395:35: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                   ^
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                                                     ^
   include/asm-generic/ioctl.h:13:25: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |                                ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1395:35: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:14:4: note: expanded from macro '_IOC_TYPECHECK'
      14 |           sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1395:35: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:86:60: note: expanded from macro '_IOR'
      86 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:15:4: note: expanded from macro '_IOC_TYPECHECK'
      15 |           sizeof(t) : __invalid_size_argument_for_IOC)
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4535:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_lapic_state'
    4535 |         case KVM_SET_LAPIC:
         |              ^~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1396:35: note: expanded from macro 'KVM_SET_LAPIC'
    1396 | #define KVM_SET_LAPIC             _IOW(KVMIO,  0x8f, struct kvm_lapic_state)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:13:4: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4535:7: error: array has incomplete element type 'struct kvm_lapic_state'
    4535 |         case KVM_SET_LAPIC:
         |              ^
   include/uapi/linux/kvm.h:1396:35: note: expanded from macro 'KVM_SET_LAPIC'
    1396 | #define KVM_SET_LAPIC             _IOW(KVMIO,  0x8f, struct kvm_lapic_state)
         |                                   ^
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                                                      ^
   include/asm-generic/ioctl.h:13:25: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |                                ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4535:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_lapic_state'
    4535 |         case KVM_SET_LAPIC:
         |              ^~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1396:35: note: expanded from macro 'KVM_SET_LAPIC'
    1396 | #define KVM_SET_LAPIC             _IOW(KVMIO,  0x8f, struct kvm_lapic_state)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:14:4: note: expanded from macro '_IOC_TYPECHECK'
      14 |           sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4535:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_lapic_state'
    4535 |         case KVM_SET_LAPIC:
         |              ^~~~~~~~~~~~~
   include/uapi/linux/kvm.h:1396:35: note: expanded from macro 'KVM_SET_LAPIC'
    1396 | #define KVM_SET_LAPIC             _IOW(KVMIO,  0x8f, struct kvm_lapic_state)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:87:61: note: expanded from macro '_IOW'
      87 | #define _IOW(type,nr,argtype)           _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:15:4: note: expanded from macro '_IOC_TYPECHECK'
      15 |           sizeof(t) : __invalid_size_argument_for_IOC)
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4534:7: note: forward declaration of 'struct kvm_lapic_state'
    4534 |         case KVM_GET_LAPIC:
         |              ^
   include/uapi/linux/kvm.h:1395:61: note: expanded from macro 'KVM_GET_LAPIC'
    1395 | #define KVM_GET_LAPIC             _IOR(KVMIO,  0x8e, struct kvm_lapic_state)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4536:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_msrs'
    4536 |         case KVM_GET_MSRS:
         |              ^~~~~~~~~~~~
   include/uapi/linux/kvm.h:1389:35: note: expanded from macro 'KVM_GET_MSRS'
    1389 | #define KVM_GET_MSRS              _IOWR(KVMIO, 0x88, struct kvm_msrs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:88:72: note: expanded from macro '_IOWR'
      88 | #define _IOWR(type,nr,argtype)          _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:13:4: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4536:7: note: forward declaration of 'struct kvm_msrs'
   include/uapi/linux/kvm.h:1389:61: note: expanded from macro 'KVM_GET_MSRS'
    1389 | #define KVM_GET_MSRS              _IOWR(KVMIO, 0x88, struct kvm_msrs)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4536:7: error: array has incomplete element type 'struct kvm_msrs'
    4536 |         case KVM_GET_MSRS:
         |              ^
   include/uapi/linux/kvm.h:1389:35: note: expanded from macro 'KVM_GET_MSRS'
    1389 | #define KVM_GET_MSRS              _IOWR(KVMIO, 0x88, struct kvm_msrs)
         |                                   ^
   include/uapi/asm-generic/ioctl.h:88:72: note: expanded from macro '_IOWR'
      88 | #define _IOWR(type,nr,argtype)          _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                                                                ^
   include/asm-generic/ioctl.h:13:25: note: expanded from macro '_IOC_TYPECHECK'
      13 |         ((sizeof(t) == sizeof(t[1]) && \
         |                                ^
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4536:7: note: forward declaration of 'struct kvm_msrs'
   include/uapi/linux/kvm.h:1389:61: note: expanded from macro 'KVM_GET_MSRS'
    1389 | #define KVM_GET_MSRS              _IOWR(KVMIO, 0x88, struct kvm_msrs)
         |                                                             ^
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:4536:7: error: invalid application of 'sizeof' to an incomplete type 'struct kvm_msrs'
    4536 |         case KVM_GET_MSRS:
         |              ^~~~~~~~~~~~
   include/uapi/linux/kvm.h:1389:35: note: expanded from macro 'KVM_GET_MSRS'
    1389 | #define KVM_GET_MSRS              _IOWR(KVMIO, 0x88, struct kvm_msrs)
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/asm-generic/ioctl.h:88:72: note: expanded from macro '_IOWR'
      88 | #define _IOWR(type,nr,argtype)          _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(argtype)))
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/ioctl.h:14:4: note: expanded from macro '_IOC_TYPECHECK'
      14 |           sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
         |           ^
   include/uapi/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
      73 |          ((size) << _IOC_SIZESHIFT))
         |            ^~~~
   arch/s390/kvm/../../../virt/kvm/kvm_main.c:4536:7: note: forward declaration of 'struct kvm_msrs'
   include/uapi/linux/kvm.h:1389:61: note: expanded from macro 'KVM_GET_MSRS'
    1389 | #define KVM_GET_MSRS              _IOWR(KVMIO, 0x88, struct kvm_msrs)
         |                                                             ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   1 warning and 20 errors generated.


vim +4530 arch/s390/kvm/../../../virt/kvm/kvm_main.c

  4467	
  4468	static long __kvm_plane_ioctl(struct kvm_plane *plane, unsigned int ioctl,
  4469				      unsigned long arg)
  4470	{
> 4471		void __user *argp = (void __user *)arg;
  4472	
  4473		switch (ioctl) {
  4474	#ifdef CONFIG_HAVE_KVM_MSI
  4475		case KVM_SIGNAL_MSI: {
  4476			struct kvm_msi msi;
  4477	
  4478			if (copy_from_user(&msi, argp, sizeof(msi)))
  4479				return -EFAULT;
  4480			return kvm_send_userspace_msi(plane, &msi);
  4481		}
  4482	#endif
  4483	#ifdef CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES
  4484		case KVM_SET_MEMORY_ATTRIBUTES: {
  4485			struct kvm_memory_attributes attrs;
  4486	
  4487			if (copy_from_user(&attrs, argp, sizeof(attrs)))
  4488				return -EFAULT;
  4489			return kvm_vm_ioctl_set_mem_attributes(plane, &attrs);
  4490		}
  4491	#endif
  4492		case KVM_CHECK_EXTENSION:
  4493			return kvm_plane_ioctl_check_extension(plane, arg);
  4494		case KVM_CREATE_VCPU_PLANE:
  4495			return kvm_plane_ioctl_create_vcpu(plane, arg);
  4496		default:
  4497			return -ENOTTY;
  4498		}
  4499	}
  4500	
  4501	static long kvm_plane_ioctl(struct file *filp, unsigned int ioctl,
  4502				     unsigned long arg)
  4503	{
  4504		struct kvm_plane *plane = filp->private_data;
  4505	
  4506		if (plane->kvm->mm != current->mm || plane->kvm->vm_dead)
  4507			return -EIO;
  4508	
  4509		return __kvm_plane_ioctl(plane, ioctl, arg);
  4510	}
  4511	
  4512	static int kvm_plane_release(struct inode *inode, struct file *filp)
  4513	{
  4514		struct kvm_plane *plane = filp->private_data;
  4515	
  4516		kvm_put_kvm(plane->kvm);
  4517		return 0;
  4518	}
  4519	
  4520	static struct file_operations kvm_plane_fops = {
  4521		.unlocked_ioctl = kvm_plane_ioctl,
  4522		.release = kvm_plane_release,
  4523		KVM_COMPAT(kvm_plane_ioctl),
  4524	};
  4525	
  4526	
  4527	static inline bool kvm_arch_is_vcpu_plane_ioctl(unsigned ioctl)
  4528	{
  4529		switch (ioctl) {
> 4530		case KVM_GET_DEBUGREGS:
  4531		case KVM_SET_DEBUGREGS:
  4532		case KVM_GET_FPU:
  4533		case KVM_SET_FPU:
> 4534		case KVM_GET_LAPIC:
  4535		case KVM_SET_LAPIC:
> 4536		case KVM_GET_MSRS:
  4537		case KVM_SET_MSRS:
  4538		case KVM_GET_NESTED_STATE:
  4539		case KVM_SET_NESTED_STATE:
  4540		case KVM_GET_ONE_REG:
  4541		case KVM_SET_ONE_REG:
  4542		case KVM_GET_REGS:
  4543		case KVM_SET_REGS:
  4544		case KVM_GET_SREGS:
  4545		case KVM_SET_SREGS:
  4546		case KVM_GET_SREGS2:
  4547		case KVM_SET_SREGS2:
  4548		case KVM_GET_VCPU_EVENTS:
  4549		case KVM_SET_VCPU_EVENTS:
  4550		case KVM_GET_XCRS:
  4551		case KVM_SET_XCRS:
  4552		case KVM_GET_XSAVE:
  4553		case KVM_GET_XSAVE2:
  4554		case KVM_SET_XSAVE:
  4555	
  4556		case KVM_GET_REG_LIST:
  4557		case KVM_TRANSLATE:
  4558			return true;
  4559	
  4560		default:
  4561			return false;
  4562		}
  4563	}
  4564	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-04-02 18:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202504030136.Uapa2ld0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=farrah.chen@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    /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.