From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/4] qxl: simplify qxl_rom_size
Date: Thu, 19 Sep 2013 11:38:52 +0200 [thread overview]
Message-ID: <1379583534-7831-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1379583534-7831-1-git-send-email-kraxel@redhat.com>
Nowdays rom size is fixed at 8192 for live migration compat reasons.
So we can ditch the pointless math trying to calculate the size needed.
Also make the size sanity check fail at compile time not runtime.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/qxl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index f0bfd2c..bcbf97a 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -313,9 +313,7 @@ static ram_addr_t qxl_rom_size(void)
sizeof(qxl_modes);
uint32_t rom_size = 8192; /* two pages */
- required_rom_size = MAX(required_rom_size, TARGET_PAGE_SIZE);
- required_rom_size = msb_mask(required_rom_size * 2 - 1);
- assert(required_rom_size <= rom_size);
+ QEMU_BUILD_BUG_ON(required_rom_size > rom_size);
return rom_size;
}
--
1.8.3.1
next prev parent reply other threads:[~2013-09-19 9:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 9:38 [Qemu-devel] [PULL 0/4] spice patch queue Gerd Hoffmann
2013-09-19 9:38 ` [Qemu-devel] [PATCH 1/4] qxl: define qxl operating on 4k pages Gerd Hoffmann
2013-09-19 9:38 ` Gerd Hoffmann [this message]
2013-09-19 9:38 ` [Qemu-devel] [PATCH 3/4] qxl: simplify page dirtying Gerd Hoffmann
2013-09-19 9:38 ` [Qemu-devel] [PATCH 4/4] qxl: compile only once Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2013-09-11 11:33 [Qemu-devel] [PATCH 1/4] qxl: define qxl operating on 4k pages Gerd Hoffmann
2013-09-11 11:33 ` [Qemu-devel] [PATCH 2/4] qxl: simplify qxl_rom_size Gerd Hoffmann
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=1379583534-7831-3-git-send-email-kraxel@redhat.com \
--to=kraxel@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).