Skip to content

Per vcpu vm_event channels

Petre Pircalabu xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 44 repliesIn review
  2. v19 patches 29 repliesSuperseded

Changes in v2 from the cover letter

* Dropped the "tools/libxc: Consistent usage of xc_vm_event_* interface" because it was not a hard requirement for this patchset.
* Removed sched.h from vm_event.h and replaced it fw declarations of "struct domain" and "struct vm"event_domain"
* Reworked the vm_event_ng memory allocation mechanism to use vzalloc/share_xen_page_with_guest.
* Replaced the new domctl with a flag in the existing one. When the client (libxc) wants to use the new interface the XEN_VM_EVENT_FLAGS_NG_OP bit should be set. Also, the file xen/common/vm_event_ng.c was removed because the domctl is shared between interfaces, and having 2 separated files would unnecessary expose non-interface functions.
* The xen-access related patch was split in 3 new ones:
* getopt_long for cmdline parsing
* code-cleanup according to the XEN style guide
* the vm_event_ng interface support

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10vm_event: Define VM_EVENT typetools/libxc/include/xenctrl.h tools/libxc/xc_mem_paging.c tools/libxc/xc_memshr.c +6 more+81 -1194 replies
2/10vm_event: Remove "ring" suffix from vm_event_check_ringxen/arch/arm/mem_access.c xen/arch/x86/mm/mem_access.c xen/arch/x86/mm/mem_paging.c +4 more+20 -201 reply
3/10vm_event: Add 'struct domain' backpointer to vm_event_domain.xen/common/vm_event.c xen/include/xen/sched.h+4 -02 replies
4/10vm_event: Simplify vm_event interfacexen/arch/x86/mm/mem_sharing.c xen/arch/x86/mm/p2m.c xen/common/monitor.c +2 more+34 -392 replies
5/10vm_event: Move struct vm_event_domain to vm_event.cxen/common/vm_event.c xen/include/xen/sched.h+27 -252 replies
6/10vm_event: Decouple implementation details from interface.xen/common/vm_event.c xen/include/xen/vm_event.h+236 -1920 replies
7/10vm_event: Add vm_event_ng interfacetools/libxc/include/xenctrl.h tools/libxc/xc_mem_paging.c tools/libxc/xc_memshr.c +9 more+684 -11927 replies
8/10xen-access: Use getopt_long for cmdline parsingtools/tests/xen-access/xen-access.c+35 -252 replies
9/10xen-access: Code cleanuptools/tests/xen-access/xen-access.c+33 -242 replies
10/10xen-access: Add support for vm_event_ng interfacetools/tests/xen-access/Makefile tools/tests/xen-access/vm-event-ng.c tools/tests/xen-access/vm-event.c +2 more+582 -2410 replies

Reviews trailers per patch

6 of 10 patches have a Reviewed-by or Acked-by.

PatchAndrew CooperTamas K LengyelAlexandru Isaila
1/10
2/10A-b A-b R-b
3/10A-b
4/10A-b R-b
5/10A-b A-b
6/10
7/10
8/10A-b R-b
9/10A-b R-b
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [Xen-devel] [PATCH v2 00/10] Per vcpu vm_event channels

This patchset adds a new mechanism of sending synchronous vm_event requests and handling vm_event responses without using a ring. As each synchronous request pauses the vcpu until the corresponding response is handled, it can be stored in a slotted memory buffer (one per vcpu) shared between the hypervisor and the controlling domain.

The main advantages of this approach are:
* the ability to dynamicaly allocate the necessary memory used to hold the requests/responses (the size of vm_event_request_t/vm_event_response_t can grow unrestricted by the ring's one page limitation)
* the ring's waitqueue logic is unnecessary in this case because the vcpu sending the request is blocked until a response is received.

---
Changes from v1:

* Dropped the "tools/libxc: Consistent usage of xc_vm_event_* interface" because it was not a hard requirement for this patchset.
* Removed sched.h from vm_event.h and replaced it fw declarations of "struct domain" and "struct vm"event_domain"
* Reworked the vm_event_ng memory allocation mechanism to use vzalloc/share_xen_page_with_guest.
* Replaced the new domctl with a flag in the existing one. When the client (libxc) wants to use the new interface the XEN_VM_EVENT_FLAGS_NG_OP bit should be set. Also, the file xen/common/vm_event_ng.c was removed because the domctl is shared between interfaces, and having 2 separated files would unnecessary expose non-interface functions.
* The xen-access related patch was split in 3 new ones:
* getopt_long for cmdline parsing
* code-cleanup according to the XEN style guide
* the vm_event_ng interface support

---
Petre Pircalabu (10):
vm_event: Define VM_EVENT type
vm_event: Remove "ring" suffix from vm_event_check_ring
vm_event: Add 'struct domain' backpointer to vm_event_domain.
vm_event: Simplify vm_event interface
vm_event: Move struct vm_event_domain to vm_event.c
vm_event: Decouple implementation details from interface.
vm_event: Add vm_event_ng interface
xen-access: Use getopt_long for cmdline parsing
xen-access: Code cleanup
xen-access: Add support for vm_event_ng interface

 tools/libxc/include/xenctrl.h        |  10 +
 tools/libxc/xc_mem_paging.c          |  13 +-
 tools/libxc/xc_memshr.c              |  13 +-
 tools/libxc/xc_monitor.c             |  27 +-
 tools/libxc/xc_private.h             |  18 +-
 tools/libxc/xc_vm_event.c            | 154 ++++--
 tools/tests/xen-access/Makefile      |   7 +-
 tools/tests/xen-access/vm-event-ng.c | 183 +++++++
 tools/tests/xen-access/vm-event.c    | 194 ++++++++
 tools/tests/xen-access/xen-access.c  | 435 +++++++----------
 tools/tests/xen-access/xen-access.h  |  91 ++++
 xen/arch/arm/mem_access.c            |   2 +-
 xen/arch/x86/mm.c                    |   7 +
 xen/arch/x86/mm/mem_access.c         |   4 +-
 xen/arch/x86/mm/mem_paging.c         |   2 +-
 xen/arch/x86/mm/mem_sharing.c        |   5 +-
 xen/arch/x86/mm/p2m.c                |  10 +-
 xen/common/mem_access.c              |   2 +-
 xen/common/monitor.c                 |   4 +-
 xen/common/vm_event.c                | 912 +++++++++++++++++++++++++----------
 xen/drivers/passthrough/pci.c        |   2 +-
 xen/include/public/domctl.h          |  82 +---
 xen/include/public/memory.h          |   2 +
 xen/include/public/vm_event.h        |  47 ++
 xen/include/xen/sched.h              |  24 +-
 xen/include/xen/vm_event.h           |  80 ++-
 26 files changed, 1631 insertions(+), 699 deletions(-)
 create mode 100644 tools/tests/xen-access/vm-event-ng.c
 create mode 100644 tools/tests/xen-access/vm-event.c
 create mode 100644 tools/tests/xen-access/xen-access.h
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel