From: Zhuo Song <alfred.z.song@gmail.com>
To: xen-devel@lists.xen.org
Cc: ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
jinsong.liu@alibaba-inc.com, ian.jackson@eu.citrix.com,
boyu.mt@alibaba-inc.com, JBeulich@suse.com
Subject: [PATCH] xc_cpuid_x86.c: Remove the condition for masking NX in vendor specific functions
Date: Sat, 6 Sep 2014 01:55:22 +0800 [thread overview]
Message-ID: <1409939722-18671-1-git-send-email-alfred.z.song@gmail.com> (raw)
Since the architectural logic has help cover it, amd_xc_cpuid_policy
and intel_xc_cpuid_policy are unnecessary to do it redundantly.
Signed-off-by: Zhuo Song <songzhuo.sz@alibaba-inc.com>
---
tools/libxc/xc_cpuid_x86.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 6b81641..9add109 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -116,7 +116,7 @@ static void amd_xc_cpuid_policy(
bitmaskof(X86_FEATURE_TBM) |
bitmaskof(X86_FEATURE_DBEXT));
regs[3] &= (0x0183f3ff | /* features shared with 0x00000001:EDX */
- (is_pae ? bitmaskof(X86_FEATURE_NX) : 0) |
+ bitmaskof(X86_FEATURE_NX) |
(is_64bit ? bitmaskof(X86_FEATURE_LM) : 0) |
bitmaskof(X86_FEATURE_SYSCALL) |
bitmaskof(X86_FEATURE_MP) |
@@ -201,7 +201,7 @@ static void intel_xc_cpuid_policy(
regs[2] &= (is_64bit ? bitmaskof(X86_FEATURE_LAHF_LM) : 0) |
bitmaskof(X86_FEATURE_3DNOWPREFETCH) |
bitmaskof(X86_FEATURE_ABM);
- regs[3] &= ((is_pae ? bitmaskof(X86_FEATURE_NX) : 0) |
+ regs[3] &= (bitmaskof(X86_FEATURE_NX) |
(is_64bit ? bitmaskof(X86_FEATURE_LM) : 0) |
(is_64bit ? bitmaskof(X86_FEATURE_SYSCALL) : 0) |
(is_64bit ? bitmaskof(X86_FEATURE_RDTSCP) : 0));
--
1.8.5.2 (Apple Git-48)
next reply other threads:[~2014-09-05 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 17:55 Zhuo Song [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-05 18:01 [PATCH] xc_cpuid_x86.c: Remove the condition for masking NX in vendor specific functions Zhuo Song
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=1409939722-18671-1-git-send-email-alfred.z.song@gmail.com \
--to=alfred.z.song@gmail.com \
--cc=JBeulich@suse.com \
--cc=boyu.mt@alibaba-inc.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jinsong.liu@alibaba-inc.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).