Re: [PATCH] x86: Don't use NOPL on 32-bit cpu's because not all systemssupport it.

From: H. Peter Anvin
Date: Tue Sep 16 2008 - 12:32:46 EST


This is a multi-part message in MIME format.David Sanders wrote:
From: David Sanders <linux@xxxxxxxxxxxxxx>

Currently in alternative.c NOPLs are introduced based on the synthetic
cpu feature X86_FEATURE_NOPL. However, some systems (like Virtual PC 2007)
appear to support it but then will not boot 50% of the time because of
the NOPLs (when paravirtualization support is built into kernel).
This patch standardizes the treatment of NOPL to be like
include/asm-x86/nops.h which only uses NOPLs on 64-bit processors.


Oh good grief.

VPC is apparently so broken that these instructions work *some* of the time, which may include the first time, but not later. That is an impressive level of cockup.

Given that, we should either just rip this code out, or detect VPC (how?). The latter option can be done post-.27, of course; if so, we should just force the bit off for now rather than doing it in the alternatives code. The only reason for doing the latter at all would be to mitigate the overhead of paravirt_ops and other dynamic patch sites.

It would also be the least impact for .27, I believe.

-hpa