From: Avi Kivity <avi@redhat.com>
To: Richard Simpson <rs1002@huskydog.org.uk>
Cc: kvm@vger.kernel.org
Subject: Re: Setting nx bit in virtual CPU
Date: Wed, 07 Apr 2010 08:39:18 +0300 [thread overview]
Message-ID: <4BBC1A86.6080506@redhat.com> (raw)
In-Reply-To: <4BBBB63B.60007@huskydog.org.uk>
[-- Attachment #1: Type: text/plain, Size: 512 bytes --]
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.
[-- Attachment #2: check-nx --]
[-- Type: text/plain, Size: 497 bytes --]
#!/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'
next prev parent reply other threads:[~2010-04-07 5:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 22:16 Setting nx bit in virtual CPU Richard Simpson
2010-03-30 2:12 ` Chris Wright
2010-03-30 20:42 ` Richard Simpson
2010-04-01 8:43 ` Avi Kivity
2010-04-02 21:07 ` Richard Simpson
2010-04-05 8:27 ` Avi Kivity
2010-04-06 22:31 ` Richard Simpson
2010-04-07 5:39 ` Avi Kivity [this message]
2010-04-07 12:10 ` Richard Simpson
2010-04-07 12:23 ` Avi Kivity
2010-04-07 20:38 ` Richard Simpson
2010-04-07 20:48 ` Avi Kivity
2010-04-07 23:13 ` Richard Simpson
2010-04-08 7:23 ` Avi Kivity
2010-04-08 23:55 ` Richard Simpson
2010-04-10 19:34 ` Avi Kivity
2010-04-08 8:52 ` Andre Przywara
2010-04-08 21:23 ` Richard Simpson
2010-04-09 23:45 ` Andre Przywara
2010-04-12 21:15 ` Richard Simpson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BBC1A86.6080506@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=rs1002@huskydog.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.