From: "Stephen C. Tweedie" Subject: RE: [Patch] Fix for x86_64 boot failures due to badsegment setup for protected mode. Date: Fri, 10 Nov 2006 16:09:01 +0000 Message-ID: <1163174941.8376.31.camel@sisko.scot.redhat.com> References: <391BF3CDD2DC0848B40ACB72FA97AD596CE372@pdsmsx413.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <391BF3CDD2DC0848B40ACB72FA97AD596CE372@pdsmsx413.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jiang, Yunhong" Cc: Wilfred Yu , Xiaohui Xin , "xen-devel@lists.xensource.com" , Herbert Xu , Susie Li , Steven Rostedt , "Li, Xin B" , Keir Fraser List-Id: xen-devel@lists.xenproject.org Hi, On Fri, 2006-11-10 at 22:39 +0800, Jiang, Yunhong wrote: > This patch caused one problem. > > If the guest change the DS/SS etc between it set cr0.PE and the jump instruction. Hmm... Do you know how much of a problem that causes in practice? Which guests have that behaviour? > Considering following code: > mov eax, cr0 > or eax, 0x11 > mov cr0, eax ---> here enable PE, and old_ctx.ds is cleard > mov ax, 0x0020 > mov ds, ax -> changes the DS here Well, we've got commit log comments for the "pop %es" case: 2) In current vmxassist, when entering VM86_PROTECTED_TO_REAL, we need to decode every instruction manually until we catch instructions like jmpl to reset cs to really return to real mode. So I'm afraid I just assumed that we wouldn't need to deal with ds in real life, since we haven't added emulation for that so far. Is that emulation we need to add as a matter of some urgency, then? --Stephen