xen: Introduce a xmemdup_bytes() helper
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Mar 2020 20:53:58 +0000 (20:53 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 27 Mar 2020 12:22:00 +0000 (12:22 +0000)
commite741f71d1d40f21dacaf32d4272e3e04137129f7
tree63e79eef848ba4dc16280c56a4cb7ae9a30e09c0
parentc72154e88c6c177ce9b9ec3c5388b5bfcce42f34
xen: Introduce a xmemdup_bytes() helper

Use it to simplify the x86 microcode logic, taking the opportunity to drop the
-ENOMEM printks.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wl@xen.org>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/x86/cpu/microcode/amd.c
xen/arch/x86/cpu/microcode/intel.c
xen/include/xen/xmalloc.h