qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 8/9] arch_init: make is_zero_page accept size


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH 8/9] arch_init: make is_zero_page accept size
Date: Mon, 07 Oct 2013 11:15:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 24.09.2013 14:03, Juan Quintela wrote:
From: Isaku Yamahata <address@hidden>

Later is_zero_page will be used for non TARGET_PAGE_SIZE
range.
And rename it to is_zero_range as it isn't page size any more.

Signed-off-by: Isaku Yamahata <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
  arch_init.c | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch_init.c b/arch_init.c
index 18cd9a1..c72790f 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -150,10 +150,9 @@ int qemu_read_default_config_files(bool userconfig)
      return 0;
  }

-static inline bool is_zero_page(uint8_t *p)
+static inline bool is_zero_range(uint8_t *p, uint64_t size)
  {
-    return buffer_find_nonzero_offset(p, TARGET_PAGE_SIZE) ==
-        TARGET_PAGE_SIZE;
+    return buffer_find_nonzero_offset(p, size) == size;
  }

this is buffer_is_zero(p, size); maybe this function should be used.

Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]