From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mlz8v-0003fU-2G for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:57:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mlz8q-0003eI-5C for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:57:56 -0400 Received: from [199.232.76.173] (port=47931 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mlz8p-0003eF-Sd for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:57:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17108) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mlz8p-00064O-6e for qemu-devel@nongnu.org; Fri, 11 Sep 2009 01:57:51 -0400 Date: Fri, 11 Sep 2009 11:27:21 +0530 From: Amit Shah Subject: Re: [Qemu-devel] why did qemu add the KVM ? Message-ID: <20090911055721.GD31399@amit-x200.redhat.com> References: <1838424.876271252597541773.JavaMail.coremail@app185.163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1838424.876271252597541773.JavaMail.coremail@app185.163.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: yuanzhu86 Cc: qemu-devel On (Thu) Sep 10 2009 [23:45:41], yuanzhu86 wrote: > there is a KVM.c in the target-i386 , > but why did QEMU have this program? > shall anyone tell me the fuction of KVM.c to the QEMU ? When a disk image is given to qemu, qemu converts instructions from the target architecture to the native architecture. This enables it to run, for example, ARM binaries on x86. However, when you want to execute x86 code on x86, the translations are not necessary. KVM is code that short-circuits those translations so that x86 binaries are run directly on the host x86 CPU. KVM is a kernel module that handles processor-specific state so that guests can run side by side normal processes. KVM.c in QEMU sources interfaces with the KVM kernel modules. Amit