On 06/25/2011 10:44 AM, Yang, Wei Y wrote:
+void set_cr4_smep(int smep)
+{
+unsigned long cr4 = read_cr4();
+
+cr4 = ~CR4_SMEP_MASK;
+if (smep)
+ cr4 |= CR4_SMEP_MASK;
+write_cr4(cr4);
+}
+
It can work if the box does not support SMEP?
It will report unhandled
This patch checks SMEP on prefetch pte path when
cr0.wp=1 and cr0.wp=0.
Signed-off-by: Yang, Wei wei.y.y...@intel.com
Signed-off-by: Li, Xin xin...@intel.com
Signed-off-by: Shan, Haitao haitao.s...@intel.com
---
x86/access.c | 92 ++--
On 06/24/2011 03:16 PM, Yang, Wei wrote:
+void set_cr4_smep(int smep)
+{
+unsigned long cr4 = read_cr4();
+
+cr4 = ~CR4_SMEP_MASK;
+if (smep)
+ cr4 |= CR4_SMEP_MASK;
+write_cr4(cr4);
+}
+
It can work if the box does not support SMEP?
void set_efer_nx(int nx)
{
+void set_cr4_smep(int smep)
+{
+unsigned long cr4 = read_cr4();
+
+cr4 = ~CR4_SMEP_MASK;
+if (smep)
+ cr4 |= CR4_SMEP_MASK;
+write_cr4(cr4);
+}
+
It can work if the box does not support SMEP?
It will report unhandled exception 13 in access.out which
we