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
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 =
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