aboutsummaryrefslogtreecommitdiff
path: root/target-i386/helper.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-09-26 13:18:43 -0700
committerAnthony Liguori <aliguori@us.ibm.com>2012-10-01 08:04:22 -0500
commita9321a4d49d65d29c2926a51aedc5b91a01f3591 (patch)
tree5703f3f012c43f9edfabe2ff26d4b0047d7e8925 /target-i386/helper.h
parent4a19e505df659dd25a77fb790399744f3e1f971c (diff)
x86: Implement SMEP and SMAP
This patch implements Supervisor Mode Execution Prevention (SMEP) and Supervisor Mode Access Prevention (SMAP) for x86. The purpose of the patch, obviously, is to help kernel developers debug the support for those features. A fair bit of the code relates to the handling of CPUID features. The CPUID code probably would get greatly simplified if all the feature bit words were unified into a single vector object, but in the interest of producing a minimal patch for SMEP/SMAP, and because I had very limited time for this project, I followed the existing style. [ v2: don't change the definition of the qemu64 CPU shorthand, since that breaks loading old snapshots. Per Anthony Liguori this can be fixed once the CPU feature set is snapshot. Change the coding style slightly to conform to checkpatch.pl. ] Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-i386/helper.h')
-rw-r--r--target-i386/helper.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-i386/helper.h b/target-i386/helper.h
index ab6af638e6..93850ceecd 100644
--- a/target-i386/helper.h
+++ b/target-i386/helper.h
@@ -67,6 +67,8 @@ DEF_HELPER_3(raise_interrupt, void, env, int, int)
DEF_HELPER_2(raise_exception, void, env, int)
DEF_HELPER_1(cli, void, env)
DEF_HELPER_1(sti, void, env)
+DEF_HELPER_1(clac, void, env)
+DEF_HELPER_1(stac, void, env)
DEF_HELPER_1(set_inhibit_irq, void, env)
DEF_HELPER_1(reset_inhibit_irq, void, env)
DEF_HELPER_3(boundw, void, env, tl, int)