linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/13] introduce the Xen PV Calls frontend
@ 2017-07-31 22:57 Stefano Stabellini
  2017-07-31 22:57 ` [PATCH v3 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend Stefano Stabellini
  2017-08-10 15:07 ` [PATCH v3 00/13] introduce the Xen PV Calls frontend Boris Ostrovsky
  0 siblings, 2 replies; 45+ messages in thread
From: Stefano Stabellini @ 2017-07-31 22:57 UTC (permalink / raw)
  To: xen-devel; +Cc: linux-kernel, sstabellini, jgross, boris.ostrovsky

Hi all,

this series introduces the frontend for the newly introduced PV Calls
procotol.

PV Calls is a paravirtualized protocol that allows the implementation of
a set of POSIX functions in a different domain. The PV Calls frontend
sends POSIX function calls to the backend, which implements them and
returns a value to the frontend and acts on the function call.

For more information about PV Calls, please read:

https://xenbits.xen.org/docs/unstable/misc/pvcalls.html

This patch series only implements the frontend driver. It doesn't
attempt to redirect POSIX calls to it. The functions exported in
pvcalls-front.h are meant to be used for that. A separate patch series
will be sent to use them and hook them into the system.



Changes in v3:

In addition to addressing all comments, in this version of the series I
also made one other significant change: I implemented non-blocking
accept, which I didn't realize was missing in the last version of the
series (non-blocking accept is usually called only after a successful
poll, when there are already outstanding connections to accept). To do
that, I also changed the id for sockets sent to the backend from the
value of the struct socket pointer to the value of the struct
sock_mapping pointer. It's all documented in the patch descriptions.
This is the full list of changes:

- use struct sock_mapping* instead of struct socket* as socket id to
  share with the backend
- allocate struct sock_mapping for a socket in pvcalls_front_socket
- in pvcalls_front_accept check if the request is non-blocking and
  return -EAGAIN in that case
- store req_id and struct sock_mapping * of an inflight accept request,
  so that we can resume when it's ready, in case the accept is
  non-blocking
- remove unnecessary parenthesis
- rename RING_ORDER to PVCALLS_RING_ORDER
- make pvcalls_front_dev static
- remove ref local variable from pvcalls_front_probe
- move patch #12 before patch #2
- move dev_set_drvdata before any got error in pvcalls_front_probe
- combine src and dst calculation lines in pvcalls_front_event_handler
- remove unnecessary != 0 in the wait_event and wait_event_interruptible
  tests
- add an in-code comment about sk_send_head
- In v2 I applied some changes to the wrong patch. Move changes to the
  right patches.
- refactor the code to get a req_id into a function
- use wait_event (instead of wait_event_interruptible) to wait for a
  response from the backend because we cannot cope with missing
  responses
- remove the usage of PVCALLS_FRONT_MAX_SPIN from recvmsg
- remove unnecessary !bedata check in pvcalls_front_release 



Changes in v2:
- use xenbus_read_unsigned when possible
- call dev_set_drvdata earlier in pvcalls_front_probe not to dereference
  a NULL pointer in the error path
- set ret appropriately in pvcalls_front_probe
- include pvcalls-front.h in pvcalls-front.c
- call wake_up only once after the consuming loop in pvcalls_front_event_handler
- don't leak "bytes" in case of errors in create_active
- call spin_unlock appropriately in case of errors in create_active
- remove all BUG_ONs
- don't leak newsock->sk in pvcalls_front_accept in case of errors
- rename PVCALLS_FRON_MAX_SPIN to PVCALLS_FRONT_MAX_SPIN
- return bool from pvcalls_front_read_todo
- add a barrier after setting PVCALLS_FLAG_POLL_RET in
  pvcalls_front_event_handler
- remove outdated comment in pvcalls_front_free_map
- clear sock->sk->sk_send_head later in pvcalls_front_release
- make XEN_PVCALLS_FRONTEND tristate
- don't add an empty resume function



