From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerhard Wiesinger Subject: Re: [Qemu-devel] Re: QEMU-KVM and video performance Date: Wed, 21 Apr 2010 21:08:58 +0200 (CEST) Message-ID: References: <4BCEBE5C.4020404@redhat.com> <20100421183357.GK27575@shareable.org> <20100421185322.GN27575@shareable.org> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Avi Kivity , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Jamie Lokier Return-path: Received: from chello084112167138.7.11.vie.surfer.at ([84.112.167.138]:43280 "EHLO wiesinger.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753692Ab0DUTKO (ORCPT ); Wed, 21 Apr 2010 15:10:14 -0400 In-Reply-To: <20100421185322.GN27575@shareable.org> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 21 Apr 2010, Jamie Lokier wrote: > Gerhard Wiesinger wrote: >>>> Would it be possible to handle these writes through QEMU directly >>>> (without >>>> KVM), because performance is there very well (looking at the code there >>>> is some pointer arithmetic and some memory write done)? >>> >>> I've noticed extremely slow VGA performance too, when installing OSes. >>> It makes the difference between installing in a few minutes, and >>> installing taking hours - just because of the slow VGA. >>> >>> So generally I use qemu for installing old versions of Windows, then >>> change to KVM to run them after installing. >>> >>> Switching between KVM and qemu automatically based on guest code >>> behaviour, and making both memory models and device models compatible >>> at run time, is a difficult thing. I guess it's not worth the >>> difficulty just to speed up VGA. >> >> I think this is very easy to distingish: >> 1.) VGA Segment A000 is legacy and should be handled through QEMU >> and not through KVM (because it is much more faster). Also 16 color modes >> should be fast enough there. >> 2.) All other flat PCI memory accesses should be handled through KVM >> (there is a specialized driver loaded for that PCI device in the non >> legacy OS). >> >> Is that easily possible? > > No it isn't. Distingushing addresses is trivial. You've ignored the > hard part, which is switching between different virtualisation > architectures... Hmmm. I'm very new to QEMU and KVM but at least accessing the virtual HW of QEMU even from KVM must be possible (e.g. memory and port accesses are done on nearly every virtual device) and therefore I'm ending in C code in the QEMU hw/*.c directory. Therefore also the VGA memory area should be able to be accessable from KVM but with the specialized and fast memory access of QEMU. Am I missing something? BTW: Still not clear why performance is low with KVM since there are no window changes in the testcase involved which could cause a (slow) page fault. Thnx. Ciao, Gerhard -- http://www.wiesinger.com/