summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-09-15 08:58:43 +0100
committerRichard Lowe <richlowe@richlowe.net>2011-09-15 08:58:43 +0100
commit70dc7639cedb77623859b80d3b9e9b266e89c15f (patch)
tree3cb46df244bd6066a14a52269bbd2038355e192e
parent4c943354ea4dfb1e1ff780a1fcd1e862b78b6e8c (diff)
downloadillumos-joyent-70dc7639cedb77623859b80d3b9e9b266e89c15f.tar.gz
1518 dis should support AMD SVM/AMD-V/Pacifica instructions
Reviewed by: Garrett D'Amore <garrett@nexenta.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Garrett D'Amore <garrett@nexenta.com>
-rw-r--r--usr/src/common/dis/i386/dis_tables.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/usr/src/common/dis/i386/dis_tables.c b/usr/src/common/dis/i386/dis_tables.c
index 9c6cc6268c..26067a0fc5 100644
--- a/usr/src/common/dis/i386/dis_tables.c
+++ b/usr/src/common/dis/i386/dis_tables.c
@@ -230,7 +230,8 @@ enum {
VEX_RRM, /* VEX VEX.vvvv, mod_reg -> mod_rm */
VEX_RMX, /* VEX VEX.vvvv, mod_rm -> mod_reg */
VMx, /* vmcall/vmlaunch/vmresume/vmxoff */
- VMxo /* VMx instruction with optional prefix */
+ VMxo, /* VMx instruction with optional prefix */
+ SVM /* AMD SVM instructions */
};
/*
@@ -498,7 +499,7 @@ const instable_t dis_op0F00[8] = {
*/
const instable_t dis_op0F01[8] = {
-/* [0] */ TNSZ("sgdt",VMx,6), TNSZ("sidt",MONITOR_MWAIT,6), TNSZ("lgdt",XGETBV_XSETBV,6), TNSZ("lidt",MO,6),
+/* [0] */ TNSZ("sgdt",VMx,6), TNSZ("sidt",MONITOR_MWAIT,6), TNSZ("lgdt",XGETBV_XSETBV,6), TNSZ("lidt",SVM,6),
/* [4] */ TNSZ("smsw",M,2), INVALID, TNSZ("lmsw",M,2), TNS("invlpg",SWAPGS),
};
@@ -3550,6 +3551,44 @@ just_mem:
break;
}
/*FALLTHROUGH*/
+ case SVM:
+ if (mode == 3) {
+#if DIS_TEXT
+ char *vinstr;
+
+ switch (r_m) {
+ case 0:
+ vinstr = "vmrun";
+ break;
+ case 1:
+ vinstr = "vmmcall";
+ break;
+ case 2:
+ vinstr = "vmload";
+ break;
+ case 3:
+ vinstr = "vmsave";
+ break;
+ case 4:
+ vinstr = "stgi";
+ break;
+ case 5:
+ vinstr = "clgi";
+ break;
+ case 6:
+ vinstr = "skinit";
+ break;
+ case 7:
+ vinstr = "invlpga";
+ break;
+ }
+
+ (void) strncpy(x->d86_mnem, vinstr, OPLEN);
+#endif
+ NOMEM;
+ break;
+ }
+ /*FALLTHROUGH*/
case MONITOR_MWAIT:
if (mode == 3) {
if (r_m == 0) {