On 04/07/2010 01:31 AM, Richard Simpson wrote:
2.6.27 should be plenty fine for nx. Really the important bit is that
the host kernel has nx enabled. Can you check if that is so?
Umm, could you give me a clue about how to do that. It is some time
since I configured the host kernel, but I do have a /proc/config.gz.
Could I check by looking in that?
The attached script should verify it.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
#!/usr/bin/python
class msr(object):
def __init__(self):
try:
self.f = file('/dev/cpu/0/msr')
except:
self.f = file('/dev/msr0')
def read(self, index, default = None):
import struct
self.f.seek(index)
try:
return struct.unpack('Q', self.f.read(8))[0]
except:
return default
efer = msr().read(0xc0000080, 0)
nx = (efer >> 11) & 1
if nx:
print 'nx: enabled'
else:
print 'nx: disabled'