[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v9 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources



>>> On 06.10.17 at 14:25, <paul.durrant@xxxxxxxxxx> wrote:
> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -965,6 +965,67 @@ static long xatp_permission_check(struct domain *d, 
> unsigned int space)
>      return xsm_add_to_physmap(XSM_TARGET, current->domain, d);
>  }
>  
> +#ifdef CONFIG_X86
> +static int acquire_resource(const xen_mem_acquire_resource_t *xmar)
> +{
> +    struct domain *d, *currd = current->domain;
> +    unsigned long mfn_list[2];
> +    int rc;
> +
> +    if ( xmar->nr_frames == 0 || xmar->pad != 0 )
> +        return -EINVAL;
> +
> +    if ( xmar->nr_frames > ARRAY_SIZE(mfn_list) )
> +        return -E2BIG;
> +
> +    d = rcu_lock_domain_by_any_id(xmar->domid);
> +    if ( d == NULL )
> +        return -ESRCH;
> +
> +    rc = xsm_domain_memory_map(XSM_TARGET, d);

Looking at the description of patch 6 - why is this XSM_TARGET
rather than XSM_DM_PRIV?

Jan


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.