From c72f7585e9dc827d4b52a083b927ac5d1eea5c5e Mon Sep 17 00:00:00 2001 From: yaoxin Date: Sun, 22 Jun 2025 06:36:59 +0000 Subject: [PATCH] fix bug: INTEL XEON 4510's fpstates capacity size is over 2 pages --- qlib/kernel/arch/x86_64/arch_x86.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qlib/kernel/arch/x86_64/arch_x86.rs b/qlib/kernel/arch/x86_64/arch_x86.rs index 247487b5d..29f7a868c 100644 --- a/qlib/kernel/arch/x86_64/arch_x86.rs +++ b/qlib/kernel/arch/x86_64/arch_x86.rs @@ -123,7 +123,7 @@ pub const MXCSR_OFFSET: usize = 24; #[repr(C)] #[derive(Debug)] pub struct X86fpstate { - pub data: [u8; 4096], + pub data: [u8; 12288], pub size: AtomicUsize, } @@ -176,12 +176,12 @@ impl X86fpstate { fn New() -> Self { let (size, _align) = HostFeatureSet().ExtendedStateSize(); - if size > 4096 { - panic!("X86fpstate capacity size({}) > 4096", size); + if size > 12288 { + panic!("X86fpstate capacity size({}) > 4096 * 3 ", size); } return Self { - data: [0; 4096], + data: [0; 12288], size: AtomicUsize::new(size as usize), }; } @@ -252,8 +252,8 @@ impl X86fpstate { pub const fn Init() -> Self { return Self { - data: [0; 4096], - size: AtomicUsize::new(4096), + data: [0; 12288], + size: AtomicUsize::new(12288), }; }