From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH][RFC] Split non-TCG bits out of exec.c Date: Fri, 14 Nov 2008 11:58:32 +0200 Message-ID: <491D4BC8.9090807@redhat.com> References: <1226527840-14183-1-git-send-email-aliguori@us.ibm.com> <20081114040311.GN2055@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Carsten Otte , Anthony Liguori , Hollis Blanchard , kvm-devel , Paul Brook To: qemu-devel@nongnu.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:34737 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750877AbYKNKCa (ORCPT ); Fri, 14 Nov 2008 05:02:30 -0500 In-Reply-To: <20081114040311.GN2055@shareable.org> Sender: kvm-owner@vger.kernel.org List-ID: 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.