1
0
Fork 0
alistair23-linux/drivers/xen
Stefano Stabellini 9774c6cca2 xen/pvcalls: implement accept command
Introduce a waitqueue to allow only one outstanding accept command at
any given time and to implement polling on the passive socket. Introduce
a flags field to keep track of in-flight accept and poll commands.

Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make
sure that only one accept command is executed at any given time by
setting PVCALLS_FLAG_ACCEPT_INFLIGHT and waiting on the
inflight_accept_req waitqueue.

Convert the new struct sock_mapping pointer into an uintptr_t and use it
as id for the new socket to pass to the backend.

Check if the accept call is non-blocking: in that case after sending the
ACCEPT command to the backend store the sock_mapping pointer of the new
struct and the inflight req_id then return -EAGAIN (which will respond
only when there is something to accept). Next time accept is called,
we'll check if the ACCEPT command has been answered, if so we'll pick up
where we left off, otherwise we return -EAGAIN again.

Note that, differently from the other commands, we can use
wait_event_interruptible (instead of wait_event) in the case of accept
as we are able to track the req_id of the ACCEPT response that we are
waiting.

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
CC: boris.ostrovsky@oracle.com
CC: jgross@suse.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
2017-10-31 09:05:53 -04:00
..
events xen: fixes and features for 4.14 2017-09-07 10:24:21 -07:00
xen-pciback xen-pciback: relax BAR sizing write value check 2017-09-28 08:26:25 -04:00
xenbus xen: don't compile pv-specific parts if XEN_PV isn't configured 2017-09-18 09:13:23 -04:00
xenfs xen: Drop un-informative message during boot 2017-07-27 19:55:34 +02:00
Kconfig xen: introduce a Kconfig option to enable the pvcalls backend 2017-08-31 09:45:55 -04:00
Makefile xen: fixes and features for 4.14 2017-09-07 10:24:21 -07:00
acpi.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
arm-device.c Xen: ARM: Zero reserved fields of xatp before making hypervisor call 2017-01-03 10:06:13 -08:00
balloon.c xen: Don't try to call xen_alloc_p2m_entry() on autotranslating guests 2017-08-31 09:45:55 -04:00
biomerge.c xen: fix bio vec merging 2017-08-15 10:32:49 -04:00
cpu_hotplug.c xen: modify xenstore watch event interface 2017-02-09 11:26:49 -05:00
dbgp.c xen: Use dev_is_pci() to check whether it is pci device 2014-01-07 09:53:33 -05:00
efi.c xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
evtchn.c xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU 2017-06-13 15:30:27 +02:00
fallback.c xen-pciback: notify hypervisor about devices intended to be assigned to guests 2013-03-22 10:20:55 -04:00
features.c xen: audit usages of module.h ; remove unnecessary instances 2016-03-21 15:13:32 +00:00
gntalloc.c mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
gntdev.c xen/gntdev: avoid out of bounds access in case of partial gntdev_mmap() 2017-10-25 12:48:13 -04:00
grant-table.c xen/grant-table: log the lack of grants 2017-07-23 08:09:43 +02:00
manage.c xen: features and fixes for 4.13-rc1 2017-07-06 19:11:24 -07:00
mcelog.c x86/MCE, xen/mcelog: Make /dev/mcelog registration messages more precise 2017-06-20 23:25:19 +02:00
pci.c xen/pci: Try harder to get PXM information for Xen 2015-04-15 10:57:28 +01:00
pcpu.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
platform-pci.c xen-platform: constify pci_device_id. 2017-08-31 09:45:55 -04:00
preempt.c xen/preempt: use need_resched() instead of should_resched() 2015-08-20 12:24:14 +01:00
privcmd.c xen/privcmd: Support correctly 64KB page granularity when mapping memory 2017-06-07 11:23:14 +02:00
privcmd.h
pvcalls-back.c xen/pvcalls: use WARN_ON(1) instead of __WARN() 2017-08-31 09:45:55 -04:00
pvcalls-front.c xen/pvcalls: implement accept command 2017-10-31 09:05:53 -04:00
pvcalls-front.h xen/pvcalls: implement accept command 2017-10-31 09:05:53 -04:00
swiotlb-xen.c xen-swiotlb: remove xen_swiotlb_set_dma_mask 2017-06-28 06:54:50 -07:00
sys-hypervisor.c xen: add sysfs node for hypervisor build id 2017-06-15 08:50:37 +02:00
time.c xen: add static initialization of steal_clock op to xen_time_ops 2016-07-26 14:07:06 +01:00
tmem.c fs: switch ->s_uuid to uuid_t 2017-06-05 16:59:12 +02:00
xen-acpi-cpuhotplug.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
xen-acpi-memhotplug.c ACPICA: Resources: Provide common part for struct acpi_resource_address structures. 2015-01-26 16:09:56 +01:00
xen-acpi-pad.c xen: rename dom0_op to platform_op 2015-12-21 14:40:55 +00:00
xen-acpi-processor.c xen/acpi: upload PM state from init-domain to Xen 2017-03-23 12:00:02 -04:00
xen-balloon.c xen: fix booting ballooned down hvm guest 2017-10-26 08:11:44 -04:00
xen-scsiback.c xen/scsiback: Make TMF processing slightly faster 2017-07-06 22:58:03 -07:00
xen-selfballoon.c xen: selfballoon: remove unnecessary static in frontswap_selfshrink() 2017-07-27 19:55:41 +02:00
xen-stub.c xen/acpi: remove redundant acpi/acpi_drivers.h include 2013-03-11 13:53:02 -04:00
xlate_mmu.c Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn 2016-07-06 10:34:42 +01:00