xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xc_cpuid_x86.c: Remove the condition for masking NX in vendor specific functions
@ 2014-09-05 18:01 Zhuo Song
  0 siblings, 0 replies; 2+ messages in thread
From: Zhuo Song @ 2014-09-05 18:01 UTC (permalink / raw)
  To: xen-devel
  Cc: ian.campbell, stefano.stabellini, jinsong.liu, ian.jackson,
	Zhuo Song, Zhuo Song, boyu.mt, JBeulich

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [PATCH] xc_cpuid_x86.c: Remove the condition for masking NX in vendor specific functions
@ 2014-09-05 17:55 Zhuo Song
  0 siblings, 0 replies; 2+ messages in thread
From: Zhuo Song @ 2014-09-05 17:55 UTC (permalink / raw)
  To: xen-devel
  Cc: ian.campbell, stefano.stabellini, jinsong.liu, ian.jackson,
	boyu.mt, JBeulich

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)

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

end of thread, other threads:[~2014-09-05 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 18:01 [PATCH] xc_cpuid_x86.c: Remove the condition for masking NX in vendor specific functions Zhuo Song
  -- strict thread matches above, loose matches on Subject: below --
2014-09-05 17:55 Zhuo Song

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).