X86: Implement the chks check of interrupt gate target code segments.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 13 Oct 2008 03:38:22 +0000 (20:38 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 13 Oct 2008 03:38:22 +0000 (20:38 -0700)
src/arch/x86/isa/microops/regop.isa

index 0d019729f1734b0779207d123593978d06ef0415..ba996060c79b808363022c47efe5a96db4e2b573 100644 (file)
@@ -1076,8 +1076,14 @@ let {{
                     break;
                 }
               case SegIntCSCheck:
-                panic("CS selector checks for interrupts and exceptions"
-                        "not implemented.\\n");
+                if (m5reg.mode == LongMode) {
+                    if (desc.l != 1 || desc.d != 0) {
+                        return new GeneralProtection(selector);
+                    }
+                } else {
+                    panic("Interrupt CS checks not implemented "
+                            "in legacy mode.\\n");
+                }
                 break;
               default:
                 panic("Undefined segment check type.\\n");