Message ID | 1417945141-17204-1-git-send-email-namit@cs.technion.ac.il (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Applied, thanks. Paolo ----- Original Message ----- > From: "Nadav Amit" <namit@cs.technion.ac.il> > To: pbonzini@redhat.com > Cc: kvm@vger.kernel.org, "Nadav Amit" <namit@cs.technion.ac.il> > Sent: Sunday, December 7, 2014 10:39:01 AM > Subject: [PATCH kvm-unit-tests] x86: test_conforming_switch misses es initialization > > test_conforming_switch in the taskswitch2 tests, miss es initialization. > Fix it. > > Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> > --- > 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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");
test_conforming_switch in the taskswitch2 tests, miss es initialization. Fix it. Signed-off-by: Nadav Amit <namit@cs.technion.ac.il> --- x86/taskswitch2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)