From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2oe9-0008OE-UP for qemu-devel@nongnu.org; Wed, 19 Nov 2008 10:07:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2oe9-0008Nq-8o for qemu-devel@nongnu.org; Wed, 19 Nov 2008 10:07:13 -0500 Received: from [199.232.76.173] (port=55349 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2oe8-0008Ne-W6 for qemu-devel@nongnu.org; Wed, 19 Nov 2008 10:07:13 -0500 Received: from qb-out-1314.google.com ([72.14.204.174]:40101) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2oe7-0003G1-T3 for qemu-devel@nongnu.org; Wed, 19 Nov 2008 10:07:12 -0500 Received: by qb-out-1314.google.com with SMTP id e19so3508577qba.8 for ; Wed, 19 Nov 2008 07:07:11 -0800 (PST) Message-ID: <49242B9A.7090001@codemonkey.ws> Date: Wed, 19 Nov 2008 09:07:06 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/6] kvm: memory aliasing support for kvm References: <1227108377-8442-1-git-send-email-glommer@redhat.com> <1227108377-8442-2-git-send-email-glommer@redhat.com> In-Reply-To: <1227108377-8442-2-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Glauber Costa wrote: > We use information encoded in phys_offset to support memory > alias for kvm-all.c. Recall that for any given memory slot, > userspace_addr = phys_ram_base + phys_offset (without any flags). > > This way, we can detect whether or not the registered slot is > effectively pointing to the same area, regardless of the fact > that it has a different guest_phys_addr. > I think we've missed the abstraction here. If you added an arch hook for kvm_set_phys_mem(), then you could have hidden the alias stuff entirely within target-i386/x86.c But we can fix that up later. Regards, Anthony Liguori