Received: from [140.186.70.92] (port=56668 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFb7N-00021U-2K for qemu-devel@nongnu.org; Mon, 08 Nov 2010 18:27:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFb7K-0007HH-PH for qemu-devel@nongnu.org; Mon, 08 Nov 2010 18:27:16 -0500 Received: from mail-gx0-f173.google.com ([209.85.161.173]:44922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFb7K-0007Gn-Ll for qemu-devel@nongnu.org; Mon, 08 Nov 2010 18:27:14 -0500 Received: by gxk1 with SMTP id 1so3588260gxk.4 for ; Mon, 08 Nov 2010 15:27:13 -0800 (PST) Received: from [136.162.34.1] ([136.162.34.1]) by shadowfax.no-ip.com (Kerio Connect 7.0.2) for qemu-devel@nongnu.org; Mon, 8 Nov 2010 17:27:09 -0600 From: "Adnan Khaleel" Message-ID: <20101108232709.c98bf86f@shadowfax.no-ip.com> Date: Mon, 08 Nov 2010 17:27:09 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-----------7146ab7568829730cfe97fd8c37c9e3c" Subject: [Qemu-devel] Single 64bit memory transaction instead of two 32bit memory transaction. Reply-To: adnan@khaleel.us List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. -------------7146ab7568829730cfe97fd8c37c9e3c Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable In the file exec.c: The memory Write/Read functions are declared as an array of 4 entries wh= ere the index values of 0,1,2 correspond to 8,16 and 32bit write and rea= d functions respectively. CPUWriteMemoryFunc *io=5Fmem=5Fwrite[IO=5FMEM=5FNB=5FENTRIES][4]; CPUReadMemoryFunc *io=5Fmem=5Fread[IO=5FMEM=5FNB=5FENTRIES][4]; Is there any reason why we can't extend this to include 64bit writes and= read by increasing the array size=3F This is because 64bit reads are cu= rrently handled as two separate 32bit reads for eg: sommu=5Ftemplate.h static inline DATA=5FTYPE glue(io=5Fread, SUFFIX)(target=5Fphys=5Faddr= =5Ft physaddr, target=5Fulong addr, void *retaddr) { : res =3D io=5Fmem=5Fread[index][2](io=5Fmem=5Fopaque[index], physaddr= ); res |=3D (uint64=5Ft)io=5Fmem=5Fread[index][2](io=5Fmem=5Fopaque[ind= ex], physaddr + 4) << 32; : return res; } I'm sure this is happening in other places as well. Is there a reason fo= r this or could we arbitrarily increase this (within limits ofcourse)=3F Thanks AK -------------7146ab7568829730cfe97fd8c37c9e3c Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
In the file exec.c:

The memory W= rite/Read functions are declared as an array of 4 entries where the inde= x values of 0,1,2 correspond to 8,16 and 32bit write and read functions = respectively.

CPUWriteMemoryFunc *io=5Fmem=5Fwrite[IO=5FMEM=5FNB= =5FENTRIES][4];
CPUReadMemoryFunc *io=5Fmem=5Fread[IO=5FMEM=5FNB=5FEN= TRIES][4];

Is there any reason why we can't extend this to includ= e 64bit writes and read by increasing the array size=3F This is because = 64bit reads are currently handled as two separate 32bit reads for eg: so= mmu=5Ftemplate.h

static inline DATA=5FTYPE glue(io=5Fread, SUFFIX= )(target=5Fphys=5Faddr=5Ft physaddr,
     &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;    target=5Fulong addr,
    &= nbsp;           &= nbsp;           &= nbsp;           &= nbsp;     void *retaddr)
{
:
  &n= bsp; res =3D io=5Fmem=5Fread[index][2](io=5Fmem=5Fopaque[index], physadd= r);
    res |=3D (uint64=5Ft)io=5Fmem=5Fread[index][2]= (io=5Fmem=5Fopaque[index], physaddr + 4) << 32;
:
 &nbs= p;  return res;
}

I'm sure this is happening in other pla= ces as well. Is there a reason for this or could we arbitrarily increase= this (within limits ofcourse)=3F

Thanks

AK
-------------7146ab7568829730cfe97fd8c37c9e3c--