aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/xstate.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-10-04 14:18:30 +0200
committerJan Beulich <jbeulich@suse.com>2011-10-04 14:18:30 +0200
commit1527de3f85fa0c94578fdd12792588e0825ef2eb (patch)
treedd39a33980d9c79ffbd93afc7fe3aa71e990c1df /xen/arch/x86/xstate.c
parent91f47f155288b0116472a7ce64d8709f144a5357 (diff)
downloadxen-1527de3f85fa0c94578fdd12792588e0825ef2eb.tar.gz
xen-1527de3f85fa0c94578fdd12792588e0825ef2eb.tar.bz2
xen-1527de3f85fa0c94578fdd12792588e0825ef2eb.zip
use xzalloc in x86 code
This includes the removal of a redundant memset() from microcode_amd.c. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/xstate.c')
-rw-r--r--xen/arch/x86/xstate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/arch/x86/xstate.c b/xen/arch/x86/xstate.c
index fdb80d37ab..8b9c5583f6 100644
--- a/xen/arch/x86/xstate.c
+++ b/xen/arch/x86/xstate.c
@@ -105,11 +105,10 @@ int xstate_alloc_save_area(struct vcpu *v)
BUG_ON(xsave_cntxt_size < XSTATE_AREA_MIN_SIZE);
/* XSAVE/XRSTOR requires the save area be 64-byte-boundary aligned. */
- save_area = _xmalloc(xsave_cntxt_size, 64);
+ save_area = _xzalloc(xsave_cntxt_size, 64);
if ( save_area == NULL )
return -ENOMEM;
- memset(save_area, 0, xsave_cntxt_size);
((u32 *)save_area)[6] = 0x1f80; /* MXCSR */
*(uint64_t *)(save_area + 512) = XSTATE_FP_SSE; /* XSETBV */