From: Tim Deegan Subject: Re: Support real-mode in Xen? Date: Tue, 19 Jan 2010 14:40:20 +0000 Message-ID: <20100119144020.GF30054@whitby.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline 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: Jun Koi Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hi, At 14:23 +0000 on 19 Jan (1263910997), Jun Koi wrote: > I am wondering how Xen currently supports real mode? Is it what > explained in below old slides, or we already went another way? > > http://xen.org/files/summit_3/v2e-realmode-support-v2.pdf No, it's not done that way - to the best of my knowledge we don't use the CPU emulation in qemu-dm at all. AMD CPUs and very recent Intel CPUs support running in real-mode in non-root context, so don't need any special handling for realmode. On older Intel CPUs, when the guest is in real mode, it runs in virtual 8086 mode in non-root context. Instructions that can't be handled by virtual 8086 mode are emulated by Xen's built-in x86_emulate. (look for 'vmx_realmode' in xen/arch/x86/hvm/vmx/vmx.c) Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]