@@ -1377,16 +1377,17 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
unsigned int i;
const struct domain *d = v->domain;
bool compat = is_pv_32bit_domain(d);
+ const struct xsave_struct *xsave_area;
#ifdef CONFIG_COMPAT
#define c(fld) (!compat ? (c.nat->fld) : (c.cmp->fld))
#else
#define c(fld) (c.nat->fld)
#endif
- BUILD_BUG_ON(sizeof(c.nat->fpu_ctxt) !=
- sizeof(v->arch.xsave_area->fpu_sse));
- memcpy(&c.nat->fpu_ctxt, &v->arch.xsave_area->fpu_sse,
- sizeof(c.nat->fpu_ctxt));
+ xsave_area = VCPU_MAP_XSAVE_AREA(v);
+ BUILD_BUG_ON(sizeof(c.nat->fpu_ctxt) != sizeof(xsave_area->fpu_sse));
+ memcpy(&c.nat->fpu_ctxt, &xsave_area->fpu_sse, sizeof(c.nat->fpu_ctxt));
+ VCPU_UNMAP_XSAVE_AREA(v, xsave_area);
if ( is_pv_domain(d) )
c(flags = v->arch.pv.vgc_flags & ~(VGCF_i387_valid|VGCF_in_kernel));
No functional change. Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com> --- v2: * No change --- xen/arch/x86/domctl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)