Re: [Xen-devel] [PATCH] common/mem_access: merged mem_access setting interfaces

2017-03-16 Thread Razvan Cojocaru
On 03/16/2017 08:10 PM, Tamas K Lengyel wrote:
> 
> 
> diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
> index 6eee0c8..ca53a0c 100644
> --- a/xen/include/public/memory.h
> +++ b/xen/include/public/memory.h
> @@ -444,6 +444,8 @@ struct xen_mem_access_op {
>  /* xenmem_access_t */
>  uint8_t access;
>  domid_t domid;
> +uint16_t view_id;
> +uint16_t pad;
> 
> 
> I think this will mess with the next uint32_t struct member, so either
> this pad should be uint16_t pad[3], or another pad needs to be added
> after the following uint32_t nr.

Fair enough, I'll need to send V2 anyway as Roger's "x86: remove PVHv1
code" has also bumped XEN_DOMCTL_INTERFACE_VERSION and I now need to
take it out.


Thanks,
Razvan

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH] common/mem_access: merged mem_access setting interfaces

2017-03-16 Thread Tamas K Lengyel
On Thu, Mar 16, 2017 at 12:33 PM, Razvan Cojocaru  wrote:

> On 03/16/2017 08:10 PM, Tamas K Lengyel wrote:
> >
> >
> > diff --git a/xen/include/public/memory.h
> b/xen/include/public/memory.h
> > index 6eee0c8..ca53a0c 100644
> > --- a/xen/include/public/memory.h
> > +++ b/xen/include/public/memory.h
> > @@ -444,6 +444,8 @@ struct xen_mem_access_op {
> >  /* xenmem_access_t */
> >  uint8_t access;
> >  domid_t domid;
> > +uint16_t view_id;
> > +uint16_t pad;
> >
> >
> > I think this will mess with the next uint32_t struct member, so either
> > this pad should be uint16_t pad[3], or another pad needs to be added
> > after the following uint32_t nr.
>
> Fair enough, I'll need to send V2 anyway as Roger's "x86: remove PVHv1
> code" has also bumped XEN_DOMCTL_INTERFACE_VERSION and I now need to
> take it out.
>

Sounds good. The patch looks good to me otherwise.

Tamas
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH] common/mem_access: merged mem_access setting interfaces

2017-03-16 Thread Tamas K Lengyel
diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
> index 6eee0c8..ca53a0c 100644
> --- a/xen/include/public/memory.h
> +++ b/xen/include/public/memory.h
> @@ -444,6 +444,8 @@ struct xen_mem_access_op {
>  /* xenmem_access_t */
>  uint8_t access;
>  domid_t domid;
> +uint16_t view_id;
> +uint16_t pad;
>

I think this will mess with the next uint32_t struct member, so either this
pad should be uint16_t pad[3], or another pad needs to be added after the
following uint32_t nr.


>  /*
>   * Number of pages for set op (or size of pfn_list for
>   * XENMEM_access_op_set_access_multi)
> --
> 1.9.1
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH] common/mem_access: merged mem_access setting interfaces

2017-03-16 Thread Wei Liu
On Thu, Mar 16, 2017 at 02:32:07PM +0200, Razvan Cojocaru wrote:
> xc_altp2m_set_mem_access() and xc_set_mem_access() end up doing the same thing
> in the hypervisor, but the former is a HVMOP and the latter a DOMCTL. Since
> nobody is currently using, or has stated intent to use, this functionality
> specifically as an HVMOP, this patch removes the HVMOP while adding an extra
> parameter to the more flexible DOMCTL variant, in which the altp2m view can be
> transmitted (0 for the default view, or when altp2m is disabled).
> The xen-access test has been updated in the process.
> 
> Signed-off-by: Razvan Cojocaru 
> ---
>  tools/libxc/include/xenctrl.h   | 10 +++---
>  tools/libxc/xc_altp2m.c | 25 -
>  tools/libxc/xc_mem_access.c | 14 +-
>  tools/tests/xen-access/xen-access.c | 25 -

Subject to an ack on the HV changes:

Acked-by: Wei Liu 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel