All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: use Linux-compatible names for sse4 cpuid features
@ 2013-05-24 14:33 George Dunlap
  2013-05-30  8:59 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: George Dunlap @ 2013-05-24 14:33 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell

Linux uses sse4_1 and sse4_2, but at the moment libxl uses '.' instead
of '_'.  This makes it confusing for people looking in Linux's /proc/cpuinfo
to disable features.

Add the Linux feature names, keeping the old ones for compatability.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Ian Campbell <ian.camppbell@citrix.com>
---
 docs/man/xl.cfg.pod.5     |    2 +-
 tools/libxl/libxl_cpuid.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index e0c3bb2..4c92721 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -808,7 +808,7 @@ cmplegacy cmpxchg16 cmpxchg8 cntxid dca de ds dscpl dtes64 est extapic f16c
 ffxsr fma4 fpu fxsr htt hypervisor ia64 ibs lahfsahf lm lwp mca mce misalignsse
 mmx mmxext monitor movbe msr mtrr nodeid nx osvw osxsave pae page1gb pat pbe
 pclmulqdq pdcm pge popcnt pse pse36 psn rdtscp skinit smx ss sse sse2 sse3
-sse4.1 sse4.2 sse4a ssse3 svm svm_decode svm_lbrv svm_npt svm_nrips
+sse4_1 sse4_2 sse4a ssse3 svm svm_decode svm_lbrv svm_npt svm_nrips
 svm_pausefilt svm_tscrate svm_vmcbclean syscall sysenter tbm tm tm2 topoext tsc
 vme vmx wdt x2apic xop xsave xtpr
 
diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c
index d17fdd6..e1c406c 100644
--- a/tools/libxl/libxl_cpuid.c
+++ b/tools/libxl/libxl_cpuid.c
@@ -99,8 +99,11 @@ int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str)
         {"popcnt",       0x00000001, NA, CPUID_REG_ECX, 23,  1},
         {"movbe",        0x00000001, NA, CPUID_REG_ECX, 22,  1},
         {"x2apic",       0x00000001, NA, CPUID_REG_ECX, 21,  1},
+        /* Linux uses sse4_{1,2}.  Keep sse4.{1,2} for compatibility */
         {"sse4.2",       0x00000001, NA, CPUID_REG_ECX, 20,  1},
+        {"sse4_2",       0x00000001, NA, CPUID_REG_ECX, 20,  1},
         {"sse4.1",       0x00000001, NA, CPUID_REG_ECX, 19,  1},
+        {"sse4_1",       0x00000001, NA, CPUID_REG_ECX, 19,  1},
         {"dca",          0x00000001, NA, CPUID_REG_ECX, 18,  1},
         {"pdcm",         0x00000001, NA, CPUID_REG_ECX, 15,  1},
         {"xtpr",         0x00000001, NA, CPUID_REG_ECX, 14,  1},
-- 
1.7.9.5

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

* Re: [PATCH] libxl: use Linux-compatible names for sse4 cpuid features
  2013-05-24 14:33 [PATCH] libxl: use Linux-compatible names for sse4 cpuid features George Dunlap
@ 2013-05-30  8:59 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2013-05-30  8:59 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Campbell, Ian Jackson, xen-devel

On Fri, 2013-05-24 at 15:33 +0100, George Dunlap wrote:
> Linux uses sse4_1 and sse4_2, but at the moment libxl uses '.' instead
> of '_'.  This makes it confusing for people looking in Linux's /proc/cpuinfo
> to disable features.
> 
> Add the Linux feature names, keeping the old ones for compatability.
> 
> Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Ian Campbell <ian.camppbell@citrix.com>

Acked + applied, thanks.

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

end of thread, other threads:[~2013-05-30  8:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-24 14:33 [PATCH] libxl: use Linux-compatible names for sse4 cpuid features George Dunlap
2013-05-30  8:59 ` Ian Campbell

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.