* The vkernel64 uses bcopy. The ucontext_t/mcontext_t reserves a 1024
byte space for the fpu area, but the savefpu structure only reserves
834 bytes. Increase the savefpu structure appropriately.
* Did not effect real 64-bit kernels because they used machine instructions
to save/restore the FP state and/or bcopy'd using the savefpu structure
sdize instead of the size of the fpu area in the ucontext/mcontext
structure.
* Fixes panics in vkernel64
Reported-by: tuxillo
struct save87 sv_87;
struct savexmm sv_xmm;
struct saveymm sv_ymm;
+ char sv_savearea[1024]; /* see mcontext_t */
};
/*
unsigned int mc_reserved;
unsigned int mc_unused[8];
- /* 64 byte aligned */
- int mc_fpregs[256]; /* 1024 bytes */
+ /*
+ * NOTE! 64-byte aligned as of here. Also must match savefpu
+ * structure.
+ */
+ int mc_fpregs[256];
} __attribute__((aligned(64)));
typedef struct __mcontext mcontext_t;
/*
* x86_64 process control block
+ *
+ * WARNING! union savefpu has a 64-byte alignment requirement built-in
+ * which will adjust the size of this structure.
*/
#include <machine/npx.h>