]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
libxc: xc_memshr_fork with interrupts blocked
authorTamas K Lengyel <tamas.lengyel@intel.com>
Tue, 16 Jun 2020 08:30:48 +0000 (10:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 16 Jun 2020 08:30:48 +0000 (10:30 +0200)
Toolstack side for creating forks with interrupt injection blocked.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Release-acked-by: Paul Durrant <paul@xen.org>
tools/libxc/include/xenctrl.h
tools/libxc/xc_memshr.c

index 113ddd935da90469acadd883f95b9f7b261547d3..7f15a61f29d85f6659d905c9445381ace06cf5dd 100644 (file)
@@ -2240,7 +2240,8 @@ int xc_memshr_range_share(xc_interface *xch,
 int xc_memshr_fork(xc_interface *xch,
                    uint32_t source_domain,
                    uint32_t client_domain,
-                   bool allow_with_iommu);
+                   bool allow_with_iommu,
+                   bool block_interrupts);
 
 /*
  * Note: this function is only intended to be used on short-lived forks that
index 2300cc70755bc048286f4cb44f495f24fcd8eb99..a6cfd7dccf0a0b0281db73f25aaca1ffdf95450b 100644 (file)
@@ -240,7 +240,7 @@ int xc_memshr_debug_gref(xc_interface *xch,
 }
 
 int xc_memshr_fork(xc_interface *xch, uint32_t pdomid, uint32_t domid,
-                   bool allow_with_iommu)
+                   bool allow_with_iommu, bool block_interrupts)
 {
     xen_mem_sharing_op_t mso;
 
@@ -251,6 +251,8 @@ int xc_memshr_fork(xc_interface *xch, uint32_t pdomid, uint32_t domid,
 
     if ( allow_with_iommu )
         mso.u.fork.flags |= XENMEM_FORK_WITH_IOMMU_ALLOWED;
+    if ( block_interrupts )
+        mso.u.fork.flags |= XENMEM_FORK_BLOCK_INTERRUPTS;
 
     return xc_memshr_memop(xch, domid, &mso);
 }