Projects STRLCPY criu Commits 4930c980
🤬
  • x86/xsave: Set only used XFEATURE_* in xstate_bv

    Setting all supported by CPU features in xstate_bv may bring it into
    dirty-upper-state as documented in specs, resulting in lower
    performance. Let's not do this and set only those have been used by
    dumpee.
    
    P.S.
    Off course it has to be a one-liner!
    
    Fixes: #1171
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading...
  • Dmitry Safonov committed with Andrei Vagin 1 year ago
    4930c980
    1 parent 3f8e3220
  • ■ ■ ■ ■
    criu/arch/x86/crtools.c
    skipped 432 lines
    433 433  #define assign_array(dst, src, e) memcpy(dst.e, (src)->e, sizeof(dst.e))
    434 434  #define assign_xsave(feature, xsave, member, area) \
    435 435   do { \
    436  - if (compel_fpu_has_feature(feature)) { \
     436 + if (compel_fpu_has_feature(feature) && (xsave->xstate_bv & (1UL << feature))) { \
    437 437   uint32_t off = compel_fpu_feature_offset(feature); \
    438 438   void *to = &area[off]; \
    439 439   void *from = xsave->member; \
    skipped 211 lines
Please wait...
Page is in error, reload to recover