Re: [Xen-devel] [PATCH v3 5/7] libxl: support unmapping static shared memory areas during domain destruction

2017-11-08 Thread Zhongze Liu
Oops, The address lines were somehow dropped by my mail client. Adding Wei. 2017-11-09 10:06 GMT+08:00 Zhongze Liu : > Hi Wei, > > 2017-11-01 23:55 GMT+08:00 Wei Liu : >> On Thu, Oct 19, 2017 at 10:36:33AM +0800, Zhongze Liu wrote: >>> Add libxl__sshm_del to unmap st

Re: [Xen-devel] [PATCH v3 5/7] libxl: support unmapping static shared memory areas during domain destruction

2017-11-08 Thread Zhongze Liu
Hi Wei, 2017-11-01 23:55 GMT+08:00 Wei Liu : > On Thu, Oct 19, 2017 at 10:36:33AM +0800, Zhongze Liu wrote: >> Add libxl__sshm_del to unmap static shared memory areas mapped by >> libxl__sshm_add during domain creation. The unmapping process is: >> >> * For a master: d

Re: [Xen-devel] [PATCH v3 4/7] libxl: support mapping static shared memory areas during domain creation

2017-11-08 Thread Zhongze Liu
Hi Wei, 2017-11-01 23:55 GMT+08:00 Wei Liu : > On Thu, Oct 19, 2017 at 10:36:32AM +0800, Zhongze Liu wrote: >> Add libxl__sshm_add to map shared pages from one DomU to another, The mapping >> process involves the follwing steps: >> >> * Set defaults and chec

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-25 Thread Zhongze Liu
2017-10-25 17:37 GMT+08:00 Zhongze Liu : > Hi, > > My current plan is to add the following new MAPSPACE to public/memory.h: > > +#define XENMEMSPACE_gmfn_foreign_share 6 /* Same as *_gmfn_foreign, but this > is > +fo

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-25 Thread Zhongze Liu
doms. */ and create a corresponding entry xsm_map_gmfn_foreign_share to the xsm structure, which will be filled with the proposed policy. Does this look good to you? Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-23 Thread Zhongze Liu
7;s. Yes, indeed. This won't work. Sorry for giving a wrong example here. I think I now agree to add a new subop, too. Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-22 Thread Zhongze Liu
his deserves a new subop, since this code is reached > via the stable memory_op and not just a domctl. How about changing the policy to (c over d) && ((d over t) || (c over t))? Given that (c over d) is a must, which is always checked somewhere higher in the call stack as Daniel pointed out, permitting (d over t) or (c over t) actually infers permitting the other. - if you permit (d over t) but not (c over t): Given (c over t), (c) can first map the src page from (t) into its own memory space and then map this page from its own memory space to (d)'s memory space. - if you permit (c over t) but not (d over t): Given (d over t), (c) can first map (d)'s pages into its own memory space and modify (d)'s code to issues a hypercall that maps (t)'s memory pages into (d)'s memory space. I'm not very familiar with Xen's security model. So I might be totally wrong here. If so, please correct me. And if you still think adding a new subop is necessary, do you have any suggestions on this? Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Zhongze Liu
2017-10-20 8:34 GMT+08:00 Zhongze Liu : > Hi Daniel, > > 2017-10-20 1:36 GMT+08:00 Daniel De Graaf : >> On 10/18/2017 10:36 PM, Zhongze Liu wrote: >>> >>> The original dummy xsm_map_gmfn_foregin checks if source domain has the >>> proper >>> p

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Zhongze Liu
Hi Daniel, 2017-10-20 1:36 GMT+08:00 Daniel De Graaf : > On 10/18/2017 10:36 PM, Zhongze Liu wrote: >> >> The original dummy xsm_map_gmfn_foregin checks if source domain has the >> proper >> privileges over the target domain. Under this policy, it's not allowed if

[Xen-devel] [PATCH v3 6/7] libxl:xl: add parsing code to parse "libxl_static_sshm" from xl config files

2017-10-18 Thread Zhongze Liu
[1] https://lists.xen.org/archives/html/xen-devel/2017-08/msg03242.html Signed-off-by: Zhongze Liu Cc: Wei Liu Cc: Ian Jackson Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org --- tools/libxl/Makefile | 2 +- tools/libxl/libxlu_ss

[Xen-devel] [PATCH v3 7/7] docs: documentation about static shared memory regions

2017-10-18 Thread Zhongze Liu
03242.html Signed-off-by: Zhongze Liu Cc: Ian Jackson Cc: Wei Liu Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org --- docs/man/xl-static-shm-configuration.pod.5 | 257 + docs/man/xl.cfg.pod.5.in | 8 + docs/misc/xenstore-path

[Xen-devel] [PATCH v3 0/7] Allow setting up shared memory areas between VMs from xl config files

2017-10-18 Thread Zhongze Liu
he xs trasaction fails * Changed the xsm hooks to lookup the current domain themselves instead of getting it as a parameter Cheers, Zhongze Liu (7): libxc: add xc_domain_remove_from_physmap to wrap XENMEM_remove_from_physmap xsm: flask: change the dummy xsm policy and flask hoo

[Xen-devel] [PATCH v3 5/7] libxl: support unmapping static shared memory areas during domain destruction

2017-10-18 Thread Zhongze Liu
8/msg03242.html Signed-off-by: Zhongze Liu Cc: Ian Jackson Cc: Wei Liu Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org --- tools/libxl/libxl_domain.c | 5 +++ tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_sshm.c | 105

[Xen-devel] [PATCH v3 4/7] libxl: support mapping static shared memory areas during domain creation

2017-10-18 Thread Zhongze Liu
y not allowd on x86 (see the comments in x86/mm/p2m.c:p2m_add_foregin for more details). This is for the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xen.org/archives/html/xen-devel/2017-08/msg03242.html Signed-off-by: Zhongz

[Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-18 Thread Zhongze Liu
t channels. This is for the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xen.org/archives/html/xen-devel/2017-08/msg03242.html Signed-off-by: Zhongze Liu Cc: Daniel De Graaf Cc: Ian Jackson Cc: Wei Liu Cc: Stefano St

[Xen-devel] [PATCH v3 3/7] libxl: introduce a new structure to represent static shared memory regions

2017-10-18 Thread Zhongze Liu
Add a new structure to the IDL familiy to represent static shared memory regions as proposed in the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xen.org/archives/html/xen-devel/2017-08/msg03242.html Signed-off-by: Z

[Xen-devel] [PATCH v3 1/7] libxc: add xc_domain_remove_from_physmap to wrap XENMEM_remove_from_physmap

2017-10-18 Thread Zhongze Liu
er and use XENMEM_remove_from_physmap to cancel the sharing. A wrapper to XENMEM_add_to_physmap_batch was added in the following commit: commit 20e725e9364cff4a29945f66986ecd88cca8743d Now add the wrapper to XENMEM_remove_from_physmap. Signed-off-by: Zhongze Liu Reviewed-by: Stefano Stabellini Acked-by: Wei Liu

Re: [Xen-devel] [PATCH v2 0/6] Allow setting up shared memory areas between VMs from xl config files

2017-10-11 Thread Zhongze Liu
st to update it within the following one week or so. Sorry again for failing to schedule my time effectively. Cheers, Zhongze Liu. 2017-10-11 7:55 GMT+08:00 Stefano Stabellini : > On Sun, 27 Aug 2017, Zhongze Liu wrote: >> This series implements the new xl config entry proposed in [1].

Re: [Xen-devel] [PATCH v2 3/6] libxl:xl: add parsing code to parse "libxl_static_sshm" from xl config files

2017-09-01 Thread Zhongze Liu
2017-09-02 0:03 GMT+08:00 Wei Liu : > On Sun, Aug 27, 2017 at 04:36:12PM +0800, Zhongze Liu wrote: >> Add the parsing utils for the newly introduced libxl_static_sshm struct >> to the libxl/libxlu_* family. And add realated parsing code in xl to >> parse the struct from xl

Re: [Xen-devel] [PATCH v2 5/6] libxl: support mapping static shared memory areas during domain creation

2017-09-01 Thread Zhongze Liu
Hi Wei, Thanks for reviewing. 2017-09-02 0:23 GMT+08:00 Wei Liu : > On Sun, Aug 27, 2017 at 04:36:14PM +0800, Zhongze Liu wrote: >> Add libxl__sshm_add to map shared pages from one DomU to another, The mapping >> process involves the follwing steps: >> >> * Set def

Re: [Xen-devel] [PATCH v2 4/6] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-08-28 Thread Zhongze Liu
> Coding style. In any event, as suggested before the whole thing is > easier to write as > >> +return xsm_default_action(action, cd, t); > > return xsm_default_action(action, cd, d) ?: xsm_default_action(action, > cd, t); But aren't we going to pre

[Xen-devel] [PATCH v2 4/6] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-08-27 Thread Zhongze Liu
.html Signed-off-by: Zhongze Liu Cc: Daniel De Graaf Cc: Ian Jackson Cc: Wei Liu Cc: Stefano Stabellini Cc: Julien Grall Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: xen-devel@lists.xen.org --- v2: * Preserve the error code in both the dummy xsm callback and the flask hook. * A

[Xen-devel] [PATCH v2 2/6] libxl: introduce a new structure to represent static shared memory regions

2017-08-27 Thread Zhongze Liu
g/archives/html/xen-devel/2017-08/msg03242.html Signed-off-by: Zhongze Liu Reviewed-by: Stefano Stabellini Cc: Wei Liu Cc: Ian Jackson Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org --- v2: mention in the commit msg that several style corrections have been done --- t

[Xen-devel] [PATCH v2 1/6] libxc: add xc_domain_remove_from_physmap to wrap XENMEM_remove_from_physmap

2017-08-27 Thread Zhongze Liu
er and use XENMEM_remove_from_physmap to cancel the sharing. A wrapper to XENMEM_add_to_physmap_batch was added in the following commit: commit 20e725e9364cff4a29945f66986ecd88cca8743d Now add the wrapper to XENMEM_remove_from_physmap. Signed-off-by: Zhongze Liu Reviewed-by: Stefano Stabellini Acked-by: Wei Liu

[Xen-devel] [PATCH v2 0/6] Allow setting up shared memory areas between VMs from xl config files

2017-08-27 Thread Zhongze Liu
k for xsm_map_gmfn_foreign. * support rolling back during creation on partial failure. * refcounting the sshm path instead of using "alive" and "zombie" to label the master and counting the slaves. Cheers, Zhongze Liu (6): libxc: add xc_domain_remove_from_physmap to wrap X

[Xen-devel] [PATCH v2 6/6] libxl: support unmapping static shared memory areas during domain destruction

2017-08-27 Thread Zhongze Liu
8/msg03242.html Signed-off-by: Zhongze Liu Cc: Ian Jackson Cc: Wei Liu Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org --- v2: * use the predefined XC_PAGE_SIZE instead of hardcoding 12 * refcounting the node --- tools/libxl/libxl_domain.c | 5 +++ t

[Xen-devel] [PATCH v2 3/6] libxl:xl: add parsing code to parse "libxl_static_sshm" from xl config files

2017-08-27 Thread Zhongze Liu
[1] https://lists.xen.org/archives/html/xen-devel/2017-08/msg03242.html Signed-off-by: Zhongze Liu Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: Julien Grall Cc: xen-devel@lists.xen.

[Xen-devel] [PATCH v2 5/6] libxl: support mapping static shared memory areas during domain creation

2017-08-27 Thread Zhongze Liu
y not allowd on x86 (see the comments in x86/mm/p2m.c:p2m_add_foregin for more details). This is for the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xen.org/archives/html/xen-devel/2017-08/msg03242.html Signed-off-by: Z

[Xen-devel] [RFC v5]Proposal to Allow Setting up Shared Memory Areas between VMs from xl Config File

2017-08-27 Thread Zhongze Liu
Implement the missing @prot flags and @cache_policy options. Allow users to optionally share mfn-contiguous pages. Set up a notification channel between domains who are communicating through shared memory regions, this allows one vm to signal her friends when data is available in the shared memory or when the data in the shared memory is consumed. The channel could be built upon PPI or SGI. [See also: https://wiki.xenproject.org/wiki/Outreach_Program_Projects#Share_a_page_in_memory_from_the_VM_config_file] Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 5/6] libxl: support mapping static shared memory areas during domain creation

2017-08-25 Thread Zhongze Liu
Hi Wei, 2017-08-25 19:05 GMT+08:00 Wei Liu : > On Wed, Aug 23, 2017 at 02:08:39AM +0800, Zhongze Liu wrote: > [...] >> diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h >> index 5e1fc6060e..1d681d8863 100644 >> --- a/tools/libxl/libxl_arch.h >>

Re: [Xen-devel] [PATCH 4/6] xsm: flask: change the interface and default policy for xsm_map_gmfn_foregin

2017-08-24 Thread Zhongze Liu
>domain (as cd) instead of > obtaining it here (just like various other hooks do)? This was my original plan, but I'm not very sure about this, so I turn to Julien for help, and... Here is part of the irc log from a discussion with Julien on #xendevel, wher

Re: [Xen-devel] [PATCH 4/6] xsm: flask: change the interface and default policy for xsm_map_gmfn_foregin

2017-08-23 Thread Zhongze Liu
in *t) >> +static int flask_map_gmfn_foreign(struct domain *cd, >> + struct domain *d, struct domain *t) >> { >> -return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | >> MMU__MAP_WRITE); >> +return domain_has_perm(cd, d, SECC

Re: [Xen-devel] [PATCH 6/6] libxl: support unmapping static shared memory areas during domain destruction

2017-08-22 Thread Zhongze Liu
Hi Stefano, 2017-08-23 5:31 GMT+08:00 Stefano Stabellini : > On Wed, 23 Aug 2017, Zhongze Liu wrote: >> Add libxl__sshm_del to Unmap static shared memory areas mapped by >> libxl__sshm_add during domain creation. The unmapping process is: >> >> * For a master: check if

Re: [Xen-devel] [PATCH 5/6] libxl: support mapping static shared memory areas during domain creation

2017-08-22 Thread Zhongze Liu
Hi Stefano, 2017-08-23 5:42 GMT+08:00 Stefano Stabellini : > On Wed, 23 Aug 2017, Zhongze Liu wrote: >> Add libxl__sshm_add to map shared pages from one DomU to another, The mapping >> process involves the follwing steps: >> >> * Set defaults and check for furth

Re: [Xen-devel] [PATCH 4/6] xsm: flask: change the interface and default policy for xsm_map_gmfn_foregin

2017-08-22 Thread Zhongze Liu
Hi Stefano, 2017-08-23 3:58 GMT+08:00 Stefano Stabellini : > On Wed, 23 Aug 2017, Zhongze Liu wrote: >> The original xsm_map_gmfn_foregin policy checks if source domain has the >> proper >> privileges over the target domain. Under this policy, it's not allowed if a >

Re: [Xen-devel] [PATCH 2/6] libxl: introduce a new structure to represent static shared memory regions

2017-08-22 Thread Zhongze Liu
Hi Stefano, 2017-08-23 4:05 GMT+08:00 Stefano Stabellini : > On Wed, 23 Aug 2017, Zhongze Liu wrote: >> Add a new structure to the IDL famliy to represent static shared memory >> regions, > ^ family > > >> as proposed in the pro

[Xen-devel] [PATCH 5/6] libxl: support mapping static shared memory areas during domain creation

2017-08-22 Thread Zhongze Liu
86/mm/p2m.c:p2m_add_foregin for more details). This is for the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Zhongze Liu Cc: Andrew Cooper Cc: George Dunlap

[Xen-devel] [PATCH 6/6] libxl: support unmapping static shared memory areas during domain destruction

2017-08-22 Thread Zhongze Liu
etween VMs from xl config file" (see [1]). [1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Zhongze Liu Cc: Ian Jackson Cc: Wei Liu Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org --- tools/libxl/libxl_domain.c | 5 ++

[Xen-devel] [PATCH 3/6] libxl:xl: add parsing code to parse "libxl_static_sshm" from xl config files

2017-08-22 Thread Zhongze Liu
[1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Zhongze Liu Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: Julien Grall Cc: xen-devel@lis

[Xen-devel] [PATCH 2/6] libxl: introduce a new structure to represent static shared memory regions

2017-08-22 Thread Zhongze Liu
Add a new structure to the IDL famliy to represent static shared memory regions, as proposed in the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Z

[Xen-devel] [PATCH 4/6] xsm: flask: change the interface and default policy for xsm_map_gmfn_foregin

2017-08-22 Thread Zhongze Liu
is for the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Zhongze Liu Cc: Stefano Stabellini Cc: Julien Grall Cc: George Dunlap Cc: Jan Beulich C

[Xen-devel] [PATCH 1/6] libxc: add xc_domain_remove_from_physmap to wrap XENMEM_remove_from_physmap

2017-08-22 Thread Zhongze Liu
er and use XENMEM_remove_from_physmap to cancel the sharing. A wrapper to XENMEM_add_to_physmap_batch was added in the following commit: commit 20e725e9364cff4a29945f66986ecd88cca8743d Now add the wrapper to XENMEM_remove_from_physmap. Signed-off-by: Zhongze Liu Reviewed-by: Stefano Stabellini Cc: Ian J

[Xen-devel] [PATCH 0/6] Allow setting up shared memory areas between VMs from xl config files

2017-08-22 Thread Zhongze Liu
VMs from xl config file: https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Cheers, Zhongze Liu (6): libxc: add xc_domain_remove_from_physmap to wrap XENMEM_remove_from_physmap libxl: introduce a new structure to represent static shared memory regions

[Xen-devel] [PATCH v2] libxc: add xc_domain_remove_from_physmap to wrap XENMEM_remove_from_physmap

2017-08-19 Thread Zhongze Liu
er and use XENMEM_remove_from_physmap to cancel the sharing. A wrapper to XENMEM_add_to_physmap_batch was added in the following commit: commit 20e725e9364cff4a29945f66986ecd88cca8743d Now add the wrapper to XENMEM_remove_from_physmap. Signed-off-by: Zhongze Liu Cc: Ian Jackson Cc: Wei Liu Cc: Stefano

[Xen-devel] [PATCH] libxc: add xc_domain_remove_from_physmap to wrap XENMEM_remove_from_physmap

2017-08-18 Thread Zhongze Liu
This is for the proposal "Allow setting up shared memory areas between VMs from xl config file". See: https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Then plan is to use XENMEM_add_to_physmap_batch to map the shared pages from one domU to another and use XENMEM_remove

Re: [Xen-devel] [RFC PATCH 4/4] libxl: support creation and destruction of static shared memory areas

2017-08-09 Thread Zhongze Liu
2017-08-08 18:49 GMT+08:00 Wei Liu : > On Sat, Aug 05, 2017 at 01:26:37AM +0800, Zhongze Liu wrote: >> Hi Wei, >> >> Thank you for reviewing my patch. >> >> 2017-08-04 23:20 GMT+08:00 Wei Liu : >> > I skim through this patch and have some questions. &g

Re: [Xen-devel] [RFC PATCH 4/4] libxl: support creation and destruction of static shared memory areas

2017-08-09 Thread Zhongze Liu
2017-08-08 18:56 GMT+08:00 Wei Liu : > On Tue, Aug 08, 2017 at 11:49:35AM +0100, Wei Liu wrote: >> On Sat, Aug 05, 2017 at 01:26:37AM +0800, Zhongze Liu wrote: >> > Hi Wei, >> > >> > Thank you for reviewing my patch. >> > >> > 2017-08-04 23:2

Re: [Xen-devel] [RFC PATCH 4/4] libxl: support creation and destruction of static shared memory areas

2017-08-04 Thread Zhongze Liu
Hi Wei, Thank you for reviewing my patch. 2017-08-04 23:20 GMT+08:00 Wei Liu : > I skim through this patch and have some questions. > > On Fri, Aug 04, 2017 at 10:20:25AM +0800, Zhongze Liu wrote: >> + >> +static int libxl__sshm_add_master(libxl__g

Re: [Xen-devel] [RFC PATCH 3/4] x86/p2m : remove checks that forbid adding foreign pages between HVM guests

2017-08-04 Thread Zhongze Liu
his hasn't been done, so I'm separating this patch out to serve as a place to discuss this problem. For this GSoC project, I would also ask if there is any temporary workaround. While waiting for any further suggestions and answers, I'll continue to work on the ARM side. Cheers, Zhon

Re: [Xen-devel] [RFC PATCH 0/4] Allow setting up shared memory areas between VMs from xl config files

2017-08-03 Thread Zhongze Liu
Hi, I should have mentioned that this RFC only adds support to the x86 side. Sorry for that. Cheers, Zhongze Liu 2017-08-04 10:20 GMT+08:00 Zhongze Liu : > This series implements the new xl config entry proposed in [1]. Users can use > the new config entry to statically setup shared

[Xen-devel] [RFC PATCH 2/4] libxl:xl: add parsing code to parse "libxl_static_sshm" from xl config files

2017-08-03 Thread Zhongze Liu
[1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Zhongze Liu --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: Julien Grall Cc: xen-devel@lis

[Xen-devel] [RFC PATCH 4/4] libxl: support creation and destruction of static shared memory areas

2017-08-03 Thread Zhongze Liu
.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Zhongze Liu --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: Julien Grall Cc: xen-devel@lists.xen.org --- tools

[Xen-devel] [RFC PATCH 1/4] libxl: introduce a new structure to represent static shared memory regions

2017-08-03 Thread Zhongze Liu
Add a new structure to the IDL famliy to represent static shared memory regions, as proposed in the proposal "Allow setting up shared memory areas between VMs from xl config file" (see [1]). [1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Z

[Xen-devel] [RFC PATCH 3/4] x86/p2m : remove checks that forbid adding foreign pages between HVM guests

2017-08-03 Thread Zhongze Liu
mory areas between VMs from xl config file" (see [1]). [1] https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Signed-off-by: Zhongze Liu --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org ---

[Xen-devel] [RFC PATCH 0/4] Allow setting up shared memory areas between VMs from xl config files

2017-08-03 Thread Zhongze Liu
VMs from xl config files: https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg03047.html Cheers, Zhongze Liu (4): libxl: introduce a new structure to represent static shared memory regions libxl:xl: add parsing code to parse "libxl_static_sshm" from xl config

Re: [Xen-devel] [RFC v4]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-08-01 Thread Zhongze Liu
Hi Edgar, Thank you for being interested in this project. 2017-08-01 5:55 GMT+08:00 Edgar E. Iglesias : > On Mon, Jul 31, 2017 at 02:30:47PM -0700, Stefano Stabellini wrote: >> On Mon, 31 Jul 2017, Edgar E. Iglesias wrote: >> > On Fri, Jul 28, 2017 at 09:03:15PM +0800,

Re: [Xen-devel] [RFC v4]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-07-30 Thread Zhongze Liu
rk on both x86 and ARM. 3. Future Directions: Implement the missing @prot flags and @cache_policy options. Set up a notification channel between domains who are communicating through shared

[Xen-devel] [RFC v4]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-07-28 Thread Zhongze Liu
nd @cache_policy options. Set up a notification channel between domains who are communicating through shared memory regions, this allows one vm to signal her friends when data is available in the shared memory or when the data in the shared memory is consumed. The channel could be built upon PPI or SGI. [See also: https://wiki.xenproject.org/wiki/Outreach_Program_Projects#Share_a_page_in_memory_from_the_VM_config_file] Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [RFC PATCH] tools/libxl : add struct and parsing utils for the 'static_shm' xl config entry

2017-07-20 Thread Zhongze Liu
2017-07-20 9:43 GMT+08:00 Zhongze Liu : > Hi Stefano, > > 2017-07-20 3:24 GMT+08:00 Stefano Stabellini : >> On Wed, 19 Jul 2017, Zhongze Liu wrote: >>> Add a new struct libxl_static_shm in the libxl IDL for the proposed new xl >>> config entry 'static_shm'

Re: [Xen-devel] [RFC v3]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-07-19 Thread Zhongze Liu
Hi Stefano, I missed some of your comments in the last reply. adding responses to them. 2017-07-20 2:47 GMT+08:00 Stefano Stabellini : > On Wed, 19 Jul 2017, Zhongze Liu wrote: >> >> 1. Motivation

Re: [Xen-devel] [RFC PATCH] tools/libxl : add struct and parsing utils for the 'static_shm' xl config entry

2017-07-19 Thread Zhongze Liu
Hi Stefano, 2017-07-20 3:24 GMT+08:00 Stefano Stabellini : > On Wed, 19 Jul 2017, Zhongze Liu wrote: >> Add a new struct libxl_static_shm in the libxl IDL for the proposed new xl >> config entry 'static_shm' (see [1]), which allow the user to set up shared >> mem

Re: [Xen-devel] [RFC v3]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-07-19 Thread Zhongze Liu
2017-07-20 2:47 GMT+08:00 Stefano Stabellini : > On Wed, 19 Jul 2017, Zhongze Liu wrote: >> >> 1. Motivation and Description >> >> Virtual machines use grant table

[Xen-devel] [RFC PATCH] tools/libxl : add struct and parsing utils for the 'static_shm' xl config entry

2017-07-18 Thread Zhongze Liu
roposal to allow setting up shared memory areas between VMs from xl config file, https://lists.xenproject.org/archives/html/xen-devel/2017-07/msg01741.html Signed-off-by: Zhongze Liu --- Cc: Wei Liu Cc: Ian Jackson Cc: Stefano Stabellini Cc: Julien Grall Cc: xen-devel@lists.xen.org

Re: [Xen-devel] [RFC v3]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-07-18 Thread Zhongze Liu
Forget to restrict the possible values of begin/end. 2017-07-19 2:30 GMT+08:00 Zhongze Liu : > > 1. Motivation and Description > > Virtual machines use grant table hypercalls to s

[Xen-devel] [RFC v3]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-07-18 Thread Zhongze Liu
=== Add code to handle various errors: Invalid address, invalid permissions, wrong order of vm creation, mismatched length of memory area etc. 3. Expected Outcomes/Goals: A new VM config opt

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-07-18 Thread Zhongze Liu
hen be calculated by multiplying them with @granularity. For example, if begin=0x100 and granularity=4k then the shared space will begin at the address 0x10. Cheers, Zhongze Liu 2017-07-18 20:10 GMT+08:00 Julien Grall : > Hi, > > > On 2

Re: [Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-07-03 Thread Zhongze Liu
mplementation in xen/common/mem_access.c, where I see this interface invoking p2m_set_mem_acess, which further invokes set_mem_acess and finally p2m->set_entry(), so I guess this might be the right interface to use. To confirm the guess, I turned to Stabellini for help, and he told me that XENM

Re: [Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-07-03 Thread Zhongze Liu
Hi Julien, 2017-07-03 19:16 GMT+08:00 Julien Grall : > Hi, > > On 01/07/17 10:16, Zhongze Liu wrote: >>> >>> On the ARM side, we are missing BUFFERABLE and WRITEALLOC. I don't know >>> how they map to these tags, which comes from the x86 world. Maybe we &

Re: [Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-07-01 Thread Zhongze Liu
2017-07-01 17:16 GMT+08:00 Zhongze Liu : > Hi Stefano, > > Added Julien and removed those who are mistakenly Cc'ed:-) > will never try to draft emails half asleep again. > > 2017-07-01 5:48 GMT+08:00 Stefano Stabellini : >> On Sat,

Re: [Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-07-01 Thread Zhongze Liu
Hi Stefano, Added Julien and removed those who are mistakenly Cc'ed:-) will never try to draft emails half asleep again. 2017-07-01 5:48 GMT+08:00 Stefano Stabellini : > On Sat, 1 Jul 2017, Zhongze L

Re: [Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-07-01 Thread Zhongze Liu
It seems that I fed the wrong patch to scripts/get_maintainers.pl. Sorry for mistakenly Cc'ing George, Konrad, and Tim. Apologies for this sudden mail in your inbox. Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org

[Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-06-30 Thread Zhongze Liu
DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes Zhongze Liu

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
caching attributes, with the rest left to the to-be-done list. Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
Hi Wei, Thank you for your valuable comments. 2017-06-21 23:09 GMT+08:00 Wei Liu : > On Wed, Jun 21, 2017 at 01:18:38AM +0800, Zhongze Liu wrote: >> >> 1. Motivation

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
Hi Julien, 2017-06-21 1:29 GMT+08:00 Julien Grall : > Hi, > > Thank you for the new proposal. > > On 06/20/2017 06:18 PM, Zhongze Liu wrote: >> >> In the example above. A memory area ID1 will be shared between vm1 and >> vm2. >> This area will be taken from

[Xen-devel] [PATCH v3] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-22 Thread Zhongze Liu
is to use XENMEM_add_to_physmap_batch in xl to map foregin pages from one DomU to another so that the page could be shared. But currently there is no wrapper for XENMEM_add_to_physmap_batch in libxc, so we just add a wrapper for it. Signed-off-by: Zhongze Liu --- Changed Since v2: * fix coding style issue * let

Re: [Xen-devel] [PATCH v2] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-22 Thread Zhongze Liu
Hi Wei, 2017-06-21 23:44 GMT+08:00 Wei Liu : > On Wed, Jun 21, 2017 at 01:29:26AM +0800, Zhongze Liu wrote: >> This is a preparation for the proposal "allow setting up shared memory areas >> between VMs from xl config file". See: >> V2: https://lists.xen.org/

[Xen-devel] [PATCH v2] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-20 Thread Zhongze Liu
is to use XENMEM_add_to_physmap_batch in xl to map foregin pages from one DomU to another so that the page could be shared. But currently there is no wrapper for XENMEM_add_to_physmap_batch in libxc, so we just add a wrapper for it. Signed-off-by: Zhongze Liu --- Changed Since v1: * explain why such a sudd

[Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-20 Thread Zhongze Liu
== There could also be other non-permission memory attributes like cacheability and shareability. Indications of where in the host physical memory should we get the backing memory from. Set up a notification channel between domains who are communicating through shared m

Re: [Xen-devel] [PATCH] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-16 Thread Zhongze Liu
2017-06-16 17:44 GMT+08:00 Zhongze Liu : > 2017-06-16 17:36 GMT+08:00 Zhongze Liu : >> Hi Jan, >> >> >> 2017-06-16 16:45 GMT+08:00 Jan Beulich : >>>>>> On 16.06.17 at 06:55, wrote: >>>> currently there is no wrapper for XENMEM_add

Re: [Xen-devel] questions on mem_sharing_op*'s and tools/tests/mem-sharing/memshrtool

2017-06-16 Thread Zhongze Liu
Hi Ian, 2017-06-16 17:36 GMT+08:00 Ian Jackson : > Zhongze Liu writes ("Re: questions on mem_sharing_op*'s and > tools/tests/mem-sharing/memshrtool"): >> 2017-06-16 11:50 GMT+08:00 Zhongze Liu : >> > Hi there, >> > >> > I was experime

Re: [Xen-devel] questions on mem_sharing_op*'s and tools/tests/mem-sharing/memshrtool

2017-06-16 Thread Zhongze Liu
Hi Ian, 2017-06-16 17:36 GMT+08:00 Ian Jackson : > Zhongze Liu writes ("Re: questions on mem_sharing_op*'s and > tools/tests/mem-sharing/memshrtool"): >> 2017-06-16 11:50 GMT+08:00 Zhongze Liu : >> > Hi there, >> > >> > I was experime

Re: [Xen-devel] [PATCH] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-16 Thread Zhongze Liu
2017-06-16 17:36 GMT+08:00 Zhongze Liu : > Hi Jan, > > > 2017-06-16 16:45 GMT+08:00 Jan Beulich : >>>>> On 16.06.17 at 06:55, wrote: >>> currently there is no wrapper for XENMEM_add_to_physmap_batch in libxc. >>> add a wrapper to do that. >>

Re: [Xen-devel] [PATCH] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-16 Thread Zhongze Liu
uint16_t, so I think I should have made @space uint16_t, too. I'll fix this. Or do you have any good reasons to make both of them unsigned int? > >> + xen_ulong_t *idxs, >> + xen_pfn_t *gfpns, > > ... and these

[Xen-devel] [PATCH] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-15 Thread Zhongze Liu
currently there is no wrapper for XENMEM_add_to_physmap_batch in libxc. add a wrapper to do that. Signed-off-by: Zhongze Liu --- Cc: Ian Jackson , Cc: Wei Liu , Cc: Stefano Stabellini --- tools/libxc/include/xenctrl.h | 9 + tools/libxc/xc_domain.c | 44

Re: [Xen-devel] questions on mem_sharing_op*'s and tools/tests/mem-sharing/memshrtool

2017-06-15 Thread Zhongze Liu
2017-06-16 11:50 GMT+08:00 Zhongze Liu : > Hi there, > > I was experimenting with the mem_sharing_op and I found a handy tool: > tools/tests/mem-sharing/memshrtool > I set up two bare metal x86_64 VMS running some simple code in 16-bit > real mode and I tried to share the first p

[Xen-devel] questions on mem_sharing_op*'s and tools/tests/mem-sharing/memshrtool

2017-06-15 Thread Zhongze Liu
estrition on the gfns to be shared? Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] About the parameter list of tools/libxc/xc_domain.c:xc_domain_add_to_physmap()

2017-06-14 Thread Zhongze Liu
I didn't saw your mail. Sorry. 2017-06-14 23:13 GMT+08:00 Zhongze Liu : > 2017-06-14 22:42 GMT+08:00 Wei Liu : >> On Wed, Jun 14, 2017 at 09:19:23PM +0800, Zhongze Liu wrote: >>> Hi Xen developers, >>> >>> In tools/libxc/xc_domain.c:xc_domain_ad

Re: [Xen-devel] About the parameter list of tools/libxc/xc_domain.c:xc_domain_add_to_physmap()

2017-06-14 Thread Zhongze Liu
2017-06-14 22:42 GMT+08:00 Wei Liu : > On Wed, Jun 14, 2017 at 09:19:23PM +0800, Zhongze Liu wrote: >> Hi Xen developers, >> >> In tools/libxc/xc_domain.c:xc_domain_add_to_physmap() the .size field >> of the xen_add_to_physmap >> struct can't be controlled by

Re: [Xen-devel] About the parameter list of tools/libxc/xc_domain.c:xc_domain_add_to_physmap()

2017-06-14 Thread Zhongze Liu
Hi Wei, 2017-06-14 22:42 GMT+08:00 Wei Liu : > On Wed, Jun 14, 2017 at 09:19:23PM +0800, Zhongze Liu wrote: >> Hi Xen developers, >> >> In tools/libxc/xc_domain.c:xc_domain_add_to_physmap() the .size field >> of the xen_add_to_physmap >> struct can't b

[Xen-devel] About the parameter list of tools/libxc/xc_domain.c:xc_domain_add_to_physmap()

2017-06-14 Thread Zhongze Liu
m doing an XENMEMSPACE_gmfn_range- call. Is it a mistake or is it intentionally done so? Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH v3] tools: fix several "format-truncation" warnings with GCC 7

2017-06-13 Thread Zhongze Liu
;%d: %s: %s", error->code, ^~ xenctrl_stubs.c:64:4: note: ‘snprintf’ output 5 or more bytes (assuming 1028) into a destination of size 256 Enlarge the size of these buffers as suggested by the complier (and slightly rounded) to fix the warnings. No functional changes. Signed-off-by: Zhongze Liu

Re: [Xen-devel] [PATCH v2] tools: fix several "format-truncation" warnings with GCC 7

2017-06-13 Thread Zhongze Liu
Hi Wei & Ian, 2017-06-13 18:52 GMT+08:00 Wei Liu : > On Tue, Jun 13, 2017 at 11:19:58AM +0100, Ian Jackson wrote: >> Zhongze Liu writes ("[PATCH v2] tools: fix several "format-truncation" >> warnings with GCC 7"): >> > GCC 7.1.1 complains that sev

Re: [Xen-devel] [PATCH] tools: fix several "format-truncation" errors with GCC 7

2017-06-12 Thread Zhongze Liu
Hi Ian, Thanks for pointing out the problems. I've consulted several maintainers about this and have drafted a new patch for it (in a new [patch v2] thread). Please have a look at it. Thanks. Cheers, Zhongze Liu. 2017-06-12 20:31 GMT+08:00 Ian Jackson : > Zhongze Liu writes ("

[Xen-devel] [PATCH v2] tools: fix several "format-truncation" warnings with GCC 7

2017-06-12 Thread Zhongze Liu
GCC 7.1.1 complains that several buffers passed to snprintf() in xenpmd and tools/ocmal/xc are too small to hold the largest possible resulting string. enlarge the size of these buffers to fix the warnings. Signed-off-by: Zhongze Liu --- CC: David Scott CC: Ian Jackson CC: Wei Liu Changed

[Xen-devel] [PATCH] tools: fix several "format-truncation" errors with GCC 7

2017-06-12 Thread Zhongze Liu
replace several snprintf with asprintf in xenpmd and tools/ocmal/xc to fix the "format-truncation" errors caused by incorrect size of buffers. Signed-off-by: Zhongze Liu --- CC: David Scott CC: Ian Jackson CC: Wei Liu --- tools/ocaml/libs/xc/xenctrl_stubs.c | 12 +--- to

Re: [Xen-devel] [BUB REPORT] compiler warnings when building tools/firmware/etherboot/ipxe

2017-06-12 Thread Zhongze Liu
Hi Wei Liu, 2017-06-12 19:21 GMT+08:00 Wei Liu : > On Mon, Jun 12, 2017 at 12:19:42PM +0100, Wei Liu wrote: >> On Mon, Jun 12, 2017 at 06:40:33PM +0800, Zhongze Liu wrote: >> > Hi Xen developers, >> > >> > Several -Wimplicit-fallthrough were found under >

[Xen-devel] [BUB REPORT] compiler warnings when building tools/firmware/etherboot/ipxe

2017-06-12 Thread Zhongze Liu
Hi Xen developers, Several -Wimplicit-fallthrough were found under tools/firmware/etherboot/ipxe with GCCv7.1.1. I'm not sure whether this is the right place to report this since it's not part of the xen source tree, But I think I'd better let you know. Cheer

Re: [Xen-devel] Proposal to allow setting up shared memory areas between VMs from xl config file

2017-05-30 Thread Zhongze Liu
Hi Wei Liu, Thanks for your review and approval. Then I'll revise my proposal according to these conclusions. Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] Proposal to allow setting up shared memory areas between VMs from xl config file

2017-05-23 Thread Zhongze Liu
the possibility of using the grants api as the final implementation choice. This list might be incomplete. Please tell me if I missed or misunderstand any important information. Cheers, Zhongze Liu ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

  1   2   >