From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [Patch] Fix for x86_64 boot failures due tobadsegment setup for protected mode. Date: Fri, 10 Nov 2006 17:32:59 -0500 Message-ID: <4554FE1B.8080408@redhat.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090008090309070904080408" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "Yu, Wilfred" , "Xin, Xiaohui" , xen-devel@lists.xensource.com, "Li, Susie" , "Jiang, Yunhong" , "Li, Xin B" , Herbert Xu List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------090008090309070904080408 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Keir Fraser wrote: > I have a patch I'll check in. It'd be good get some testing of it. > > Changeset is 12365:ca75b51d69c7 > > -- Keir > Keir, I was playing with Plan9 which happens to also tinker with ss, fs, and gs in this critical section. It still crashes pretty early, but it crashes earlier without this patch. This patch lets Plan9 crash at the same location before the original patch Stephen Tweedie sent :}. This patch makes the mov_to_seg more complete. I left out cs, since I don't think that would even make sense with a mov. -- Steve Signed-off-by: Steven Rostedt --------------090008090309070904080408 Content-Type: text/x-patch; name="xen-vmxassist-more-segs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-vmxassist-more-segs.patch" diff -r ca75b51d69c7 tools/firmware/vmxassist/vm86.c --- a/tools/firmware/vmxassist/vm86.c Fri Nov 10 17:21:54 2006 +0000 +++ b/tools/firmware/vmxassist/vm86.c Fri Nov 10 17:28:02 2006 -0500 @@ -829,15 +829,33 @@ mov_to_seg(struct regs *regs, unsigned p goto fail; switch ((modrm & 0x38) >> 3) { + case 0: /* es */ + regs->ves = getreg16(regs, modrm); + saved_rm_regs.ves = 0; + oldctx.es_sel = regs->ves; + return 1; + + /* case 1: cs */ + + case 2: /* ss */ + regs->uss = getreg16(regs, modrm); + saved_rm_regs.uss = 0; + oldctx.ss_sel = regs->uss; + return 1; case 3: /* ds */ regs->vds = getreg16(regs, modrm); saved_rm_regs.vds = 0; oldctx.ds_sel = regs->vds; return 1; - case 0: /* es */ - regs->ves = getreg16(regs, modrm); - saved_rm_regs.ves = 0; - oldctx.es_sel = regs->ves; + case 4: /* fs */ + regs->vfs = getreg16(regs, modrm); + saved_rm_regs.vfs = 0; + oldctx.fs_sel = regs->vfs; + return 1; + case 5: /* gs */ + regs->vgs = getreg16(regs, modrm); + saved_rm_regs.vgs = 0; + oldctx.gs_sel = regs->vgs; return 1; } --------------090008090309070904080408 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------090008090309070904080408--