From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Brook Subject: Re: [Qemu-devel] Re: [questions] savevm|loadvm Date: Thu, 1 Apr 2010 12:20:09 +0000 Message-ID: <201004011320.10119.paul@codesourcery.com> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Juan Quintela , Wenhao Xu , kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: Received: from mail.codesourcery.com ([38.113.113.100]:38839 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755486Ab0DAMUO (ORCPT ); Thu, 1 Apr 2010 08:20:14 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: > Wenhao Xu wrote: > > Hi, Juan, > > I am fresh to both QEMU and KVM. But so far, I notice that QEMU > > uses "KVM_SET_USER_MEMORY_REGION" to set memory region that KVM can > > use and uses cpu_register_physical_memory_offset to register the same > > memory to QEMU emulator, which means QEMU and KVM use the same host > > virtual memory. And therefore the memory KVM modified could be > > directly reflected to QEMU. I don't quite understand the different > > memory layout problem between the two. So I don't know exactly what > > you mean to "fix" it? > > 1st. qemu-kvm.git and qemu.git memory layouts are different, indeed with > qemu.git kvm mode. (yes it is complex and weird). > > kvm vs qemu initialization is different. Expecting to stop kvm, and run > tcg from there is not going to work. I guess it would need a lot of > changes, but I haven't looked at it myself. FWIW I think this really *should* work, and any failure to do so is definitely a bug. Paul From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxJNf-00078G-Kt for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:20:15 -0400 Received: from [140.186.70.92] (port=58778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxJNe-00077b-90 for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:20:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxJNd-0004gt-7M for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:20:14 -0400 Received: from mx20.gnu.org ([199.232.41.8]:39524) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxJNd-0004gp-2y for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:20:13 -0400 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NxJNc-0000kD-9L for qemu-devel@nongnu.org; Thu, 01 Apr 2010 08:20:12 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: [questions] savevm|loadvm Date: Thu, 1 Apr 2010 12:20:09 +0000 References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004011320.10119.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Wenhao Xu , kvm@vger.kernel.org, Juan Quintela > Wenhao Xu wrote: > > Hi, Juan, > > I am fresh to both QEMU and KVM. But so far, I notice that QEMU > > uses "KVM_SET_USER_MEMORY_REGION" to set memory region that KVM can > > use and uses cpu_register_physical_memory_offset to register the same > > memory to QEMU emulator, which means QEMU and KVM use the same host > > virtual memory. And therefore the memory KVM modified could be > > directly reflected to QEMU. I don't quite understand the different > > memory layout problem between the two. So I don't know exactly what > > you mean to "fix" it? > > 1st. qemu-kvm.git and qemu.git memory layouts are different, indeed with > qemu.git kvm mode. (yes it is complex and weird). > > kvm vs qemu initialization is different. Expecting to stop kvm, and run > tcg from there is not going to work. I guess it would need a lot of > changes, but I haven't looked at it myself. FWIW I think this really *should* work, and any failure to do so is definitely a bug. Paul