Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: Use the x86-64 level for purgatory
@ 2025-04-17  8:31 Ross Lagerwall
  2025-04-22 10:23 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Lagerwall @ 2025-04-17  8:31 UTC (permalink / raw)
  To: kexec; +Cc: horms, Ross Lagerwall

The compiler may be configured by default to use a newer
microarchitecture level such as x86-64-v3. Set purgatory to compile
using the baseline x86-64 level since the environment isn't set up
correctly to use SSE and AVX instructions.  At the same time, be a bit
paranoid and add some additional flags to ensure that the compiler
doesn't use any such instructions.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 purgatory/arch/x86_64/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/purgatory/arch/x86_64/Makefile b/purgatory/arch/x86_64/Makefile
index b0e277a365b2..fd19229a2bf4 100644
--- a/purgatory/arch/x86_64/Makefile
+++ b/purgatory/arch/x86_64/Makefile
@@ -24,5 +24,5 @@ x86_64_PURGATORY_SRCS += purgatory/arch/i386/vga.c
 x86_64_PURGATORY_SRCS += purgatory/arch/i386/pic.c
 
 ifneq ($(SUBARCH),x32)
-x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
+x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large -march=x86-64 -mno-mmx -mno-sse -mno-sse2 -mno-avx
 endif
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86_64: Use the x86-64 level for purgatory
  2025-04-17  8:31 [PATCH] x86_64: Use the x86-64 level for purgatory Ross Lagerwall
@ 2025-04-22 10:23 ` Simon Horman
  2025-04-23 15:45   ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2025-04-22 10:23 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: kexec

On Thu, Apr 17, 2025 at 09:31:40AM +0100, Ross Lagerwall wrote:
> The compiler may be configured by default to use a newer
> microarchitecture level such as x86-64-v3. Set purgatory to compile
> using the baseline x86-64 level since the environment isn't set up
> correctly to use SSE and AVX instructions.  At the same time, be a bit
> paranoid and add some additional flags to ensure that the compiler
> doesn't use any such instructions.
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Thanks Ross, applied for inclusion in v2.0.32.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86_64: Use the x86-64 level for purgatory
  2025-04-22 10:23 ` Simon Horman
@ 2025-04-23 15:45   ` Simon Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-04-23 15:45 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: kexec

On Tue, Apr 22, 2025 at 11:23:25AM +0100, Simon Horman wrote:
> On Thu, Apr 17, 2025 at 09:31:40AM +0100, Ross Lagerwall wrote:
> > The compiler may be configured by default to use a newer
> > microarchitecture level such as x86-64-v3. Set purgatory to compile
> > using the baseline x86-64 level since the environment isn't set up
> > correctly to use SSE and AVX instructions.  At the same time, be a bit
> > paranoid and add some additional flags to ensure that the compiler
> > doesn't use any such instructions.
> > 
> > Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> 
> Thanks Ross, applied for inclusion in v2.0.32.

Sorry, I forgot to add this yesterday (I am not a robot :).
The patch can be found at:

- x86_64: Use the x86-64 level for purgatory
  https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=14f48ea80e51



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-23 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17  8:31 [PATCH] x86_64: Use the x86-64 level for purgatory Ross Lagerwall
2025-04-22 10:23 ` Simon Horman
2025-04-23 15:45   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox