xen/23516-cpuid-ERMS.patch
Charles Arnold 1b78387def - fate#309893: Add Xen support for AMD family 15h processors
- fate#309901: Add Xen support for SVM TSC scaling in AMD family 
  15h
- fate#311951: Ivy Bridge: XEN support for Supervisor Mode 
  Execution Protection (SMEP) 
  23437-amd-fam15-TSC-scaling.patch
  23462-libxc-cpu-feature.patch
  23481-x86-SMEP.patch
  23504-x86-SMEP-hvm.patch
  23505-x86-cpu-add-arg-check.patch
  23508-vmx-proc-based-ctls-probe.patch
  23510-hvm-cpuid-DRNG.patch
  23511-amd-fam15-no-flush-for-C3.patch
  23516-cpuid-ERMS.patch
  23538-hvm-pio-emul-no-host-crash.patch
  23539-hvm-cpuid-FSGSBASE.patch
  23543-x86_64-maddr_to_virt-assertion.patch
  23546-fucomip.patch

- Fix libxc reentrancy issues
  23383-libxc-rm-static-vars.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=128
2011-06-17 16:45:46 +00:00

68 lines
2.6 KiB
Diff

# HG changeset patch
# User Yang, Wei <wei.y.yang@intel.com>
# Date 1308053598 -3600
# Node ID f4a47275aebf383cf565e0a265a56a8c1110d45e
# Parent 337520d94cba906e64dbd3089d65cda8cf97d1d0
x86: Pass through ERMS CPUID feature for HVM and PV guests
This patch exposes ERMS feature to HVM and PV guests.
The REP MOVSB/STOSB instruction can enhance fast strings attempts to
move as much of the data with larger size load/stores as possible.
Signed-off-by: Yang, Wei <wei.y.yang@intel.com>
--- a/tools/libxc/xc_cpufeature.h
+++ b/tools/libxc/xc_cpufeature.h
@@ -126,5 +126,6 @@
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx) */
#define X86_FEATURE_FSGSBASE 0 /* {RD,WR}{FS,GS}BASE instructions */
#define X86_FEATURE_SMEP 7 /* Supervisor Mode Execution Protection */
+#define X86_FEATURE_ERMS 9 /* Enhanced REP MOVSB/STOSB */
#endif /* __LIBXC_CPUFEATURE_H */
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -303,7 +303,8 @@ static void xc_cpuid_hvm_policy(
case 0x00000007: /* Intel-defined CPU features */
if ( input[1] == 0 ) {
- regs[1] &= bitmaskof(X86_FEATURE_SMEP);
+ regs[1] &= (bitmaskof(X86_FEATURE_SMEP) |
+ bitmaskof(X86_FEATURE_ERMS));
} else
regs[1] = 0;
regs[0] = regs[2] = regs[3] = 0;
@@ -425,7 +426,8 @@ static void xc_cpuid_pv_policy(
case 7:
if ( input[1] == 0 )
- regs[1] &= bitmaskof(X86_FEATURE_FSGSBASE);
+ regs[1] &= (bitmaskof(X86_FEATURE_FSGSBASE) |
+ bitmaskof(X86_FEATURE_ERMS));
else
regs[1] = 0;
regs[0] = regs[2] = regs[3] = 0;
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -812,7 +812,8 @@ static void pv_cpuid(struct cpu_user_reg
break;
case 7:
if ( regs->ecx == 0 )
- b &= cpufeat_mask(X86_FEATURE_FSGSBASE);
+ b &= (cpufeat_mask(X86_FEATURE_FSGSBASE) |
+ cpufeat_mask(X86_FEATURE_ERMS));
else
b = 0;
a = c = d = 0;
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -144,6 +144,7 @@
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 7 */
#define X86_FEATURE_FSGSBASE (7*32+ 0) /* {RD,WR}{FS,GS}BASE instructions */
#define X86_FEATURE_SMEP (7*32+ 7) /* Supervisor Mode Execution Protection */
+#define X86_FEATURE_ERMS (7*32+ 9) /* Enhanced REP MOVSB/STOSB */
#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)