qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c


From: Jamie Lokier
Subject: Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c
Date: Mon, 17 Nov 2008 03:57:29 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]