From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrxkX-00045v-Mq for qemu-devel@nongnu.org; Mon, 20 Oct 2008 12:36:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrxkX-00045X-85 for qemu-devel@nongnu.org; Mon, 20 Oct 2008 12:36:57 -0400 Received: from [199.232.76.173] (port=48166 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrxkX-00045S-01 for qemu-devel@nongnu.org; Mon, 20 Oct 2008 12:36:57 -0400 Received: from yw-out-1718.google.com ([74.125.46.155]:3508) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KrxkX-0007WU-0i for qemu-devel@nongnu.org; Mon, 20 Oct 2008 12:36:57 -0400 Received: by yw-out-1718.google.com with SMTP id 6so279285ywa.82 for ; Mon, 20 Oct 2008 09:36:53 -0700 (PDT) Message-ID: Date: Mon, 20 Oct 2008 19:36:52 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH][RFC] Optimize ld[bwlq]_phys and st[bwlq]_phys In-Reply-To: <1224014348-13765-1-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1224014348-13765-1-git-send-email-aliguori@us.ibm.com> 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 Cc: Anthony Liguori On 10/14/08, Anthony Liguori wrote: > This patch optimizes the ld and st functions that operate on physical addresses. > Right now, a number of them default to cpu_phys_memory_{read,write} which is > very slow. As long as the operations are aligned, it is safe to just lookup > the page and directly read/write the data via ld_p or st_p. > > This patch introduces a common function since all of these functions are > roughly the same. I've tested x86 and sparc with Linux and Windows guests. > > I'm pretty confident that this new code is functionally equivalent but I wanted > to have someone else confirm this. Why there are special cases for lduw and stw? I'd add 'inline' to the common functions, otherwise looks OK.