diff options
-rw-r--r-- | .hgtags | 2 | ||||
-rw-r--r-- | linux-2.6.10-xen-sparse/arch/xen/kernel/fixup.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/x86_32/seg_fixup.c | 35 |
3 files changed, 16 insertions, 23 deletions
@@ -1,7 +1,7 @@ 42882b3e0dda89f3a8ec00da568f86e9b3c230f1 RELEASE-2.0.0 475a162b66e2c19b1e9468b234a4ba705334905e RELEASE-2.0.1 dc2f08429f17e6614fd2f1ab88cc09ca0a850f32 RELEASE-2.0.2 -47043486577855efe8838fa23d8a18cd793ebff2 RELEASE-2.0.3 +82ba8bd1ceb2e03af769775fb8bc890dcab04f72 RELEASE-2.0.3 487b2ee37d1cecb5f3e7a546b05ad097a0226f2f beta1 3d330e41f41ce1bc118c02346e18949ad5d67f6b latest-semistable 30c521db4c71960b0cf1d9c9e1b658e77b535a3e latest-stable diff --git a/linux-2.6.10-xen-sparse/arch/xen/kernel/fixup.c b/linux-2.6.10-xen-sparse/arch/xen/kernel/fixup.c index c6a90449e3..98eb939816 100644 --- a/linux-2.6.10-xen-sparse/arch/xen/kernel/fixup.c +++ b/linux-2.6.10-xen-sparse/arch/xen/kernel/fixup.c @@ -36,7 +36,7 @@ #define DP(_f) printk(KERN_ALERT " " _f "\n") -asmlinkage void do_fixup_4gb_segment(struct pt_regs *regs, long error_code) +fastcall void do_fixup_4gb_segment(struct pt_regs *regs, long error_code) { static unsigned long printed = 0; int i; diff --git a/xen/arch/x86/x86_32/seg_fixup.c b/xen/arch/x86/x86_32/seg_fixup.c index 7036052e9a..6704597082 100644 --- a/xen/arch/x86/x86_32/seg_fixup.c +++ b/xen/arch/x86/x86_32/seg_fixup.c @@ -182,7 +182,7 @@ int fixup_seg(u16 seg, unsigned long offset) table = (unsigned long *)LDT_VIRT_START(d); if ( idx >= d->mm.ldt_ents ) { - DPRINTK("Segment %04x out of LDT range (%d)\n", + DPRINTK("Segment %04x out of LDT range (%ld)\n", seg, d->mm.ldt_ents); goto fail; } @@ -231,16 +231,9 @@ int fixup_seg(u16 seg, unsigned long offset) } else { - /* - * Expands-up: All the way to Xen space? Assume 4GB if so. - * NB: we compare offset with limit-15, instead of the "real" - * comparison of offset+15 (worst case) with limit, - * to avoid possible unsigned int overflow of offset+15. - * limit-15 will not underflow here because we don't allow expand-up - * segments with maxlimit. - */ + /* Expands-up: All the way to Xen space? Assume 4GB if so. */ if ( ((PAGE_OFFSET - (base + limit)) < PAGE_SIZE) && - ((offset) > (limit-15)) ) + (offset > limit) ) { /* Flip to expands-down. */ limit = -(base & PAGE_MASK); @@ -248,8 +241,8 @@ int fixup_seg(u16 seg, unsigned long offset) } } - DPRINTK("None of the above! (%08lx:%08lx, %d, %08lx, %08lx, %08lx)\n", - a, b, positive_access, base, limit, base+limit); + DPRINTK("None of the above! (%08lx:%08lx, %08lx, %08lx, %08lx)\n", + a, b, base, limit, base+limit); fail: return 0; @@ -312,7 +305,7 @@ int gpf_emulate_4gb(struct xen_regs *regs) if ( !linearise_address((u16)regs->cs, regs->eip, (unsigned long *)&eip) ) { - DPRINTK("Cannot linearise %04x:%08lx\n", regs->cs, regs->eip); + DPRINTK("Cannot linearise %04x:%08x\n", regs->cs, regs->eip); goto fail; } @@ -340,25 +333,25 @@ int gpf_emulate_4gb(struct xen_regs *regs) case 0xf0: /* LOCK */ case 0xf2: /* REPNE/REPNZ */ case 0xf3: /* REP/REPE/REPZ */ - continue; + break; case 0x2e: /* CS override */ pseg = ®s->cs; - continue; + break; case 0x3e: /* DS override */ pseg = ®s->ds; - continue; + break; case 0x26: /* ES override */ pseg = ®s->es; - continue; + break; case 0x64: /* FS override */ pseg = ®s->fs; - continue; + break; case 0x65: /* GS override */ pseg = ®s->gs; - continue; + break; case 0x36: /* SS override */ pseg = ®s->ss; - continue; + break; default: /* Not a prefix byte */ goto done_prefix; } @@ -489,7 +482,7 @@ int gpf_emulate_4gb(struct xen_regs *regs) fixme: DPRINTK("Undecodable instruction %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x " - "caused GPF(0) at %04x:%08lx\n", + "caused GPF(0) at %04x:%08x\n", eip[0], eip[1], eip[2], eip[3], eip[4], eip[5], eip[6], eip[7], regs->cs, regs->eip); |