[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/5] hvmloader/tests: use .code64 in 64bit snippets
No functional change, but makes the code rather more legible. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Keir Fraser <keir@xxxxxxx> CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Tim Deegan <tim@xxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- tools/firmware/hvmloader/tests.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/firmware/hvmloader/tests.c b/tools/firmware/hvmloader/tests.c index 52772aa..37d16f8 100644 --- a/tools/firmware/hvmloader/tests.c +++ b/tools/firmware/hvmloader/tests.c @@ -170,12 +170,14 @@ static int shadow_gs_test(void) /* Push LRETQ stack frame. */ "pushl $0; pushl $"STR(SEL_CODE32)"; pushl $0; pushl $2f; " /* Jump to 64-bit mode. */ - "ljmp $"STR(SEL_CODE64)",$1f; 1: " + "ljmp $"STR(SEL_CODE64)",$1f; " + ".code64; 1: " /* Swap GS_BASE and SHADOW_GS_BASE */ - ".byte 0x0f,0x01,0xf8; " /* SWAPGS */ + "swapgs; " /* Jump to 32-bit mode. */ - ".byte 0x89, 0xe4; " /* MOV ESP,ESP */ - ".byte 0x48, 0xcb; 2: " /* LRETQ */ + "movl %%esp,%%esp; " + "lretq; " + ".code32; 2:" /* Read SHADOW_GS_BASE: should now contain 2 */ "mov $0xc0000102,%%ecx; rdmsr; mov %%eax,%%ebx; " /* CR0.PG=0 */ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |