qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH]: fix a nit in exec.c
@ 2008-08-22 13:56 Tristan Gingold
  2008-08-29 11:27 ` Laurent Desnogues
  0 siblings, 1 reply; 2+ messages in thread
From: Tristan Gingold @ 2008-08-22 13:56 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

Hi,

the parameter of page_find_alloc is a page index and not an address.

Tristan.

Signed-off-by: Tristan Gingold <gingold@adacore.com>

--- exec.c	(revision 5062)
+++ exec.c	(working copy)
@@ -286,7 +286,7 @@
  #if TARGET_LONG_BITS > 32
      /* Host memory outside guest VM.  For 32-bit targets we have  
already
         excluded high addresses.  */
-    if (index > ((target_ulong)L2_SIZE * L1_SIZE * TARGET_PAGE_SIZE))
+    if (index > ((target_ulong)L2_SIZE * L1_SIZE))
          return NULL;
  #endif
      lp = &l1_map[index >> L2_BITS];



[-- Attachment #2: qeexec.diff --]
[-- Type: application/octet-stream, Size: 483 bytes --]

Index: exec.c
===================================================================
--- exec.c	(revision 5062)
+++ exec.c	(working copy)
@@ -286,7 +286,7 @@
 #if TARGET_LONG_BITS > 32
     /* Host memory outside guest VM.  For 32-bit targets we have already
        excluded high addresses.  */
-    if (index > ((target_ulong)L2_SIZE * L1_SIZE * TARGET_PAGE_SIZE))
+    if (index > ((target_ulong)L2_SIZE * L1_SIZE))
         return NULL;
 #endif
     lp = &l1_map[index >> L2_BITS];

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH]: fix a nit in exec.c
  2008-08-22 13:56 [Qemu-devel] [PATCH]: fix a nit in exec.c Tristan Gingold
@ 2008-08-29 11:27 ` Laurent Desnogues
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Desnogues @ 2008-08-29 11:27 UTC (permalink / raw)
  To: qemu-devel

On Fri, Aug 22, 2008 at 3:56 PM, Tristan Gingold <gingold@adacore.com> wrote:
> Hi,
>
> the parameter of page_find_alloc is a page index and not an address.
>
> Tristan.
>
> Signed-off-by: Tristan Gingold <gingold@adacore.com>
>
> --- exec.c      (revision 5062)
> +++ exec.c      (working copy)
> @@ -286,7 +286,7 @@
>  #if TARGET_LONG_BITS > 32
>     /* Host memory outside guest VM.  For 32-bit targets we have already
>        excluded high addresses.  */
> -    if (index > ((target_ulong)L2_SIZE * L1_SIZE * TARGET_PAGE_SIZE))
> +    if (index > ((target_ulong)L2_SIZE * L1_SIZE))
>         return NULL;
>  #endif
>     lp = &l1_map[index >> L2_BITS];

This patch is correct and fixes the problem I spotted here:

http://lists.gnu.org/archive/html/qemu-devel/2008-08/msg00241.html

Is there any hope to see this committed?


Laurent

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-29 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-22 13:56 [Qemu-devel] [PATCH]: fix a nit in exec.c Tristan Gingold
2008-08-29 11:27 ` Laurent Desnogues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).