From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH v4 09/10] i40e/vf_migration: register a migration vendor region
Date: Mon, 18 May 2020 14:47:23 +0800 [thread overview]
Message-ID: <202005181406.WN1KeVPU%lkp@intel.com> (raw)
In-Reply-To: <20200518025400.14547-1-yan.y.zhao@intel.com>
[-- Attachment #1: Type: text/plain, Size: 10815 bytes --]
Hi Yan,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on vfio/next]
[also build test ERROR on jkirsher-next-queue/dev-queue linus/master v5.7-rc6 next-20200515]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Yan-Zhao/Introduce-vendor-ops-in-vfio-pci/20200518-110542
base: https://github.com/awilliam/linux-vfio.git next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c: In function 'i40e_vf_set_device_state':
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:132:22: error: dereferencing pointer to incomplete type 'struct vfio_device_migration_info'
if (state == mig_ctl->device_state)
^~
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:136:7: error: 'VFIO_DEVICE_STATE_RUNNING' undeclared (first use in this function); did you mean 'VFIO_EEH_PE_STATE_UNAVAIL'?
case VFIO_DEVICE_STATE_RUNNING:
^~~~~~~~~~~~~~~~~~~~~~~~~
VFIO_EEH_PE_STATE_UNAVAIL
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:136:7: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:138:7: error: 'VFIO_DEVICE_STATE_SAVING' undeclared (first use in this function); did you mean 'VFIO_DEVICE_STATE_RUNNING'?
case VFIO_DEVICE_STATE_SAVING | VFIO_DEVICE_STATE_RUNNING:
^~~~~~~~~~~~~~~~~~~~~~~~
VFIO_DEVICE_STATE_RUNNING
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:144:7: error: 'VFIO_DEVICE_STATE_STOP' undeclared (first use in this function); did you mean 'VFIO_DEVICE_STATE_SAVING'?
case VFIO_DEVICE_STATE_STOP:
^~~~~~~~~~~~~~~~~~~~~~
VFIO_DEVICE_STATE_SAVING
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:149:7: error: 'VFIO_DEVICE_STATE_RESUMING' undeclared (first use in this function); did you mean 'VFIO_DEVICE_STATE_SAVING'?
case VFIO_DEVICE_STATE_RESUMING:
^~~~~~~~~~~~~~~~~~~~~~~~~~
VFIO_DEVICE_STATE_SAVING
In file included from <command-line>:0:0:
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c: In function 'i40e_vf_region_migration_rw':
>> include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct vfio_device_migration_info'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:166:23: note: in expansion of macro 'offsetof'
#define VDM_OFFSET(x) offsetof(struct vfio_device_migration_info, x)
^~~~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:172:7: note: in expansion of macro 'VDM_OFFSET'
case VDM_OFFSET(device_state):
^~~~~~~~~~
>> include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct vfio_device_migration_info'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:166:23: note: in expansion of macro 'offsetof'
#define VDM_OFFSET(x) offsetof(struct vfio_device_migration_info, x)
^~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:195:7: note: in expansion of macro 'VDM_OFFSET'
case VDM_OFFSET(reserved):
^~~~~~~~~~
>> include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct vfio_device_migration_info'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:166:23: note: in expansion of macro 'offsetof'
#define VDM_OFFSET(x) offsetof(struct vfio_device_migration_info, x)
^~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:199:7: note: in expansion of macro 'VDM_OFFSET'
case VDM_OFFSET(pending_bytes):
^~~~~~~~~~
>> include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct vfio_device_migration_info'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:166:23: note: in expansion of macro 'offsetof'
#define VDM_OFFSET(x) offsetof(struct vfio_device_migration_info, x)
^~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:216:7: note: in expansion of macro 'VDM_OFFSET'
case VDM_OFFSET(data_offset):
^~~~~~~~~~
>> include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct vfio_device_migration_info'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:166:23: note: in expansion of macro 'offsetof'
#define VDM_OFFSET(x) offsetof(struct vfio_device_migration_info, x)
^~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:225:7: note: in expansion of macro 'VDM_OFFSET'
case VDM_OFFSET(data_size):
^~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_vf_migration.c: In function 'i40e_vf_open':
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:385:12: error: 'VFIO_REGION_TYPE_MIGRATION' undeclared (first use in this function); did you mean 'VFIO_REGION_TYPE_GFX'?
VFIO_REGION_TYPE_MIGRATION,
^~~~~~~~~~~~~~~~~~~~~~~~~~
VFIO_REGION_TYPE_GFX
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:386:12: error: 'VFIO_REGION_SUBTYPE_MIGRATION' undeclared (first use in this function); did you mean 'VFIO_REGION_TYPE_MIGRATION'?
VFIO_REGION_SUBTYPE_MIGRATION,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VFIO_REGION_TYPE_MIGRATION
In file included from drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:16:0:
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.h:20:37: error: invalid application of 'sizeof' to incomplete type 'struct vfio_device_migration_info'
#define MIGRATION_REGION_SZ (sizeof(struct vfio_device_migration_info))
^
>> drivers/net/ethernet/intel/i40e/i40e_vf_migration.c:388:12: note: in expansion of macro 'MIGRATION_REGION_SZ'
MIGRATION_REGION_SZ,
^~~~~~~~~~~~~~~~~~~
vim +132 drivers/net/ethernet/intel/i40e/i40e_vf_migration.c
125
126 static size_t i40e_vf_set_device_state(struct i40e_vf_migration *i40e_vf_dev,
127 u32 state)
128 {
129 int ret = 0;
130 struct vfio_device_migration_info *mig_ctl = i40e_vf_dev->mig_ctl;
131
> 132 if (state == mig_ctl->device_state)
133 return 0;
134
135 switch (state) {
> 136 case VFIO_DEVICE_STATE_RUNNING:
137 break;
> 138 case VFIO_DEVICE_STATE_SAVING | VFIO_DEVICE_STATE_RUNNING:
139 ret = i40e_vf_prepare_dirty_track(i40e_vf_dev);
140 break;
141 case VFIO_DEVICE_STATE_SAVING:
142 // do the last round of dirty page scanning
143 break;
> 144 case VFIO_DEVICE_STATE_STOP:
145 // release dirty page tracking resources
146 if (mig_ctl->device_state == VFIO_DEVICE_STATE_SAVING)
147 i40e_vf_stop_dirty_track(i40e_vf_dev);
148 break;
> 149 case VFIO_DEVICE_STATE_RESUMING:
150 break;
151 default:
152 ret = -EFAULT;
153 }
154
155 if (!ret)
156 mig_ctl->device_state = state;
157
158 return ret;
159 }
160
161 static
162 ssize_t i40e_vf_region_migration_rw(struct i40e_vf_migration *i40e_vf_dev,
163 char __user *buf, size_t count,
164 loff_t *ppos, bool iswrite)
165 {
> 166 #define VDM_OFFSET(x) offsetof(struct vfio_device_migration_info, x)
167 struct vfio_device_migration_info *mig_ctl = i40e_vf_dev->mig_ctl;
168 u64 pos = *ppos & VFIO_PCI_OFFSET_MASK;
169 int ret = 0;
170
171 switch (pos) {
> 172 case VDM_OFFSET(device_state):
173 if (count != sizeof(mig_ctl->device_state)) {
174 ret = -EINVAL;
175 break;
176 }
177
178 if (iswrite) {
179 u32 device_state;
180
181 if (copy_from_user(&device_state, buf, count)) {
182 ret = -EFAULT;
183 break;
184 }
185
186 ret = i40e_vf_set_device_state(i40e_vf_dev,
187 device_state) ?
188 ret : count;
189 } else {
190 ret = copy_to_user(buf, &mig_ctl->device_state,
191 count) ? -EFAULT : count;
192 }
193 break;
194
195 case VDM_OFFSET(reserved):
196 ret = -EFAULT;
197 break;
198
199 case VDM_OFFSET(pending_bytes):
200 {
201 if (count != sizeof(mig_ctl->pending_bytes)) {
202 ret = -EINVAL;
203 break;
204 }
205
206 if (iswrite)
207 ret = -EFAULT;
208 else
209 ret = copy_to_user(buf,
210 &mig_ctl->pending_bytes,
211 count) ? -EFAULT : count;
212
213 break;
214 }
215
216 case VDM_OFFSET(data_offset):
217 {
218 /* as we don't support device internal dirty data
219 * and our pending_bytes is always 0,
220 * return error here.
221 */
222 ret = -EFAULT;
223 break;
224 }
225 case VDM_OFFSET(data_size):
226 if (count != sizeof(mig_ctl->data_size)) {
227 ret = -EINVAL;
228 break;
229 }
230
231 if (iswrite)
232 ret = copy_from_user(&mig_ctl->data_size, buf, count) ?
233 -EFAULT : count;
234 else
235 ret = copy_to_user(buf, &mig_ctl->data_size, count) ?
236 -EFAULT : count;
237 break;
238
239 default:
240 ret = -EFAULT;
241 break;
242 }
243 return ret;
244 }
245
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 71443 bytes --]
next prev parent reply other threads:[~2020-05-18 6:47 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 2:42 [RFC PATCH v4 00/10] Introduce vendor ops in vfio-pci Yan Zhao
2020-05-18 2:43 ` [RFC PATCH v4 01/10] vfio/pci: register/unregister vfio_pci_vendor_driver_ops Yan Zhao
2020-05-18 2:45 ` [RFC PATCH v4 02/10] vfio/pci: macros to generate module_init and module_exit for vendor modules Yan Zhao
2020-06-04 15:01 ` Cornelia Huck
2020-06-05 2:05 ` Yan Zhao
2020-05-18 2:49 ` [RFC PATCH v4 03/10] vfio/pci: export vendor_data, irq_type, num_regions, pdev and functions in vfio_pci_ops Yan Zhao
2020-05-18 2:49 ` [RFC PATCH v4 04/10] vfio/pci: let vfio_pci know number of vendor regions and vendor irqs Yan Zhao
2020-06-04 15:25 ` Cornelia Huck
2020-06-05 2:15 ` Yan Zhao
2020-06-11 12:31 ` David Edmondson
2020-06-11 23:09 ` Yan Zhao
2020-05-18 2:50 ` [RFC PATCH v4 05/10] vfio/pci: export vfio_pci_get_barmap Yan Zhao
2020-05-18 6:37 ` kbuild test robot
2020-05-18 2:50 ` [RFC PATCH v4 06/10] vfio: Define device specific irq type capability Yan Zhao
2020-05-18 2:52 ` [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION Yan Zhao
2020-05-18 2:56 ` [QEMU RFC PATCH v4] hw/vfio/pci: remap bar region irq Yan Zhao
2020-05-29 21:45 ` [RFC PATCH v4 07/10] vfio/pci: introduce a new irq type VFIO_IRQ_TYPE_REMAP_BAR_REGION Alex Williamson
2020-06-01 6:57 ` Yan Zhao
2020-06-01 16:43 ` Alex Williamson
2020-06-02 8:28 ` Yan Zhao
2020-06-02 19:34 ` Alex Williamson
2020-06-03 1:40 ` Yan Zhao
2020-06-03 23:04 ` Alex Williamson
2020-06-04 2:42 ` Yan Zhao
2020-06-04 4:10 ` Alex Williamson
2020-06-05 0:26 ` He, Shaopeng
2020-06-05 17:54 ` Alex Williamson
2020-06-05 2:02 ` Yan Zhao
2020-06-05 16:13 ` Alex Williamson
2020-06-10 5:23 ` Yan Zhao
2020-06-19 22:55 ` Alex Williamson
2020-06-22 3:34 ` Yan Zhao
2020-05-18 2:53 ` [RFC PATCH v4 08/10] i40e/vf_migration: VF live migration - pass-through VF first Yan Zhao
2020-05-18 8:49 ` kbuild test robot
2020-05-18 8:49 ` [RFC PATCH] i40e/vf_migration: i40e_vf_release() can be static kbuild test robot
2020-06-10 8:59 ` [RFC PATCH v4 08/10] i40e/vf_migration: VF live migration - pass-through VF first Xiang Zheng
2020-06-11 0:23 ` Yan Zhao
2020-06-11 2:27 ` Xiang Zheng
2020-06-11 23:10 ` Yan Zhao
2020-05-18 2:54 ` [RFC PATCH v4 09/10] i40e/vf_migration: register a migration vendor region Yan Zhao
2020-05-18 6:47 ` kbuild test robot [this message]
2020-05-18 2:54 ` [RFC PATCH v4 10/10] i40e/vf_migration: vendor defined irq_type to support dynamic bar map Yan Zhao
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=202005181406.WN1KeVPU%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.