{"action":"created","issue":{"url":"https://api.github.com/repos/projectacrn/acrn-kernel/issues/112","repository_url":"https://api.github.com/repos/projectacrn/acrn-kernel","labels_url":"https://api.github.com/repos/projectacrn/acrn-kernel/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/projectacrn/acrn-kernel/issues/112/comments","events_url":"https://api.github.com/repos/projectacrn/acrn-kernel/issues/112/events","html_url":"https://github.com/projectacrn/acrn-kernel/pull/112","id":363603047,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3OTk4NTEy","number":112,"title":"Add ioeventfd and irqfd support for vhm","user":{"login":"shuox","id":36183640,"node_id":"MDQ6VXNlcjM2MTgzNjQw","avatar_url":"https://avatars2.githubusercontent.com/u/36183640?v=4","gravatar_id":"","url":"https://api.github.com/users/shuox","html_url":"https://github.com/shuox","followers_url":"https://api.github.com/users/shuox/followers","following_url":"https://api.github.com/users/shuox/following{/other_user}","gists_url":"https://api.github.com/users/shuox/gists{/gist_id}","starred_url":"https://api.github.com/users/shuox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuox/subscriptions","organizations_url":"https://api.github.com/users/shuox/orgs","repos_url":"https://api.github.com/users/shuox/repos","events_url":"https://api.github.com/users/shuox/events{/privacy}","received_events_url":"https://api.github.com/users/shuox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-25T14:19:11Z","updated_at":"2018-09-27T02:05:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/projectacrn/acrn-kernel/pulls/112","html_url":"https://github.com/projectacrn/acrn-kernel/pull/112","diff_url":"https://github.com/projectacrn/acrn-kernel/pull/112.diff","patch_url":"https://github.com/projectacrn/acrn-kernel/pull/112.patch"},"body":"To support vhost, we need implement call eventfd and notify eventfd in\r\nkernel for it. For ACRN vhm, we implement ioeventfd and irqfd for that.\r\n\r\nioeventfd which is based on eventfd, intends to glue vhm module and\r\nother modules who are interested in guest IOs.\r\nEach ioeventfd registered by userspace can map a PIO/MMIO range of\r\nthe guest to eventfd, and response to signal the eventfd when get the\r\nin-range IO write from guest. Then the other side of eventfd can be\r\nnotified to process the IO request.\r\n\r\nirqfd is based on eventfd too, provides a pipe for injecting guest\r\ninterrupt through a file description writing operation.\r\nEach irqfd registered by userspace can map a interrupt of the guest\r\nto eventfd, and a writing operation on one side of the eventfd will\r\ntrigger the interrupt injection on vhm side.\r\n\r\nv2:\r\n  1) Add some limitations explanation for ioeventfd (suggested by Yakui)\r\n  2) Fix some minor comments from Yakui\r\n  3) Add some comments for structures\r\n\r\nv3:\r\n  1) Add io range overlap check in ioeventfd register (suggested by Yakui)\r\n\r\nv4:\r\n  1) Use (addr,len,data,type) to identify one ioeventfd (suggested by Yu)\r\n  2) Modify ioreq handler logic to make vhm happy.\r\n  3) Add some comments and license header\r\n\r\nShuo Liu (2):\r\n  vhm: add ioeventfd support for ACRN hypervisor service module\r\n  vhm: add irqfd support for ACRN hypervisor service module\r\n\r\n drivers/char/vhm/vhm_dev.c         |  24 ++\r\n drivers/vhm/Makefile               |   2 +-\r\n drivers/vhm/vhm_ioeventfd.c        | 473 +++++++++++++++++++++++++++++++++++++\r\n drivers/vhm/vhm_irqfd.c            | 381 +++++++++++++++++++++++++++++\r\n include/linux/vhm/vhm_eventfd.h    |  16 ++\r\n include/linux/vhm/vhm_ioctl_defs.h |  23 ++\r\n 6 files changed, 918 insertions(+), 1 deletion(-)\r\n create mode 100644 drivers/vhm/vhm_ioeventfd.c\r\n create mode 100644 drivers/vhm/vhm_irqfd.c\r\n create mode 100644 include/linux/vhm/vhm_eventfd.h\r\n\r\nTracked-On: projectacrn/acrn-hypervisor#1329\r\nSigned-off-by: Shuo Liu <shuo.a.liu@intel.com>\r\nReviewed-by: Zhao Yakui <yakui.zhao@intel.com>\r\nReviewed-by: Yu Wang <yu1.wang@intel.com>"},"comment":{"url":"https://api.github.com/repos/projectacrn/acrn-kernel/issues/comments/424932345","html_url":"https://github.com/projectacrn/acrn-kernel/pull/112#issuecomment-424932345","issue_url":"https://api.github.com/repos/projectacrn/acrn-kernel/issues/112","id":424932345,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDkzMjM0NQ==","user":{"login":"shuox","id":36183640,"node_id":"MDQ6VXNlcjM2MTgzNjQw","avatar_url":"https://avatars2.githubusercontent.com/u/36183640?v=4","gravatar_id":"","url":"https://api.github.com/users/shuox","html_url":"https://github.com/shuox","followers_url":"https://api.github.com/users/shuox/followers","following_url":"https://api.github.com/users/shuox/following{/other_user}","gists_url":"https://api.github.com/users/shuox/gists{/gist_id}","starred_url":"https://api.github.com/users/shuox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuox/subscriptions","organizations_url":"https://api.github.com/users/shuox/orgs","repos_url":"https://api.github.com/users/shuox/repos","events_url":"https://api.github.com/users/shuox/events{/privacy}","received_events_url":"https://api.github.com/users/shuox/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T02:05:32Z","updated_at":"2018-09-27T02:05:32Z","author_association":"CONTRIBUTOR","body":"> @shuox Could you please rebase and fix the conflicts of drivers/vhm/Makefile\r\n\r\nDone. "}}
{"actor":{"display_login":"shuox"}}