|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 01/12] misc/xenmicrocode: Upload a microcode blob to the hypervisor
On Mon, Mar 25, 2019 at 09:38:21AM +0000, Sergey Dyasli wrote:
>On 11/03/2019 07:57, Chao Gao wrote:
>> This patch provides a tool for late microcode update.
>>
>> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>
>> ---
>> tools/libxc/include/xenctrl.h | 1 +
>> tools/libxc/xc_misc.c | 20 ++++++++++
>> tools/misc/Makefile | 4 ++
>> tools/misc/xenmicrocode.c | 89
>> +++++++++++++++++++++++++++++++++++++++++++
>> 4 files changed, 114 insertions(+)
>> create mode 100644 tools/misc/xenmicrocode.c
>>
>> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
>> index 31cdda7..c69699b 100644
>> --- a/tools/libxc/include/xenctrl.h
>> +++ b/tools/libxc/include/xenctrl.h
>> @@ -1245,6 +1245,7 @@ typedef uint32_t xc_node_to_node_dist_t;
>> int xc_physinfo(xc_interface *xch, xc_physinfo_t *info);
>> int xc_cputopoinfo(xc_interface *xch, unsigned *max_cpus,
>> xc_cputopo_t *cputopo);
>> +int xc_platform_op(xc_interface *xch, struct xen_platform_op *op);
>> int xc_numainfo(xc_interface *xch, unsigned *max_nodes,
>> xc_meminfo_t *meminfo, uint32_t *distance);
>> int xc_pcitopoinfo(xc_interface *xch, unsigned num_devs,
>> diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
>> index 5e6714a..061c7a5 100644
>> --- a/tools/libxc/xc_misc.c
>> +++ b/tools/libxc/xc_misc.c
>> @@ -226,6 +226,26 @@ int xc_physinfo(xc_interface *xch,
>> return 0;
>> }
>>
>> +int xc_platform_op(xc_interface *xch, struct xen_platform_op *op)
>> +{
>> + int ret = 0;
>> + DECLARE_PLATFORM_OP;
>> + DECLARE_HYPERCALL_BOUNCE(op, sizeof(*op),
>> XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
>
>So I've found that the bouncing in this function is not needed.
>In fact, it gets in a way when Xen is returning information via
>xen_platform_op.
>I ended up having only the single line in this function:
>
> return do_platform_op(xch, op);
>
>Not sure how correct this is, but it seems to work for ucode application and
>XENPF_get_cpu_version.
You are right. The bounce buffer here is pointless, as do_platform_op()
creates bounce buffer anyhow. Will remove it.
Thanks
Chao
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |