Il 19/08/2014 15:34, Nadav Amit ha scritto:
> I know, but all the other ‘call' tests did. If there is an error, at
> least it should be consistent. ;-)

Right, let's fix it up:

diff --git a/x86/taskswitch2.c b/x86/taskswitch2.c
index fd9a404..3cfb467 100644
--- a/x86/taskswitch2.c
+++ b/x86/taskswitch2.c
@@ -190,7 +190,7 @@ void test_kernel_mode_int()

        /* test that calling a task by lcall works */
        test_count = 0;
-       set_intr_task_gate(0, irq_tss);
+       tss_intr.eip = (u32)irq_tss;
        printf("Calling task by lcall\n");
        /* hlt opcode is 0xf4 I use destination IP 0xf4f4f4f4 to catch
           incorrect instruction length calculation */
@@ -205,7 +205,7 @@ void test_kernel_mode_int()

        /* test that calling a task by ljmp works */
        test_count = 0;
-       set_intr_task_gate(0, jmp_tss);
+       tss_intr.eip = (u32)jmp_tss;
        printf("Jumping to a task by ljmp\n");
        asm volatile ("ljmp $" xstr(TSS_INTR) ", $0xf4f4f4f4");
        printf("Jump back succeeded\n");


Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to