[Xen-devel] [PATCH v6 00/15] Argo: hypervisor-mediated interdomain communication

2019-01-23 Thread Christopher Clark
NTAINERS - added comment explaining tx_ptr rounding after iovs processing - BUILD_BUG_ON check for MAX_RING_SIZE align to PAGE_SIZE - use gprintk for error on denied registration of existing ring Christopher Clark (15): argo: Introduce the Kconfig option to govern inclusion of Argo argo: i

[Xen-devel] [PATCH v6 11/15] xsm, argo: XSM control for argo register

2019-01-23 Thread Christopher Clark
d in order for 'const' to be accepted in signature of functions that invoke them. Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf v3 Daniel/Jan: add to the default xsm policy for the register op v3 hoist opt_argo_mac_permissive check to allow default policy to match non-

[Xen-devel] [PATCH v6 01/15] argo: Introduce the Kconfig option to govern inclusion of Argo

2019-01-23 Thread Christopher Clark
option depends on EXPERT and Argo is currently an experimental feature. Signed-off-by: Christopher Clark Acked-by: Jan Beulich === Jan's ack only stands for committing this together with at least one patch actually using the CONFIG_ARGO symbol. v3 added Jan's Ack v2 #01 feedback, Ja

[Xen-devel] [PATCH v6 03/15] argo: define argo_dprintk for subsystem debugging

2019-01-23 Thread Christopher Clark
A convenience for working on development of the argo subsystem: setting a #define variable enables additional debug messages. Signed-off-by: Christopher Clark Acked-by: Jan Beulich Reviewed-by: Roger Pau Monné === Jan's further remark given with the Ack: "This would better be

[Xen-devel] [PATCH v6 04/15] argo: init, destroy and soft-reset, with enable command line opt

2019-01-23 Thread Christopher Clark
se in this series (which is based on [1]). Signed-off-by: Christopher Clark Acked-by: Lars Kurth Reviewed-by: Ross Philipson v5 #04 Roger: tweak command line doc: remove statement about top level bool v5: add compat validation macros to primary source file: common/argo.c v5: dropped external file

[Xen-devel] [PATCH v6 10/15] argo: implement the notify op

2019-01-23 Thread Christopher Clark
quent notifications. Limit the maximum number of notify requests in a single operation to a simple fixed limit of 256. Signed-off-by: Christopher Clark v5: add EBUSY ent flag when too many domains are already on pending list v5: reorder notify flags: error flags last, fixed state first v5: add c

[Xen-devel] [PATCH v6 05/15] errno: add POSIX error codes EMSGSIZE, ECONNREFUSED to the ABI

2019-01-23 Thread Christopher Clark
EMSGSIZE : "Message too large" ECONNREFUSED : "Connection refused". The numeric values assigned to each are taken from Linux, as is the case for the existing error codes. EMSGSIZE : 90 ECONNREFUSED : 111 Signed-off-by: Christopher Clark Acked-by: Jan Beulich ---

[Xen-devel] [PATCH v6 12/15] xsm, argo: XSM control for argo message send operation

2019-01-23 Thread Christopher Clark
Default policy: allow. Signed-off-by: Christopher Clark Reviewed-by: Paul Durrant Acked-by: Daniel De Graaf v3 Daniel/Jan: add to the default xsm policy for the send op v3 Add Daniel's Acked-by v2: reordered commit sequence to after sendv implementation v1 feedback Jan #16: apply con

[Xen-devel] [PATCH v6 07/15] argo: implement the register op

2019-01-23 Thread Christopher Clark
late hypercall args. This hypercall op and its interface currently only supports 4K-sized pages. Signed-off-by: Christopher Clark v5 #07 Roger: add BUILD_BUG_ON for MAX_RING_SIZE, PAGE_SIZE v5 #07 Roger: gprintk(XENLOG_ERR,.. for denied existing ring v5: add compat validation macros to pr

[Xen-devel] [PATCH v6 15/15] MAINTAINERS: add new section for Argo and self as maintainer

2019-01-23 Thread Christopher Clark
Signed-off-by: Christopher Clark v5 whitespace: tabs --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e99d39e..a0cda4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -158,6 +158,13 @@ S: Supported F: xen/arch/x86/hvm/svm/ F: xen

[Xen-devel] [PATCH v6 14/15] xsm, argo: notify: don't describe rings that cannot be sent to

2019-01-23 Thread Christopher Clark
Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf v3 #10 Roger: drop out label, use return -EFAULT in fill_ring_data v3: Add Daniel's Acked-by --- xen/common/argo.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index ba

