From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1vF6-0000OJ-F4 for qemu-devel@nongnu.org; Sun, 16 Nov 2008 22:57:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1vF3-0000O7-10 for qemu-devel@nongnu.org; Sun, 16 Nov 2008 22:57:39 -0500 Received: from [199.232.76.173] (port=32884 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1vF2-0000O4-Qn for qemu-devel@nongnu.org; Sun, 16 Nov 2008 22:57:36 -0500 Received: from mail2.shareable.org ([80.68.89.115]:44781) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1vF2-0002tO-J5 for qemu-devel@nongnu.org; Sun, 16 Nov 2008 22:57:36 -0500 Date: Mon, 17 Nov 2008 03:57:29 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c Message-ID: <20081117035728.GD13114@shareable.org> References: <1226527840-14183-1-git-send-email-aliguori@us.ibm.com> <20081114040311.GN2055@shareable.org> <491D4BC8.9090807@redhat.com> <20081114132335.GC11975@shareable.org> <49201B12.70406@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49201B12.70406@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Carsten Otte , Anthony Liguori , Hollis Blanchard , kvm-devel , qemu-devel@nongnu.org, Paul Brook Avi Kivity wrote: > >>>But does the fact KVM doesn't use TCG prevent KVM from running some > >>>x86 modes correctly? E.g. I gather 16-bit code is run by KVM using > >>>VM86 mode, which is not exactly correct. It would be nice to have KVM > >>>acceleration but also complete and correct emulation, by switching to > >>>TCG for those modes. > >>> > >>There is work in progress to make 16-bit emulation fully accurate. > > > >Ooh! I want my Windows 95 to run in KVM :-) > >I'm curious, how is this planned to work? > > > >I'm having trouble thinking of how to do it without software emulation > >at some stage. > > By emulating all instructions that can't be virtualized. Ah, I see (after much reading)... the idea is to finish the software emulator for real-mode instructions in the kernel, include floating point and 32-bit, and then to stop using VM86 altogether when emulating real-mode. VM86 might still be used to virtualize VM86 :-) Fortunately the set of instructions in real-mode is small (by x86 standards!), and listed in Intel's system architecture manual: "Instructions Supported in Real-Address Mode", plus x87 instructions and a few quasi-undocumented ones. Other instructions (MMX, SSE, etc.) cannot run in real mode, so a complete real-mode emulator is reasonably small. I was under the impression real-mode emulation needed to cover most of the x86 instruction set, which is large, but this is not required. Great! I'm looking forward to running Windows 95 and 3.11 under it :-) -- Jamie