criu icon indicating copy to clipboard operation
criu copied to clipboard

XSAVE_SIZE hardcoding could cause potential issues with AMX

Open karthik-intel opened this issue 3 years ago • 7 comments

Intel Advanced Matrix Extensions (Intel AMX) can cause the user state XSAVE components to exceed the hardcoded size of 4096 (https://software.intel.com/content/dam/develop/public/us/en/documents/architecture-instruction-set-extensions-programming-reference.pdf). Specifically, user state component 18, called XTILEDATA, has an architectural maximum size of 65535 bytes and an actual size of 8192 bytes in the first implementation. However, XSAVE_SIZE is defined to be 4096 in the CRIU source (https://github.com/checkpoint-restore/criu/blob/criu-dev/compel/arch/x86/src/lib/include/uapi/asm/fpu.h), which could cause potential problems in CPUs with AMX.

karthik-intel avatar Apr 21 '21 06:04 karthik-intel

@karthik-intel hi!

Thanks for your report. I've checked my CPU (8750H) looks like it hasn't these extensions. Do I understand correctly that these features available only on the 11th generation of Intel processors?

mihalicyn avatar Apr 21 '21 12:04 mihalicyn

@mihalicyn, thank you for the quick note! These extensions will be part of future processors (https://en.wikipedia.org/wiki/Alder_Lake_(microprocessor))

karthik-intel avatar Apr 21 '21 17:04 karthik-intel

Cc: @0x7f454c46 @cyrillos

avagin avatar Apr 21 '21 17:04 avagin

https://github.com/checkpoint-restore/criu/commit/2fdc09499d9df9c9e61d53cf0c121e3338538a8f#diff-53c8fb3b0e70ae163cfa6b9e86a4ac4ce339d505b99bfbb764a93cb425e4b8e6R235 (patches are welcome)

0x7f454c46 avatar Apr 21 '21 17:04 0x7f454c46

Yes, new CPUs will require a way bigger frame up to 2M iirc so someone has to implement the support of new models.

cyrillos avatar Apr 21 '21 17:04 cyrillos

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar May 22 '21 00:05 github-actions[bot]

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Jun 27 '21 00:06 github-actions[bot]