* [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment
@ 2015-07-24 3:12 Chen Hanxiao
2015-07-28 8:11 ` Chen, Hanxiao
0 siblings, 1 reply; 3+ messages in thread
From: Chen Hanxiao @ 2015-07-24 3:12 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
Use ROUND_UP instead.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exec.c b/exec.c
index 7d60e15..bb16c50 100644
--- a/exec.c
+++ b/exec.c
@@ -1207,7 +1207,7 @@ static void *file_ram_alloc(RAMBlock *block,
unlink(filename);
g_free(filename);
- memory = (memory+hpagesize-1) & ~(hpagesize-1);
+ memory = ROUND_UP(memory, hpagesize);
/*
* ftruncate is not supported by hugetlbfs in older
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment
2015-07-24 3:12 [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment Chen Hanxiao
@ 2015-07-28 8:11 ` Chen, Hanxiao
2015-07-28 8:13 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Chen, Hanxiao @ 2015-07-28 8:11 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel@nongnu.org
> -----Original Message-----
> From: qemu-devel-bounces+chenhanxiao=cn.fujitsu.com@nongnu.org
> [mailto:qemu-devel-bounces+chenhanxiao=cn.fujitsu.com@nongnu.org] On Behalf Of
> Chen Hanxiao
> Sent: Friday, July 24, 2015 11:12 AM
> To: Paolo Bonzini
> Cc: qemu-devel@nongnu.org
> Subject: [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment
>
> Use ROUND_UP instead.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
> ---
> exec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/exec.c b/exec.c
> index 7d60e15..bb16c50 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1207,7 +1207,7 @@ static void *file_ram_alloc(RAMBlock *block,
> unlink(filename);
> g_free(filename);
>
> - memory = (memory+hpagesize-1) & ~(hpagesize-1);
> + memory = ROUND_UP(memory, hpagesize);
>
> /*
> * ftruncate is not supported by hugetlbfs in older
> --
> 2.1.0
>
ping
Regards,
- Chen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment
2015-07-28 8:11 ` Chen, Hanxiao
@ 2015-07-28 8:13 ` Paolo Bonzini
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-07-28 8:13 UTC (permalink / raw)
To: Chen, Hanxiao; +Cc: qemu-devel@nongnu.org
On 28/07/2015 10:11, Chen, Hanxiao wrote:
>
>> -----Original Message-----
>> From: qemu-devel-bounces+chenhanxiao=cn.fujitsu.com@nongnu.org
>> [mailto:qemu-devel-bounces+chenhanxiao=cn.fujitsu.com@nongnu.org] On Behalf Of
>> Chen Hanxiao
>> Sent: Friday, July 24, 2015 11:12 AM
>> To: Paolo Bonzini
>> Cc: qemu-devel@nongnu.org
>> Subject: [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment
>>
>> Use ROUND_UP instead.
>>
>> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
>> ---
>> exec.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/exec.c b/exec.c
>> index 7d60e15..bb16c50 100644
>> --- a/exec.c
>> +++ b/exec.c
>> @@ -1207,7 +1207,7 @@ static void *file_ram_alloc(RAMBlock *block,
>> unlink(filename);
>> g_free(filename);
>>
>> - memory = (memory+hpagesize-1) & ~(hpagesize-1);
>> + memory = ROUND_UP(memory, hpagesize);
>>
>> /*
>> * ftruncate is not supported by hugetlbfs in older
>> --
>> 2.1.0
>>
>
> ping
QEMU is in hard freeze. It's normal to wait a few days more for
non-bugfix patches. This one is okay, though.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-28 8:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-24 3:12 [Qemu-devel] [PATCH v2] exec: use macro ROUND_UP for alignment Chen Hanxiao
2015-07-28 8:11 ` Chen, Hanxiao
2015-07-28 8:13 ` Paolo Bonzini
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).