Re: [RFC PATCH 10/15] drivers/acrn: add interrupt injection support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2019年08月16日 21:12, Dan Carpenter wrote:
On Fri, Aug 16, 2019 at 10:25:51AM +0800, Zhao Yakui wrote:
+	case IC_VM_INTR_MONITOR: {
+		struct page *page;
+
+		ret = get_user_pages_fast(ioctl_param, 1, 1, &page);
+		if (unlikely(ret != 1) || !page) {
                                        ^^^^^^^^
Not required.

Do you mean that it is enough to check the condition of "ret != 1"?
OK. It will be removed.



+			pr_err("acrn-dev: failed to pin intr hdr buffer!\n");
+			return -ENOMEM;
+		}
+
+		ret = hcall_vm_intr_monitor(vm->vmid, page_to_phys(page));
+		if (ret < 0) {
+			pr_err("acrn-dev: monitor intr data err=%ld\n", ret);
+			return -EFAULT;
+		}
+		break;
+	}
+

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux