All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxc: Expose the pdpe1gb cpuid flag to guest
@ 2014-11-17  5:16 Liang Li
  2014-11-17 15:39 ` Ian Jackson
  0 siblings, 1 reply; 18+ messages in thread
From: Liang Li @ 2014-11-17  5:16 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.liu2, ian.campbell, stefano.stabellini, Liang Li, ian.jackson,
	yang.z.zhang

If hardware support the pdpe1gb flag, expose it to guest by default.
Users don't have to use a 'cpuid= ' option in config file to turn
it on.

Signed-off-by: Liang Li <liang.z.li@intel.com>
---
 tools/libxc/xc_cpuid_x86.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index a18b1ff..c97f91a 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -109,6 +109,7 @@ static void amd_xc_cpuid_policy(
         regs[3] &= (0x0183f3ff | /* features shared with 0x00000001:EDX */
                     bitmaskof(X86_FEATURE_NX) |
                     bitmaskof(X86_FEATURE_LM) |
+                    bitmaskof(X86_FEATURE_PAGE1GB) |
                     bitmaskof(X86_FEATURE_SYSCALL) |
                     bitmaskof(X86_FEATURE_MP) |
                     bitmaskof(X86_FEATURE_MMXEXT) |
@@ -192,6 +193,7 @@ static void intel_xc_cpuid_policy(
                     bitmaskof(X86_FEATURE_ABM));
         regs[3] &= (bitmaskof(X86_FEATURE_NX) |
                     bitmaskof(X86_FEATURE_LM) |
+                    bitmaskof(X86_FEATURE_PAGE1GB) |
                     bitmaskof(X86_FEATURE_SYSCALL) |
                     bitmaskof(X86_FEATURE_RDTSCP));
         break;
@@ -386,6 +388,7 @@ static void xc_cpuid_hvm_policy(
             clear_bit(X86_FEATURE_LM, regs[3]);
             clear_bit(X86_FEATURE_NX, regs[3]);
             clear_bit(X86_FEATURE_PSE36, regs[3]);
+            clear_bit(X86_FEATURE_PAGE1GB, regs[3]);
         }
         break;
 
-- 
1.9.1

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

end of thread, other threads:[~2014-11-28  0:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17  5:16 [PATCH] libxc: Expose the pdpe1gb cpuid flag to guest Liang Li
2014-11-17 15:39 ` Ian Jackson
2014-11-17 16:24   ` Jan Beulich
2014-11-17 16:30     ` Tim Deegan
2014-11-17 16:40       ` Andrew Cooper
2014-11-17 17:00         ` Tim Deegan
2014-11-17 17:25           ` Andrew Cooper
2014-11-18 10:14             ` Tim Deegan
2014-11-18 10:43               ` Andrew Cooper
2014-11-18 11:41                 ` Zhang, Yang Z
2014-11-18 14:26                   ` Ian Campbell
2014-11-18 15:15                     ` Tim Deegan
2014-11-19  1:29                       ` Zhang, Yang Z
2014-11-19  9:54                         ` Tim Deegan
2014-11-25  1:47                           ` Zhang, Yang Z
2014-11-25  8:20                             ` Jan Beulich
2014-11-26  0:40                               ` Zhang, Yang Z
2014-11-28  0:34                                 ` Li, Liang Z

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.