From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] [PATCH 1/4] exec: round up size on MR resize
Date: Tue, 17 Feb 2015 11:05:36 +0100 [thread overview]
Message-ID: <1424167517-21866-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1424167517-21866-1-git-send-email-mst@redhat.com>
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 <mst@redhat.com>
---
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;
}
--
MST
next prev parent reply other threads:[~2015-02-17 10:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 10:05 [Qemu-devel] [PATCH 0/4] acpi: fix RSDP and linker memory management Michael S. Tsirkin
2015-02-17 10:05 ` Michael S. Tsirkin [this message]
2015-02-17 13:45 ` [Qemu-devel] [PATCH 1/4] exec: round up size on MR resize Igor Mammedov
2015-02-17 14:12 ` Paolo Bonzini
2015-02-17 10:05 ` [Qemu-devel] [PATCH 2/4] acpi-build: fix ACPI RAM management Michael S. Tsirkin
2015-02-17 13:52 ` Igor Mammedov
2015-02-17 18:58 ` Michael S. Tsirkin
2015-02-17 10:05 ` [Qemu-devel] [PATCH 3/4] acpi: has_immutable_rsdp->!rsdp_in_ram Michael S. Tsirkin
2015-02-17 13:55 ` Igor Mammedov
2015-02-17 10:05 ` [Qemu-devel] [PATCH 4/4] acpi-build: simplify rsdp management for legacy Michael S. Tsirkin
2015-02-17 14:16 ` Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424167517-21866-2-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).