Re: [Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-21 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory"): > On Tue, Sep 19, 2017 at 12:08:27PM +0100, Ian Jackson wrote: > > Wei Liu writes ("Re: [PATCH 10/22] xentoolcore_restrict_all: Implement for > > libxenforeignmemory"): > > > Sure that's fine. > > >

Re: [Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-20 Thread Wei Liu
On Tue, Sep 19, 2017 at 12:08:27PM +0100, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH 10/22] xentoolcore_restrict_all: Implement for > libxenforeignmemory"): > > Sure that's fine. > > I have this now: > > * If called again with the same domid, it may succeed, or it may > * fail (even thou

Re: [Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-19 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory"): > Sure that's fine. I have this now: * If called again with the same domid, it may succeed, or it may * fail (even though such a call is potentially meaningful). * (If called again with a differe

Re: [Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-19 Thread Wei Liu
On Tue, Sep 19, 2017 at 11:51:06AM +0100, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH 10/22] xentoolcore_restrict_all: Implement for > libxenforeignmemory"): > > Same comment for xendevicemodel_restrict on idempotent applies here. > > Are you happy with me fixing this by changing the docs ra

Re: [Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-19 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory"): > Same comment for xendevicemodel_restrict on idempotent applies here. Are you happy with me fixing this by changing the docs rather than the code ? Ian. ___

Re: [Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-19 Thread Wei Liu
On Fri, Sep 15, 2017 at 07:48:47PM +0100, Ian Jackson wrote: > +static int all_restrict_cb(Xentoolcore__Active_Handle *ah, uint32_t domid) { > +xenforeignmemory_handle *fmem = CONTAINER_OF(ah, *fmem, tc_ah); > + > +if (fmem->fd < 0) > +/* just in case */ > +return 0; > + > +

[Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/Rules.mk | 2 +- tools/libs/foreignmemory/Makefile | 4 ++-- tools/libs/foreignmemory/core.c | 15 +++ tools/libs/foreignmemory/private.h | 3 +++ tools/libs/foreignmemo