[Xen-devel] [PATCH v6 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-01-23 Thread Christopher Clark
L0/L1 nested hypervisor argo communication. Signed-off-by: Christopher Clark v5 #09 Roger: add comment explaining post-iovs tx_ptr round up + wrap v5 #09 Roger: remove redundant len bounds check vs MAX_ARGO_MESSAGE_SIZE v5 #09 Roger: ringbuf_insert: WARN not ERR on empty iovs v5 #09 Roger: bugfix: set

[Xen-devel] [PATCH v6 13/15] xsm, argo: XSM control for any access to argo by a domain

2019-01-23 Thread Christopher Clark
Will inhibit initialization of the domain's argo data structure to prevent receiving any messages or notifications and access to any of the argo hypercall operations. Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf v3 Daniel/Jan: add to the default xsm policy for enable v

[Xen-devel] [PATCH v6 08/15] argo: implement the unregister op

2019-01-23 Thread Christopher Clark
ress space. If the ring had been registered to communicate with a single specified domain (ie. a non-wildcard ring) then the partner domain state is removed from the partner domain's argo send_info hash table. Signed-off-by: Christopher Clark v5: add compat validation macros to primary sour

Re: [Xen-devel] [PATCH v6 02/15] argo: introduce the argo_op hypercall boilerplate

2019-01-25 Thread Christopher Clark
On Thu, Jan 24, 2019 at 2:08 AM Julien Grall wrote: > > Hi, > > On 24/01/2019 02:04, Christopher Clark wrote: > > Presence is gated upon CONFIG_ARGO. > > > > Registers the hypercall previously reserved for this. > > Takes 5 arguments, does nothing and returns

Re: [Xen-devel] [PATCH v6 13/15] xsm, argo: XSM control for any access to argo by a domain

2019-01-25 Thread Christopher Clark
On Fri, Jan 25, 2019 at 5:32 PM Chris Patterson wrote: > > On Wed, Jan 23, 2019 at 9:07 PM Christopher Clark > wrote: > > > > Will inhibit initialization of the domain's argo data structure to > > prevent receiving any messages or notifications and access

Re: [Xen-devel] [PATCH v6 11/15] xsm, argo: XSM control for argo register

2019-01-25 Thread Christopher Clark
On Fri, Jan 25, 2019 at 5:34 PM Chris Patterson wrote: > > On Wed, Jan 23, 2019 at 9:07 PM Christopher Clark > wrote: > > > > XSM controls for argo ring registration with two distinct cases > > --- > > diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h

Re: [Xen-devel] [PATCH v6 11/15] xsm, argo: XSM control for argo register

2019-01-25 Thread Christopher Clark
On Fri, Jan 25, 2019 at 6:10 PM Chris Patterson wrote: > > > -static int domain_has_perm(struct domain *dom1, struct domain *dom2, > > +static int domain_has_perm(const struct domain *dom1, > > + const struct domain *dom2, > > u16 class, u32 pe

Re: [Xen-devel] [PATCH v5 00/15] Argo: hypervisor-mediated interdomain communication

2019-01-30 Thread Christopher Clark
On Tue, Jan 22, 2019 at 6:19 AM Roger Pau Monné wrote: > > On Mon, Jan 21, 2019 at 01:59:40AM -0800, Christopher Clark wrote: > > Version five of this patch series: > > > > * Changes are primarily addressing feedback from the v4 series reviews. > > Many points

Re: [Xen-devel] [PATCH v5 04/15] argo: init, destroy and soft-reset, with enable command line opt

2019-01-30 Thread Christopher Clark
On Mon, Jan 21, 2019 at 9:55 AM Roger Pau Monné wrote: > > On Mon, Jan 21, 2019 at 01:59:44AM -0800, Christopher Clark wrote: > > Initialises basic data structures and performs teardown of argo state > > for domain shutdown. > > > > Inclusion of the Argo implementati

Re: [Xen-devel] [PATCH v5 07/15] argo: implement the register op

2019-01-30 Thread Christopher Clark
On Tue, Jan 22, 2019 at 1:59 AM Roger Pau Monné wrote: > > On Mon, Jan 21, 2019 at 01:59:47AM -0800, Christopher Clark wrote: > > The register op is used by a domain to register a region of memory for > > receiving messages from either a specified other domain, or, if specify

Re: [Xen-devel] [PATCH v5 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-01-30 Thread Christopher Clark
On Tue, Jan 22, 2019 at 4:08 AM Roger Pau Monné wrote: > > On Mon, Jan 21, 2019 at 01:59:49AM -0800, Christopher Clark wrote: > > sendv operation is invoked to perform a synchronous send of buffers > > contained in iovs to a remote domain's registered ring. > > >

Re: [Xen-devel] [PATCH v5 10/15] argo: implement the notify op

2019-01-30 Thread Christopher Clark
On Tue, Jan 22, 2019 at 6:14 AM Roger Pau Monné wrote: > > On Mon, Jan 21, 2019 at 01:59:50AM -0800, Christopher Clark wrote: > > Queries for data about space availability in registered rings and > > causes notification to be sent when space has become available. > &

Re: [Xen-devel] [PATCH v6 04/15] argo: init, destroy and soft-reset, with enable command line opt

2019-01-30 Thread Christopher Clark
On Mon, Jan 28, 2019 at 3:16 AM Jan Beulich wrote: > > >>> On 24.01.19 at 03:04, wrote: > > --- a/xen/include/xlat.lst > > +++ b/xen/include/xlat.lst > > @@ -148,3 +148,5 @@ > > ?flask_setenforcexsm/flask_op.h > > !flask_sid_context xsm/flask_op.h > > ?

Re: [Xen-devel] [PATCH v6 02/15] argo: introduce the argo_op hypercall boilerplate

2019-01-30 Thread Christopher Clark
On Fri, Jan 25, 2019 at 10:55 AM Christopher Clark wrote: > > On Thu, Jan 24, 2019 at 2:08 AM Julien Grall wrote: > > > > Hi, > > > > On 24/01/2019 02:04, Christopher Clark wrote: > > > Presence is gated upon CONFIG_ARGO. > > > > >

Re: [Xen-devel] [PATCH v6 07/15] argo: implement the register op

2019-01-30 Thread Christopher Clark
On Mon, Jan 28, 2019 at 3:19 AM Jan Beulich wrote: > > >>> On 24.01.19 at 03:04, wrote: > > @@ -31,13 +32,27 @@ > > #ifdef CONFIG_COMPAT > > #include > > CHECK_argo_addr; > > +CHECK_argo_register_ring; > > CHECK_argo_ring; > > #endif > > What about struct xen_argo_ring_message_header? ack

Re: [Xen-devel] [PATCH v6 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-01-30 Thread Christopher Clark
On Mon, Jan 28, 2019 at 3:29 AM Jan Beulich wrote: > > >>> On 24.01.19 at 03:04, wrote: > > --- a/xen/include/public/argo.h > > +++ b/xen/include/public/argo.h > > @@ -46,6 +46,34 @@ typedef uint32_t xen_argo_port_t; > > /* gfn type: 64-bit on all architectures to aid avoiding a compat ABI */ >

[Xen-devel] [PATCH v7 02/15] argo: introduce the argo_op hypercall boilerplate

2019-01-30 Thread Christopher Clark
Presence is gated upon CONFIG_ARGO. Registers the hypercall previously reserved for this. Takes 5 arguments, does nothing and returns -ENOSYS. Implementation will provide a compat ABI so COMPAT_CALL is the macro used in the hypercall tables. Signed-off-by: Christopher Clark --- v6 dropped Jan

[Xen-devel] [PATCH v7 03/15] argo: define argo_dprintk for subsystem debugging

2019-01-30 Thread Christopher Clark
A convenience for working on development of the argo subsystem: setting a #define variable enables additional debug messages. Signed-off-by: Christopher Clark Acked-by: Jan Beulich Reviewed-by: Roger Pau Monné --- v3 added Roger's Reviewed-by v3 added Jan's Ack v2 #03 feedback, Jan:

[Xen-devel] [PATCH v7 00/15] Argo: hypervisor-mediated interdomain communication

2019-01-30 Thread Christopher Clark
entry Christopher Clark (15): argo: Introduce the Kconfig option to govern inclusion of Argo argo: introduce the argo_op hypercall boilerplate argo: define argo_dprintk for subsystem debugging argo: init, destroy and soft-reset, with enable command line opt errno: add POSIX error codes

[Xen-devel] [PATCH v7 08/15] argo: implement the unregister op

2019-01-30 Thread Christopher Clark
ress space. If the ring had been registered to communicate with a single specified domain (ie. a non-wildcard ring) then the partner domain state is removed from the partner domain's argo send_info hash table. Signed-off-by: Christopher Clark Reviewed-by: Roger Pau Monné Tested-by: Chris Pa

[Xen-devel] [PATCH v7 05/15] errno: add POSIX error codes EMSGSIZE, ECONNREFUSED to the ABI

2019-01-30 Thread Christopher Clark
EMSGSIZE : "Message too large" ECONNREFUSED : "Connection refused". The numeric values assigned to each are taken from Linux, as is the case for the existing error codes. EMSGSIZE : 90 ECONNREFUSED : 111 Signed-off-by: Christopher Clark Acked-by: Jan Beulich ---

[Xen-devel] [PATCH v7 11/15] xsm, argo: XSM control for argo register

2019-01-30 Thread Christopher Clark
d in order for 'const' to be accepted in signature of functions that invoke them. Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v6 Chris: apply const to avc_audit_data sdom and tdom struct members v6 Chris: apply const to args in dummy.h fu

[Xen-devel] [PATCH v7 04/15] argo: init, destroy and soft-reset, with enable command line opt

2019-01-30 Thread Christopher Clark
se in this series (which is based on [1]). Signed-off-by: Christopher Clark Acked-by: Lars Kurth Reviewed-by: Ross Philipson Tested-by: Chris Patterson --- v6 #09 Jan: introduce compat ABI v6 #04 Jan: xlat.lst: move argo struct entries to alphabetical position v6 #04 Roger: use list_for_each_entry{

[Xen-devel] [PATCH v7 14/15] xsm, argo: notify: don't describe rings that cannot be sent to

2019-01-30 Thread Christopher Clark
Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v3 #10 Roger: drop out label, use return -EFAULT in fill_ring_data v3: Add Daniel's Acked-by xen/common/argo.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/common/argo.c

[Xen-devel] [PATCH v7 01/15] argo: Introduce the Kconfig option to govern inclusion of Argo

2019-01-30 Thread Christopher Clark
option depends on EXPERT and Argo is currently an experimental feature. Signed-off-by: Christopher Clark Acked-by: Jan Beulich --- v3 added Jan's Ack v2 #01 feedback, Jan: replace def_bool/prompt with bool v1 #02 feedback, Jan: default Kconfig off, use EXPERT, fix whitespace xen/common/Kc

[Xen-devel] [PATCH v7 06/15] xen/arm: introduce guest_handle_for_field()

2019-01-30 Thread Christopher Clark
ARM port of c/s bb544585: "introduce guest_handle_for_field()" This helper turns a field of a GUEST_HANDLE into a GUEST_HANDLE. Signed-off-by: Christopher Clark Reviewed-by: Paul Durrant Reviewed-by: Stefano Stabellini --- v3: Added Stefano's Reviewed-by v2: Added Paul'

[Xen-devel] [PATCH v7 07/15] argo: implement the register op

2019-01-30 Thread Christopher Clark
1" The p2m type of the memory supplied by the guest for the ring must be p2m_ram_rw and the memory will be pinned as PGT_writable_page while the ring is registered. This hypercall op and its interface currently only supports 4K-sized pages. Signed-off-by: Christopher Clark Tested-by: C

[Xen-devel] [PATCH v7 10/15] argo: implement the notify op

2019-01-30 Thread Christopher Clark
quent notifications. Limit the maximum number of notify requests in a single operation to a simple fixed limit of 256. Signed-off-by: Christopher Clark Tested-by: Chris Patterson --- v6 #09 Jan: add compat ABI v6 #04 Jan: xlat.lst: move argo struct entries to alphabetical position v6: rewrap co

[Xen-devel] [PATCH v7 12/15] xsm, argo: XSM control for argo message send operation

2019-01-30 Thread Christopher Clark
Default policy: allow. Signed-off-by: Christopher Clark Reviewed-by: Paul Durrant Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v3 Daniel/Jan: add to the default xsm policy for the send op v3 Add Daniel's Acked-by v2: reordered commit sequence to after sendv implementati

[Xen-devel] [PATCH v7 13/15] xsm, argo: XSM control for any access to argo by a domain

2019-01-30 Thread Christopher Clark
Will inhibit initialization of the domain's argo data structure to prevent receiving any messages or notifications and access to any of the argo hypercall operations. Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v6 #09 Jan: add compat ABI v6

[Xen-devel] [PATCH v7 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-01-30 Thread Christopher Clark
ed hypervisor argo communication. Signed-off-by: Christopher Clark Tested-by: Chris Patterson --- v6 #09 Jan: introduce compat ABI v6 : hoist read of iovs from guest from ringbuf_insert to do_argo_op v6 : simplify init of the NULL_hnd in ringbuf_insert v6 #09 Jan: xlat.lst remove argo_iov as genera

[Xen-devel] [PATCH v7 15/15] MAINTAINERS: add new section for Argo and self as maintainer

2019-01-30 Thread Christopher Clark
Signed-off-by: Christopher Clark --- v5 whitespace: tabs MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e99d39e..a0cda4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -158,6 +158,13 @@ S: Supported F: xen/arch/x86/hvm/svm/ F: xen

Re: [Xen-devel] [PATCH v5 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-02-03 Thread Christopher Clark
On Thu, Jan 31, 2019 at 3:01 AM Roger Pau Monné wrote: > > On Thu, Jan 31, 2019 at 03:35:23AM -0700, Jan Beulich wrote: > > >>> On 31.01.19 at 11:18, wrote: > > > On Wed, Jan 30, 2019 at 08:10:28PM -0800, Christopher Clark wrote: > > >> On Tu

Re: [Xen-devel] [PATCH v7 04/15] argo: init, destroy and soft-reset, with enable command line opt

2019-02-03 Thread Christopher Clark
On Thu, Jan 31, 2019 at 6:49 AM Roger Pau Monné wrote: > > On Wed, Jan 30, 2019 at 08:28:09PM -0800, Christopher Clark wrote: > > Initialises basic data structures and performs teardown of argo state > > for domain shutdown. > > > > Inclusion of the Argo implementati

Re: [Xen-devel] [PATCH v5 00/15] Argo: hypervisor-mediated interdomain communication

2019-02-03 Thread Christopher Clark
On Thu, Jan 31, 2019 at 5:39 AM Roger Pau Monné wrote: > > On Wed, Jan 30, 2019 at 08:05:30PM -0800, Christopher Clark wrote: > > On Tue, Jan 22, 2019 at 6:19 AM Roger Pau Monné > > wrote: > > > > > > On Mon, Jan 21, 2019 at 01:59:40AM -0800, Christopher

Re: [Xen-devel] [PATCH v7 07/15] argo: implement the register op

2019-02-03 Thread Christopher Clark
n Thu, Jan 31, 2019 at 8:19 AM Roger Pau Monné wrote: > > On Wed, Jan 30, 2019 at 08:28:12PM -0800, Christopher Clark wrote: > > The register op is used by a domain to register a region of memory for > > receiving messages from either a specified other domain, or, if specify

Re: [Xen-devel] [PATCH v7 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-02-03 Thread Christopher Clark
On Thu, Jan 31, 2019 at 8:38 AM Roger Pau Monné wrote: > > On Wed, Jan 30, 2019 at 08:28:14PM -0800, Christopher Clark wrote: > > sendv operation is invoked to perform a synchronous send of buffers > > contained in iovs to a remote domain's registered ring. > > >

Re: [Xen-devel] [PATCH v7 10/15] argo: implement the notify op

2019-02-03 Thread Christopher Clark
On Thu, Jan 31, 2019 at 8:45 AM Roger Pau Monné wrote: > > On Wed, Jan 30, 2019 at 08:28:15PM -0800, Christopher Clark wrote: > > Queries for data about space availability in registered rings and > > causes notification to be sent when space has become available. > &

Re: [Xen-devel] [PATCH v7 02/15] argo: introduce the argo_op hypercall boilerplate

2019-02-04 Thread Christopher Clark
On Wed, Jan 30, 2019 at 8:14 PM Christopher Clark wrote: > > On Fri, Jan 25, 2019 at 10:55 AM Christopher Clark > wrote: > > > > On Thu, Jan 24, 2019 at 2:08 AM Julien Grall wrote: > > > [...] > > > Sorry for noticing quite late in the process. Don'

Re: [Xen-devel] [PATCH v3 04/15] argo: init, destroy and soft-reset, with enable command line opt

2019-02-04 Thread Christopher Clark
On Mon, Jan 14, 2019 at 6:47 AM Wei Liu wrote: > > Hi all > > The locking scheme seems to be remaining sticking point. The rest are > mostly cosmetic issues (FAOD, they still need to be addressed). Frankly > I don't think there is enough time to address all the technical details, > but let me sum

Re: [Xen-devel] [PATCH v7 09/15] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-02-04 Thread Christopher Clark
On Mon, Feb 4, 2019 at 6:41 AM Jan Beulich wrote: > > >>> On 31.01.19 at 05:28, wrote: > > @@ -1237,6 +1864,54 @@ compat_argo_op(unsigned int cmd, > > XEN_GUEST_HANDLE_PARAM(void) arg1, > > break; > > } > > > > +case XEN_ARGO_OP_sendv: > > +{ > > +xen_argo_send_addr

Re: [Xen-devel] [PATCH v7 10/15] argo: implement the notify op

2019-02-04 Thread Christopher Clark
On Mon, Feb 4, 2019 at 7:12 AM Jan Beulich wrote: > > >>> On 31.01.19 at 05:28, wrote: > > @@ -1802,6 +2157,21 @@ do_argo_op(unsigned int cmd, > > XEN_GUEST_HANDLE_PARAM(void) arg1, > > break; > > } > > > > +case XEN_ARGO_OP_notify: > > +{ > > +XEN_GUEST_HANDLE_PARA

[Xen-devel] [PATCH v8 for-4.12 01/17] argo: Introduce the Kconfig option to govern inclusion of Argo

2019-02-06 Thread Christopher Clark
option depends on EXPERT and Argo is currently an experimental feature. Signed-off-by: Christopher Clark Acked-by: Jan Beulich --- v3 added Jan's Ack v2 #01 feedback, Jan: replace def_bool/prompt with bool v1 #02 feedback, Jan: default Kconfig off, use EXPERT, fix whitespace xen/common/Kc

[Xen-devel] [PATCH v8 for-4.12 04/17] argo: init, destroy and soft-reset, with enable command line opt

2019-02-06 Thread Christopher Clark
se in this series (which is based on [1]). Signed-off-by: Christopher Clark Acked-by: Lars Kurth Reviewed-by: Ross Philipson Tested-by: Chris Patterson Reviewed-by: Roger Pau Monné --- v7 #02 Julien/Jan/Stefano: apply range check to numeric hypercall args v7 #10 Jan: avoid code duplication: forw

[Xen-devel] [PATCH v8 for-4.12 07/17] argo: implement the register op

2019-02-06 Thread Christopher Clark
1" The p2m type of the memory supplied by the guest for the ring must be p2m_ram_rw and the memory will be pinned as PGT_writable_page while the ring is registered. This hypercall op and its interface currently only supports 4K-sized pages. Signed-off-by: Christopher Clark Tested-by: Chri

[Xen-devel] [PATCH v8 for-4.12 03/17] argo: define argo_dprintk for subsystem debugging

2019-02-06 Thread Christopher Clark
A convenience for working on development of the argo subsystem: setting a #define variable enables additional debug messages. Signed-off-by: Christopher Clark Acked-by: Jan Beulich Reviewed-by: Roger Pau Monné --- v3 added Roger's Reviewed-by v3 added Jan's Ack v2 #03 feedback, Jan:

[Xen-devel] [PATCH v8 for-4.12 05/17] errno: add POSIX error codes EMSGSIZE, ECONNREFUSED to the ABI

2019-02-06 Thread Christopher Clark
EMSGSIZE : "Message too large" ECONNREFUSED : "Connection refused". The numeric values assigned to each are taken from Linux, as is the case for the existing error codes. EMSGSIZE : 90 ECONNREFUSED : 111 Signed-off-by: Christopher Clark Acked-by: Jan Beulich ---

[Xen-devel] [PATCH v8 for-4.12 02/17] argo: introduce the argo_op hypercall boilerplate

2019-02-06 Thread Christopher Clark
Presence is gated upon CONFIG_ARGO. Registers the hypercall previously reserved for this. Takes 5 arguments, does nothing and returns -ENOSYS. Implementation will provide a compat ABI so COMPAT_CALL is the selected macro for the hypercall tables. Signed-off-by: Christopher Clark Acked-by: Jan

[Xen-devel] [PATCH v8 for-4.12 00/17] Argo: hypervisor-mediated interdomain communication

2019-02-06 Thread Christopher Clark
version of a design document for Argo - based on work previously sent to the mailing list, covers the implementation's granular locking * Adds a SUPPORT.md section for the feature and Experimental statement Christopher Clark (17): argo: Introduce the Kconfig option to govern inclusi

[Xen-devel] [PATCH v8 for-4.12 08/17] argo: implement the unregister op

2019-02-06 Thread Christopher Clark
ress space. If the ring had been registered to communicate with a single specified domain (ie. a non-wildcard ring) then the partner domain state is removed from the partner domain's argo send_info hash table. Signed-off-by: Christopher Clark Reviewed-by: Roger Pau Monné Tested-by: Chris Pa

[Xen-devel] [PATCH v8 for-4.12 09/17] argo: implement the sendv op; evtchn: expose send_guest_global_virq

2019-02-06 Thread Christopher Clark
ed hypervisor argo communication. Signed-off-by: Christopher Clark Tested-by: Chris Patterson Reviewed-by: Roger Pau Monné --- v7 #09 Jan: avoid code duplication, forward compat ops to native v7 self: tidy XEN_ARGO_MAX_RING_SIZE comment in the public header v7 #09 Jan: drop stale XEN_ARGO_MAXIOV c

[Xen-devel] [PATCH v8 for-4.12 11/17] xsm, argo: XSM control for argo register

2019-02-06 Thread Christopher Clark
d in order for 'const' to be accepted in signature of functions that invoke them. Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v6 Chris: apply const to avc_audit_data sdom and tdom struct members v6 Chris: apply const to args in dummy.h fu

[Xen-devel] [PATCH v8 for-4.12 12/17] xsm, argo: XSM control for argo message send operation

2019-02-06 Thread Christopher Clark
Default policy: allow. Signed-off-by: Christopher Clark Reviewed-by: Paul Durrant Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v3 Daniel/Jan: add to the default xsm policy for the send op v3 Add Daniel's Acked-by v2: reordered commit sequence to after sendv implementati

[Xen-devel] [PATCH v8 for-4.12 16/17] SUPPORT.md : add new entry for the Argo feature

2019-02-06 Thread Christopher Clark
Status: Experimental Signed-off-by: Christopher Clark --- SUPPORT.md | 4 1 file changed, 4 insertions(+) diff --git a/SUPPORT.md b/SUPPORT.md index 7c8493c..19fc8d7 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -617,6 +617,10 @@ Virtual Performance Management Unit for HVM guests Disabled

[Xen-devel] [PATCH v8 for-4.12 14/17] xsm, argo: notify: don't describe rings that cannot be sent to

2019-02-06 Thread Christopher Clark
Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v3 #10 Roger: drop out label, use return -EFAULT in fill_ring_data v3: Add Daniel's Acked-by xen/common/argo.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/common/argo.c

[Xen-devel] [PATCH v8 for-4.12 10/17] argo: implement the notify op

2019-02-06 Thread Christopher Clark
quent notifications. Limit the maximum number of notify requests in a single operation to a simple fixed limit of 256. Signed-off-by: Christopher Clark Tested-by: Chris Patterson Reviewed-by: Roger Pau Monné --- v7 #09 Jan: avoid code duplication, forward compat ops to native v7 #10

[Xen-devel] [PATCH v8 for-4.12 06/17] xen/arm: introduce guest_handle_for_field()

2019-02-06 Thread Christopher Clark
ARM port of c/s bb544585: "introduce guest_handle_for_field()" This helper turns a field of a GUEST_HANDLE into a GUEST_HANDLE. Signed-off-by: Christopher Clark Reviewed-by: Paul Durrant Reviewed-by: Stefano Stabellini --- v3: Added Stefano's Reviewed-by v2: Added Paul'

[Xen-devel] [PATCH v8 for-4.12 13/17] xsm, argo: XSM control for any access to argo by a domain

2019-02-06 Thread Christopher Clark
Will inhibit initialization of the domain's argo data structure to prevent receiving any messages or notifications and access to any of the argo hypercall operations. Signed-off-by: Christopher Clark Acked-by: Daniel De Graaf Tested-by: Chris Patterson --- v7 self: fix return of check

[Xen-devel] [PATCH v8 for-4.12 15/17] MAINTAINERS: add new section for Argo and self as maintainer

2019-02-06 Thread Christopher Clark
Signed-off-by: Christopher Clark Reviewed-by: Roger Pau Monné --- v7 #015 Roger: Add Reviewed-by v5 whitespace: tabs MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e99d39e..a0cda4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -158,6

[Xen-devel] [PATCH v8 for-4.12 17/17] docs, argo: add design document for Argo

2019-02-06 Thread Christopher Clark
Document provides a brief introduction to the Argo interdomain communication mechanism and a detailed description of the granular locking used within the Argo implementation. Signed-off-by: Christopher Clark --- docs/designs/argo.pandoc | 448 +++ 1

Re: [Xen-devel] [PATCH v8 for-4.12 10/17] argo: implement the notify op

2019-02-06 Thread Christopher Clark
On Wed, Feb 6, 2019 at 10:28 AM Julien Grall wrote: > > Hi, > > On 2/6/19 8:55 AM, Christopher Clark wrote: > > +/* > > + * XEN_ARGO_OP_notify > > + * > > + * Asks Xen for information about other rings in the system. > > + * > > + * ent-&

Re: [Xen-devel] [PATCH v8 for-4.12 17/17] docs, argo: add design document for Argo

2019-02-12 Thread Christopher Clark
On Wed, Feb 6, 2019 at 2:31 AM Roger Pau Monné wrote: > > On Wed, Feb 06, 2019 at 12:55:08AM -0800, Christopher Clark wrote: > > Document provides a brief introduction to the Argo interdomain > > communication mechanism and a detailed description of the granular > > lock

Re: [Xen-devel] Xen 4.12 Development Update

2018-11-28 Thread Christopher Clark
On Wed, Nov 28, 2018 at 2:26 AM Juergen Gross wrote: > > = Projects = > > == Hypervisor == > > * Argo (inter-VM communication) I have a patch series for this that is approaching readiness to post. It does touch ARM (slightly) so will be posted this week to meet the ARM deadline. Christopher __

[Xen-devel] [PATCH 07/25] xen (ARM, x86): add errno-returning functions for copy

2018-11-30 Thread Christopher Clark
Applied to both x86 and ARM headers. Signed-off-by: Christopher Clark --- xen/include/asm-arm/guest_access.h | 25 + xen/include/asm-x86/guest_access.h | 29 + xen/include/xen/guest_access.h | 3 +++ 3 files changed, 57 insertions

[Xen-devel] [PATCH 04/25] argo: define argo_dprintk for subsystem debugging

2018-11-30 Thread Christopher Clark
A convenience for working on development of the argo subsystem: toggling a local #define variable turns on just the debug messages in this subsystem. printk("argo: " format, ## args ) Signed-off-by: Christopher Clark --- xen/common/argo.c | 13 + 1 file changed, 13

[Xen-devel] [PATCH 14/25] argo: implement the unregister op

2018-11-30 Thread Christopher Clark
Takes a single argument: a handle to the registered ring. The ring's entry is removed from the hashtable of registered rings; any entries for pending notifications are removed; and the ring is unmapped from Xen's address space. Signed-off-by: Christopher Clark --- xen/com

[Xen-devel] [PATCH 13/25] argo: implement the register op

2018-11-30 Thread Christopher Clark
ative choice made to defer the need to reason about the other p2m types with this commit. argo_pfn_t type is introduced here to create a pfn_t type that is 64-bit on all architectures, to assist with avoiding the need to add a compat ABI. Signed-off-by: Christopher Clark --- xen/common/a

[Xen-devel] [PATCH 17/25] xsm, argo: XSM control for any access to argo by a domain

2018-11-30 Thread Christopher Clark
Will inhibit initialization of the domain's argo data structure to prevent receiving any messages or notifications and access to any of the argo hypercall operations. Signed-off-by: Christopher Clark --- xen/common/argo.c | 4 ++-- xen/include/xsm/dummy.h

[Xen-devel] [PATCH 18/25] argo: limit the max number of rings that a domain may register.

2018-11-30 Thread Christopher Clark
Very basic implementation: a fixed limit of 128. Signed-off-by: Christopher Clark --- xen/common/argo.c | 17 + 1 file changed, 17 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index ca48032..cc908f4 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c

[Xen-devel] [PATCH 11/25] xsm, argo: XSM control for argo register operation, argo_mac bootparam

2018-11-30 Thread Christopher Clark
descriptive strings in order to make it obvious to an administrator that this has potential security impact. Signed-off-by: Christopher Clark --- xen/common/argo.c | 15 +++ xen/include/xsm/dummy.h | 15 +++ xen/include/xsm/xsm.h

[Xen-devel] [PATCH 05/25] argo: Add initial argo_init and argo_destroy

2018-11-30 Thread Christopher Clark
introducing any further changes to add another channel type. In accordance with recent work on _domain_destroy, argo_destroy is idempotent. Adds two new fields to struct domain: rwlock_t argo_lock; struct argo_domain *argo; Signed-off-by: Christopher Clark --- xen/common/argo.c | 277

[Xen-devel] [PATCH 02/25] argo: Introduce the Kconfig option to govern inclusion of Argo

2018-11-30 Thread Christopher Clark
Signed-off-by: Christopher Clark --- xen/common/Kconfig | 20 1 file changed, 20 insertions(+) diff --git a/xen/common/Kconfig b/xen/common/Kconfig index 68132a3..a06ddcb 100644 --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@ -200,6 +200,26 @@ config LATE_HWDOM

[Xen-devel] [PATCH 08/25] xen: define XEN_GUEST_HANDLE_NULL as null XEN_GUEST_HANDLE

2018-11-30 Thread Christopher Clark
Signed-off-by: Christopher Clark --- xen/include/public/xen.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index 0a27546..8dc032b 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -982,6 +982,8 @@ typedef struct

[Xen-devel] [PATCH 15/25] argo: implement the sendv op

2018-11-30 Thread Christopher Clark
ng integer overflow is important. Signed-off-by: Christopher Clark --- xen/common/argo.c | 528 ++ xen/include/public/argo.h | 59 ++ 2 files changed, 587 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index 387e650..0c39

[Xen-devel] [PATCH 25/25] argo: implement the get_config op to query notification config

2018-11-30 Thread Christopher Clark
reserved space intentionally to for future alternative notification mechanism to return data about both an IRQ number and bound VCPU. Signed-off-by: Christopher Clark --- xen/common/argo.c | 57 +++ xen/include/public/argo.h | 28

[Xen-devel] [PATCH 20/25] argo, xsm: notify: don't describe rings that cannot be sent to

2018-11-30 Thread Christopher Clark
Signed-off-by: Christopher Clark --- xen/common/argo.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index 0858fb2..39778fd 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -845,6 +845,17 @@ argo_fill_ring_data(struct domain

[Xen-devel] [PATCH 03/25] argo: introduce the argo_message_op hypercall boilerplate

2018-11-30 Thread Christopher Clark
Presence is gated upon CONFIG_ARGO. Registers the hypercall previously reserved for this. Takes 5 arguments, does nothing and returns -ENOSYS. Will be avoiding a compat ABI by using fixed-size types in hypercall ops. Signed-off-by: Christopher Clark --- xen/arch/x86/guest/hypercall_page.S

[Xen-devel] [PATCH 10/25] arm: introduce guest_handle_for_field()

2018-11-30 Thread Christopher Clark
arm port of commit bb544585137259545d4adc9afe6eed8dc7c7376d This helper turns a field of a GUEST_HANDLE into a GUEST_HANDLE. Signed-off-by: Christopher Clark --- xen/include/asm-arm/guest_access.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/asm-arm/guest_access.h b/xen

[Xen-devel] [PATCH 09/25] errno: add POSIX error codes EMSGSIZE, ECONNREFUSED to the ABI

2018-11-30 Thread Christopher Clark
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html describes these codes thus: EMSGSIZE : "Message too large" ECONNREFUSED : "Connection refused". Signed-off-by: Christopher Clark --- xen/include/public/errno.h | 2 ++ 1 file changed, 2 inserti

[Xen-devel] [PATCH 12/25] xsm, argo: XSM control for argo message send operation

2018-11-30 Thread Christopher Clark
Default policy: allow. Signed-off-by: Christopher Clark --- xen/include/xsm/dummy.h | 5 + xen/include/xsm/xsm.h | 6 ++ xen/xsm/dummy.c | 1 + xen/xsm/flask/hooks.c | 7 +++ xen/xsm/flask/policy/access_vectors | 2 ++ 5

[Xen-devel] [PATCH 01/25] xen/evtchn: expose evtchn_bind_ipi_vcpu0_domain for use within Xen

2018-11-30 Thread Christopher Clark
Allocates an IPI-bound event channel on vcpu0 for specified domain. Is able to bypass the existence check on vcpu number since vcpu 0 should always exist. Bypass is required at the point of use by Argo. Signed-off-by: Christopher Clark --- xen/common/event_channel.c | 35

[Xen-devel] [PATCH 06/25] argo: Xen command line parameter 'argo': bool to enable/disable

2018-11-30 Thread Christopher Clark
Default to disabled. Signed-off-by: Christopher Clark --- xen/common/argo.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index 1872d37..82fab36 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -28,6 +28,10

[Xen-devel] [PATCH 19/25] argo: limit the max number of notify requests in a single operation.

2018-11-30 Thread Christopher Clark
Very basic implementation: a fixed limit of 256. Signed-off-by: Christopher Clark --- xen/common/argo.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index cc908f4..0858fb2 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -27,6 +27,7

[Xen-devel] [PATCH 00/25] Argo: hypervisor-mediated interdomain communication

2018-11-30 Thread Christopher Clark
rch to identify notification causes. Additional items will be noted on the Xen wiki. == Credits Contributors to the design and implementation of this software include: James McKenzie, Jean Guyader, Ross Philipson, Christopher Clark with the support of the OpenXT Project. Thanks are due f

[Xen-devel] [PATCH 24/25] argo: unmap rings on suspend and send signal to ring-owners on resume

2018-11-30 Thread Christopher Clark
so that the guest may re-register the rings on resume with current mappings. Signed-off-by: Christopher Clark --- xen/common/argo.c | 69 ++ xen/common/domain.c| 9 +++ xen/include/xen/argo.h | 2 ++ 3 files changed, 80 insertions

[Xen-devel] [PATCH 23/25] argo: signal x86 HVM and ARM via VIRQ

2018-11-30 Thread Christopher Clark
software to be installed within these guests in order to use Argo. VIRQ signalling is also the method that has been in use for the longest period with this hypercall in both XenClient and OpenXT. Signed-off-by: Christopher Clark --- xen/common/argo.c | 39

[Xen-devel] [PATCH 21/25] argo: add array_index_nospec to guard the result of the hash func

2018-11-30 Thread Christopher Clark
used as an array index. Signed-off-by: Christopher Clark --- xen/common/argo.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/common/argo.c b/xen/common/argo.c index 39778fd..fa969ab 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -23,6 +23,7 @@ #include

[Xen-devel] [PATCH 16/25] argo: implement the notify op

2018-11-30 Thread Christopher Clark
quent notifications. Signed-off-by: Christopher Clark --- xen/common/argo.c | 326 ++ xen/include/public/argo.h | 62 + 2 files changed, 388 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index 0c3972c..a171191 100644

[Xen-devel] [PATCH 22/25] xen/evtchn: expose send_guest_global_virq for use within Xen

2018-11-30 Thread Christopher Clark
To be used by Argo for delivery of notifications to some guests. Signed-off-by: Christopher Clark --- xen/common/event_channel.c | 2 +- xen/include/xen/event.h| 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c

<    1   2   3   4   >