@@ -174,10 +174,10 @@ static void setup_xstate_comp(uint16_t *comp_offsets,
*/
void expand_xsave_states(const struct vcpu *v, void *dest, unsigned int size)
{
- const struct xsave_struct *xsave = v->arch.xsave_area;
+ const struct xsave_struct *xsave_area = v->arch.xsave_area;
const void *src;
uint16_t comp_offsets[sizeof(xfeature_mask)*8];
- u64 xstate_bv = xsave->xsave_hdr.xstate_bv;
+ u64 xstate_bv = xsave_area->xsave_hdr.xstate_bv;
u64 valid;
/* Check there is state to serialise (i.e. at least an XSAVE_HDR) */
@@ -185,19 +185,19 @@ void expand_xsave_states(const struct vcpu *v, void *dest, unsigned int size)
/* Check there is the correct room to decompress into. */
BUG_ON(size != xstate_ctxt_size(v->arch.xcr0_accum));
- if ( !(xsave->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED) )
+ if ( !(xsave_area->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED) )
{
- memcpy(dest, xsave, size);
+ memcpy(dest, xsave_area, size);
return;
}
- ASSERT(xsave_area_compressed(xsave));
- setup_xstate_comp(comp_offsets, xsave->xsave_hdr.xcomp_bv);
+ ASSERT(xsave_area_compressed(xsave_area));
+ setup_xstate_comp(comp_offsets, xsave_area->xsave_hdr.xcomp_bv);
/*
* Copy legacy XSAVE area and XSAVE hdr area.
*/
- memcpy(dest, xsave, XSTATE_AREA_MIN_SIZE);
+ memcpy(dest, xsave_area, XSTATE_AREA_MIN_SIZE);
memset(dest + XSTATE_AREA_MIN_SIZE, 0, size - XSTATE_AREA_MIN_SIZE);
((struct xsave_struct *)dest)->xsave_hdr.xcomp_bv = 0;
@@ -206,7 +206,7 @@ void expand_xsave_states(const struct vcpu *v, void *dest, unsigned int size)
* Copy each region from the possibly compacted offset to the
* non-compacted offset.
*/
- src = xsave;
+ src = xsave_area;
valid = xstate_bv & ~XSTATE_FP_SSE;
while ( valid )
{
@@ -239,7 +239,7 @@ void expand_xsave_states(const struct vcpu *v, void *dest, unsigned int size)
*/
void compress_xsave_states(struct vcpu *v, const void *src, unsigned int size)
{
- struct xsave_struct *xsave = v->arch.xsave_area;
+ struct xsave_struct *xsave_area = v->arch.xsave_area;
void *dest;
uint16_t comp_offsets[sizeof(xfeature_mask)*8];
u64 xstate_bv, valid;
@@ -252,7 +252,7 @@ void compress_xsave_states(struct vcpu *v, const void *src, unsigned int size)
if ( !(v->arch.xcr0_accum & XSTATE_XSAVES_ONLY) )
{
- memcpy(xsave, src, size);
+ memcpy(xsave_area, src, size);
return;
}
@@ -260,19 +260,19 @@ void compress_xsave_states(struct vcpu *v, const void *src, unsigned int size)
* Copy legacy XSAVE area, to avoid complications with CPUID
* leaves 0 and 1 in the loop below.
*/
- memcpy(xsave, src, FXSAVE_SIZE);
+ memcpy(xsave_area, src, FXSAVE_SIZE);
/* Set XSTATE_BV and XCOMP_BV. */
- xsave->xsave_hdr.xstate_bv = xstate_bv;
- xsave->xsave_hdr.xcomp_bv = v->arch.xcr0_accum | XSTATE_COMPACTION_ENABLED;
+ xsave_area->xsave_hdr.xstate_bv = xstate_bv;
+ xsave_area->xsave_hdr.xcomp_bv = v->arch.xcr0_accum | XSTATE_COMPACTION_ENABLED;
- setup_xstate_comp(comp_offsets, xsave->xsave_hdr.xcomp_bv);
+ setup_xstate_comp(comp_offsets, xsave_area->xsave_hdr.xcomp_bv);
/*
* Copy each region from the non-compacted offset to the
* possibly compacted offset.
*/
- dest = xsave;
+ dest = xsave_area;
valid = xstate_bv & ~XSTATE_FP_SSE;
while ( valid )
{
Rename the local variables to avoid clashing with function 'xstate' defined below, but declared in the corresponding header file. No functional changes. Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> --- xen/arch/x86/xstate.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)