[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/xstate: Use compression check helper in xstate_all()
commit b3f1cb51cf1d032021dabf3a9ae873ce9fb0e14b Author: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx> AuthorDate: Wed Jul 24 11:36:55 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Jul 24 11:36:55 2024 +0200 x86/xstate: Use compression check helper in xstate_all() Minor refactor to make xstate_all() use a helper rather than poking directly into the XSAVE header. No functional change Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/include/asm/xstate.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/xstate.h b/xen/arch/x86/include/asm/xstate.h index f4a8e5f814..f0eeb13b87 100644 --- a/xen/arch/x86/include/asm/xstate.h +++ b/xen/arch/x86/include/asm/xstate.h @@ -122,6 +122,12 @@ static inline uint64_t xgetbv(unsigned int index) return lo | ((uint64_t)hi << 32); } +static inline bool __nonnull(1) +xsave_area_compressed(const struct xsave_struct *xsave_area) +{ + return xsave_area->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED; +} + static inline bool xstate_all(const struct vcpu *v) { /* @@ -129,15 +135,8 @@ static inline bool xstate_all(const struct vcpu *v) * (in the legacy region of xsave area) are fixed, so saving * XSTATE_FP_SSE will not cause overwriting problem with XSAVES/XSAVEC. */ - return (v->arch.xsave_area->xsave_hdr.xcomp_bv & - XSTATE_COMPACTION_ENABLED) && + return xsave_area_compressed(v->arch.xsave_area) && (v->arch.xcr0_accum & XSTATE_LAZY & ~XSTATE_FP_SSE); } -static inline bool __nonnull(1) -xsave_area_compressed(const struct xsave_struct *xsave_area) -{ - return xsave_area->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED; -} - #endif /* __ASM_XSTATE_H */ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |