On 12/09/2019 14:15, Andrew Cooper wrote:
> On 12/09/2019 09:06, Jan Beulich wrote:
>> On 11.09.2019 22:04, Andrew Cooper wrote:
>>> --- a/tools/libxc/xc_cpuid_x86.c
>>> +++ b/tools/libxc/xc_cpuid_x86.c
>>> @@ -229,6 +229,55 @@ int xc_get_domain_cpu_policy(xc_interface *xch, 
>>> uint32_t domid,
>>>      return ret;
>>>  }
>>>  
>>> +int xc_set_domain_cpu_policy(xc_interface *xch, uint32_t domid,
>>> +                             uint32_t nr_leaves, xen_cpuid_leaf_t *leaves,
>>> +                             uint32_t nr_msrs, xen_msr_entry_t *msrs,
>>> +                             uint32_t *err_leaf_p, uint32_t *err_subleaf_p,
>>> +                             uint32_t *err_msr_idx_p)
>>> +{
>>> +    DECLARE_DOMCTL;
>>> +    DECLARE_HYPERCALL_BOUNCE(leaves,
>>> +                             nr_leaves * sizeof(*leaves),
>>> +                             XC_HYPERCALL_BUFFER_BOUNCE_IN);
>>> +    DECLARE_HYPERCALL_BOUNCE(msrs,
>>> +                             nr_msrs * sizeof(*msrs),
>>> +                             XC_HYPERCALL_BUFFER_BOUNCE_IN);
>> With both being IN, the respective function parameters should imo
>> be pointers to const.
> Ok.

Sadly not.  It turns out that this is incompatible with the internals of
DECLARE_HYPERCALL_BOUNCE().

~Andrew

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

Reply via email to