From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQJRJ-0001n2-2R for qemu-devel@nongnu.org; Wed, 19 Mar 2014 12:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQJRB-0002VF-6W for qemu-devel@nongnu.org; Wed, 19 Mar 2014 12:34:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQJRA-0002T8-Uo for qemu-devel@nongnu.org; Wed, 19 Mar 2014 12:33:53 -0400 Message-ID: <5329C6D1.7020904@redhat.com> Date: Wed, 19 Mar 2014 17:33:21 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1394801281-18997-1-git-send-email-james.hogan@imgtec.com> <1394801281-18997-5-git-send-email-james.hogan@imgtec.com> In-Reply-To: <1394801281-18997-5-git-send-email-james.hogan@imgtec.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 04/10] target-mips: get_physical_address: Add KVM awareness List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: James Hogan , qemu-devel@nongnu.org Cc: Sanjay Lal , Gleb Natapov , Aurelien Jarno , kvm@vger.kernel.org Il 14/03/2014 13:47, James Hogan ha scritto: > + if (kvm_enabled()) { > + /* KVM T&E adds guest kernel segments in useg */ > + if (real_address >= KVM_KSEG0_BASE) { > + if (real_address < KVM_KSEG2_BASE) { > + /* kseg0 */ > + address += KSEG0_BASE - KVM_KSEG0_BASE; > + } else if (real_address <= USEG_LIMIT) { > + /* kseg2/3 */ > + address += KSEG2_BASE - KVM_KSEG2_BASE; > + } > + } > + } Besides changing the segment bases, is there anything else to do to run KVM-enabled kernels under TCG? (I know nothing about MIPS and it shows). We should consider adding a knob to run them in TCG mode. This is not blocking this series, and I'm okay with helping or even doing the work, if somebody tells me what to do. :) Paolo