Re: [RFC PATCH 09/15] drivers/acrn: add passthrough device support

2019-09-01 Thread Zhao, Yakui
On 2019年08月16日 21:05, Dan Carpenter wrote: On Fri, Aug 16, 2019 at 10:25:50AM +0800, Zhao Yakui wrote: + case IC_ASSIGN_PTDEV: { + unsigned short bdf; + + if (copy_from_user(, (void *)ioctl_param, This casting is ugly and you also need a __user tag for

Re: [RFC PATCH 09/15] drivers/acrn: add passthrough device support

2019-08-16 Thread Dan Carpenter
On Fri, Aug 16, 2019 at 10:25:50AM +0800, Zhao Yakui wrote: > + case IC_ASSIGN_PTDEV: { > + unsigned short bdf; > + > + if (copy_from_user(, (void *)ioctl_param, This casting is ugly and you also need a __user tag for Sparse. Do something like "void __user *p =

[RFC PATCH 09/15] drivers/acrn: add passthrough device support

2019-08-15 Thread Zhao Yakui
Pass-through device plays an important role for guest OS when it is accessed exclusively by guest OS. This is critical for the performance scenario. After one PCI device is assigned to guest OS, it can be accessed exclusively by guest system. It can avoid the device emulation and provide the