Stefano Stabellini (13):
      xen/pvcalls: introduce the pvcalls xenbus frontend
      xen/pvcalls: implement frontend disconnect
      xen/pvcalls: connect to the backend
      xen/pvcalls: implement socket command and handle events
      xen/pvcalls: implement connect command
      xen/pvcalls: implement bind command
      xen/pvcalls: implement listen command
      xen/pvcalls: implement accept command
      xen/pvcalls: implement sendmsg
      xen/pvcalls: implement recvmsg
      xen/pvcalls: implement poll command
      xen/pvcalls: implement release command
      xen: introduce a Kconfig option to enable the pvcalls frontend

 drivers/xen/Kconfig         |    9 +
 drivers/xen/Makefile        |    1 +
 drivers/xen/pvcalls-front.c | 1140 +++++++++++++++++++++++++++++++++++++++++++
 drivers/xen/pvcalls-front.h |   28 ++
 4 files changed, 1178 insertions(+)
 create mode 100644 drivers/xen/pvcalls-front.c
 create mode 100644 drivers/xen/pvcalls-front.h

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2017-09-12 23:19 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 22:57 [PATCH v3 00/13] introduce the Xen PV Calls frontend Stefano Stabellini
2017-07-31 22:57 ` [PATCH v3 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 02/13] xen/pvcalls: implement frontend disconnect Stefano Stabellini
2017-08-11 22:43     ` Boris Ostrovsky
2017-09-09  0:07       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 03/13] xen/pvcalls: connect to the backend Stefano Stabellini
2017-08-11 22:55     ` Boris Ostrovsky
2017-09-09  0:14       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 04/13] xen/pvcalls: implement socket command and handle events Stefano Stabellini
2017-08-13  0:42     ` Boris Ostrovsky
2017-09-08 23:20       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 05/13] xen/pvcalls: implement connect command Stefano Stabellini
2017-08-13  1:12     ` Boris Ostrovsky
2017-09-08 21:23       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 06/13] xen/pvcalls: implement bind command Stefano Stabellini
2017-08-13  1:22     ` Boris Ostrovsky
2017-09-08 21:46       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 07/13] xen/pvcalls: implement listen command Stefano Stabellini
2017-08-13  1:28     ` Boris Ostrovsky
2017-07-31 22:57   ` [PATCH v3 08/13] xen/pvcalls: implement accept command Stefano Stabellini
2017-08-15  2:00     ` Boris Ostrovsky
2017-08-15  2:04       ` Boris Ostrovsky
2017-09-08 21:58         ` Stefano Stabellini
2017-09-08 22:16       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 09/13] xen/pvcalls: implement sendmsg Stefano Stabellini
2017-08-15  2:31     ` Boris Ostrovsky
2017-09-08 23:48       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 10/13] xen/pvcalls: implement recvmsg Stefano Stabellini
2017-08-15  2:39     ` Boris Ostrovsky
2017-09-08 23:11       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 11/13] xen/pvcalls: implement poll command Stefano Stabellini
2017-08-15 20:30     ` Boris Ostrovsky
2017-09-08 23:03       ` Stefano Stabellini
2017-09-12 14:14         ` Boris Ostrovsky
2017-09-12 22:17           ` Stefano Stabellini
2017-09-12 23:04             ` Boris Ostrovsky
2017-09-12 23:13               ` Stefano Stabellini
2017-09-12 23:18                 ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 12/13] xen/pvcalls: implement release command Stefano Stabellini
2017-08-15 20:44     ` Boris Ostrovsky
2017-09-08 23:09       ` Stefano Stabellini
2017-07-31 22:57   ` [PATCH v3 13/13] xen: introduce a Kconfig option to enable the pvcalls frontend Stefano Stabellini
2017-08-11 22:36   ` [PATCH v3 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend Boris Ostrovsky
2017-08-10 15:07 ` [PATCH v3 00/13] introduce the Xen PV Calls frontend Boris Ostrovsky
2017-08-10 18:15   ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).