parent
f2be5db711
commit
b56a674cc5
@ -1 +1 @@
|
|||||||
f359d9a3af080f5d3293c847af5ab10f58639d85 SOURCES/criu-3.18.tar.gz
|
61ffc54bf7e345c9df2d20d599da47f0e91e70e2 SOURCES/criu-3.19.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
SOURCES/criu-3.18.tar.gz
|
SOURCES/criu-3.19.tar.gz
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
From d739260c57576c636759afb312340fa3827312f6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adrian Reber <areber@redhat.com>
|
|
||||||
Date: Mon, 24 Apr 2023 09:28:19 +0200
|
|
||||||
Subject: [PATCH] compel: support XSAVE on newer Intel CPUs
|
|
||||||
|
|
||||||
Newer Intel CPUs (Sapphire Rapids) have a much larger xsave area than
|
|
||||||
before. Looking at older CPUs I see 2440 bytes.
|
|
||||||
|
|
||||||
# cpuid -1 -l 0xd -s 0
|
|
||||||
...
|
|
||||||
bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
|
|
||||||
|
|
||||||
On newer CPUs (Sapphire Rapids) it grows to 11008 bytes.
|
|
||||||
|
|
||||||
# cpuid -1 -l 0xd -s 0
|
|
||||||
...
|
|
||||||
bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
|
|
||||||
|
|
||||||
This increase the xsave area from one page to four pages.
|
|
||||||
|
|
||||||
Without this patch the fpu03 test fails, with this patch it works again.
|
|
||||||
|
|
||||||
Signed-off-by: Adrian Reber <areber@redhat.com>
|
|
||||||
---
|
|
||||||
.../arch/x86/src/lib/include/uapi/asm/fpu.h | 28 +++++++++++++++++--
|
|
||||||
1 file changed, 26 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
|
||||||
index bd3b0cbd5c..8c83dd9ae4 100644
|
|
||||||
--- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
|
||||||
+++ b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
|
||||||
@@ -21,7 +21,28 @@
|
|
||||||
#define XSTATE_YMM 0x4
|
|
||||||
|
|
||||||
#define FXSAVE_SIZE 512
|
|
||||||
-#define XSAVE_SIZE 4096
|
|
||||||
+/*
|
|
||||||
+ * This used to be 4096 (one page). There is a comment below concerning
|
|
||||||
+ * this size:
|
|
||||||
+ * "One page should be enough for the whole xsave state ;-)"
|
|
||||||
+ * Which is kind of funny as it is no longer enough ;-)
|
|
||||||
+ *
|
|
||||||
+ * Older CPUs:
|
|
||||||
+ * # cpuid -1 -l 0xd -s 0
|
|
||||||
+ * ...
|
|
||||||
+ * bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
|
|
||||||
+ *
|
|
||||||
+ * Newer CPUs (Sapphire Rapids):
|
|
||||||
+ * # cpuid -1 -l 0xd -s 0
|
|
||||||
+ * ...
|
|
||||||
+ * bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
|
|
||||||
+ *
|
|
||||||
+ * So one page is no longer enough... But:
|
|
||||||
+ *
|
|
||||||
+ * Four pages should be enough for the whole xsave state ;-)
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#define XSAVE_SIZE 4*4096
|
|
||||||
|
|
||||||
#define XSAVE_HDR_SIZE 64
|
|
||||||
#define XSAVE_HDR_OFFSET FXSAVE_SIZE
|
|
||||||
@@ -235,8 +256,11 @@ struct pkru_state {
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* One page should be enough for the whole xsave state ;-)
|
|
||||||
+ *
|
|
||||||
+ * Of course it was not ;-) Now using four pages...
|
|
||||||
+ *
|
|
||||||
*/
|
|
||||||
-#define EXTENDED_STATE_AREA_SIZE (4096 - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
|
|
||||||
+#define EXTENDED_STATE_AREA_SIZE (XSAVE_SIZE - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* cpu requires it to be 64 byte aligned
|
|
@ -1,30 +0,0 @@
|
|||||||
import os
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
print(find_packages('.'))
|
|
||||||
|
|
||||||
def get_version():
|
|
||||||
version = '0.0.1'
|
|
||||||
env = os.environ
|
|
||||||
if 'CRIU_VERSION_MAJOR' in env and 'CRIU_VERSION_MINOR' in env:
|
|
||||||
version = '{}.{}'.format(
|
|
||||||
env['CRIU_VERSION_MAJOR'],
|
|
||||||
env['CRIU_VERSION_MINOR']
|
|
||||||
)
|
|
||||||
if 'CRIU_VERSION_SUBLEVEL' in env and env['CRIU_VERSION_SUBLEVEL']:
|
|
||||||
version += '.' + env['CRIU_VERSION_SUBLEVEL']
|
|
||||||
return version
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='pycriu',
|
|
||||||
version=get_version(),
|
|
||||||
description='CRiu Image Tool',
|
|
||||||
author='CRIU team',
|
|
||||||
author_email='criu@openvz.org',
|
|
||||||
license='GPLv2',
|
|
||||||
url='https://github.com/checkpoint-restore/criu',
|
|
||||||
packages=['pycriu','pycriu.images'],
|
|
||||||
package_dir = {'pycriu': '.', 'pycriu.images':'images'}
|
|
||||||
|
|
||||||
)
|
|
Loading…
Reference in new issue