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

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



>>> On 26.03.18 at 13:41, <JBeulich@xxxxxxxx> wrote:
>>>> On 22.03.18 at 12:55, <paul.durrant@xxxxxxxxxx> wrote:
>> --- a/xen/include/public/memory.h
>> +++ b/xen/include/public/memory.h
>> @@ -599,6 +599,59 @@ struct xen_reserved_device_memory_map {
>>  typedef struct xen_reserved_device_memory_map 
>> xen_reserved_device_memory_map_t;
>>  DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t);
>>  
>> +/*
>> + * Get the pages for a particular guest resource, so that they can be
>> + * mapped directly by a tools domain.
>> + */
>> +#define XENMEM_acquire_resource 28
>> +struct xen_mem_acquire_resource {
>> +    /* IN - The domain whose resource is to be mapped */
>> +    domid_t domid;
>> +    /* IN - the type of resource */
>> +    uint16_t type;
>> +    /*
>> +     * IN - a type-specific resource identifier, which must be zero
>> +     *      unless stated otherwise.
>> +     */
>> +    uint32_t id;
>> +    /*
>> +     * IN/OUT - As an IN parameter number of frames of the resource
>> +     *          to be mapped. However, if the specified value is 0 and
>> +     *          frame_list is NULL then this field will be set to the
>> +     *          maximum value supported by the implementation on return.
>> +     */
>> +    uint32_t nr_frames;
>> +    /*
>> +     * OUT - Must be zero on entry. On return this may contain a bitwise
>> +     *       OR of the following values.
>> +     */
>> +    uint32_t flags;
>> +
>> +    /* The resource pages have been assigned to the tools domain */
>> +#define _XENMEM_resource_flag_tools_owned 0
>> +#define XENMEM_resource_flag_tools_owned (1u << 
> _XENMEM_resource_flag_tools_owned)
> 
> Is "tools" really an appropriate (and "flag" a necessary) name
> component here? How about e.g. XENMEM_res_acq_caller_owned?

Or maybe XENMEM_rsrc_acq_caller_owned.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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