From: mwilli2@equilibrium.research.intel-research.net Date: Thu, 6 May 2004 14:51:07 +0000 (+0000) Subject: bitkeeper revision 1.887.1.2 (409a50dbLW3CCQd-ZdsTiKjfkeHXCw) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~18221^2~3^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=df11d7ef03d478ba863bf91c082608021c7269cf;p=xen.git bitkeeper revision 1.887.1.2 (409a50dbLW3CCQd-ZdsTiKjfkeHXCw) Fix calculation of TSS offset on SMP systems when creating bounce frame. --- diff --git a/xen/arch/i386/entry.S b/xen/arch/i386/entry.S index 155ad23c4d..a0ca4b4e27 100644 --- a/xen/arch/i386/entry.S +++ b/xen/arch/i386/entry.S @@ -406,7 +406,11 @@ create_bounce_frame: jz 1f /* jump if returning to an existing ring-1 activation */ /* obtain ss/esp from TSS -- no current ring-1 activations */ movzwl PROCESSOR(%ebx),%eax - shll $8,%eax /* multiply by 256 */ + /* next 4 lines multiply %eax by 8320, which is sizeof(tss_struct) */ + movl %eax, %ecx + shll $7, %ecx + shll $13, %eax + addl %ecx,%eax addl $init_tss + 12,%eax movl (%eax),%esi /* tss->esp1 */ FAULT6: movl 4(%eax),%ds /* tss->ss1 */ diff --git a/xen/include/asm-i386/processor.h b/xen/include/asm-i386/processor.h index 2968e2e4e9..aa5048c6ec 100644 --- a/xen/include/asm-i386/processor.h +++ b/xen/include/asm-i386/processor.h @@ -375,7 +375,7 @@ struct tss_struct { unsigned short trace, bitmap; unsigned long io_bitmap[IO_BITMAP_SIZE+1]; /* - * pads the TSS to be cacheline-aligned (size is 0x100) + * pads the TSS to be cacheline-aligned (total size is 0x2080) */ unsigned long __cacheline_filler[5]; };