qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/4] exec: round up size on MR resize


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 1/4] exec: round up size on MR resize
Date: Tue, 17 Feb 2015 14:45:04 +0100

On Tue, 17 Feb 2015 11:05:36 +0100
"Michael S. Tsirkin" <address@hidden> wrote:

> Block size must fundamentally be a multiple of target page size.
> Aligning automatically removes need to worry about the alignment
> from callers.
> 
> Note: the only caller of qemu_ram_resize (acpi) already happens to have
> size padded to a power of 2, but we would like to drop the padding in
> ACPI core, and don't want to expose target page size knowledge to ACPI.
> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>

> ---
>  exec.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/exec.c b/exec.c
> index 6b79ad1..2433406 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1298,6 +1298,8 @@ int qemu_ram_resize(ram_addr_t base, ram_addr_t 
> newsize, Error **errp)
>  
>      assert(block);
>  
> +    newsize = TARGET_PAGE_ALIGN(newsize);
> +
>      if (block->used_length == newsize) {
>          return 0;
>      }




reply via email to

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