test_conforming_switch in the taskswitch2 tests, miss es initialization.
Fix it.

Signed-off-by: Nadav Amit <[email protected]>
---
 x86/taskswitch2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x86/taskswitch2.c b/x86/taskswitch2.c
index f55843c..db3e41a 100644
--- a/x86/taskswitch2.c
+++ b/x86/taskswitch2.c
@@ -271,7 +271,8 @@ void test_conforming_switch(void)
 
        tss_intr.cs = CONFORM_CS_SEL | 3;
        tss_intr.eip = (u32)user_tss;
-       tss_intr.ds = tss_intr.gs = tss_intr.fs = tss_intr.ss = USER_DS;
+       tss_intr.ss = USER_DS;
+       tss_intr.ds = tss_intr.gs = tss_intr.es = tss_intr.fs = tss_intr.ss;
        tss_intr.eflags |= 3 << IOPL_SHIFT;
        set_gdt_entry(CONFORM_CS_SEL, 0, 0xffffffff, 0x9f, 0xc0);
        asm volatile("lcall $" xstr(TSS_INTR) ", $0xf4f4f4f4");
-- 
1.9.1

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

Reply via email to