From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0vVZ-0002Cl-8o for qemu-devel@nongnu.org; Fri, 14 Nov 2008 05:02:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0vVW-0002Ay-AN for qemu-devel@nongnu.org; Fri, 14 Nov 2008 05:02:32 -0500 Received: from [199.232.76.173] (port=47076 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0vVV-0002An-JV for qemu-devel@nongnu.org; Fri, 14 Nov 2008 05:02:29 -0500 Received: from mx2.redhat.com ([66.187.237.31]:39385) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0vVV-0002jh-13 for qemu-devel@nongnu.org; Fri, 14 Nov 2008 05:02:29 -0500 Message-ID: <491D4BC8.9090807@redhat.com> Date: Fri, 14 Nov 2008 11:58:32 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c References: <1226527840-14183-1-git-send-email-aliguori@us.ibm.com> <20081114040311.GN2055@shareable.org> In-Reply-To: <20081114040311.GN2055@shareable.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Carsten Otte , Anthony Liguori , kvm-devel , Hollis Blanchard , Paul Brook Jamie Lokier 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. > Also, an earlier thread pointed out that loops doing a lot of MMIO are > _slower_ with KVM than without - this manifested as very slow VGA > output for some guests. Having KVM pass control to TCG for short runs > of guest instructions which do MMIO, or other instructions which need > to be emulated, would accelerate KVM in this respect. > Since TCG is not smp-safe, this is very problematic for smp guests. You would have to stop virtualization on all vcpus and start tcg on all of them. Performance would plummet. There are ways of mitigating the high mmio cost with kvm. For framebuffers, one can allow kvm direct access. For other mmio, there's the 'coalesced mmio' support which allows mmio to be batched when this does not affect emulation accuracy and latency. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.