All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Andrew Lyon <andrew.lyon@gmail.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>
Subject: Re: stdvga + videoram config option
Date: Thu, 21 May 2009 13:00:13 +0100	[thread overview]
Message-ID: <4A15424D.1020507@eu.citrix.com> (raw)
In-Reply-To: <f4527be0905210421u36090382r499b90d3f29b082c@mail.gmail.com>

Andrew Lyon wrote:

> I just tried to use the stdvga and videoram options to create a hvm
> with 16mb video ram, but it fails to start due to qemu device model
> failure:



that's due to a stupid initial configuration check done by qemu that is
actually meaningless for us (at least on x86).

This patch should fix the problem, I kept the check in place only in
case it might be of some use for the ia64 people.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---

diff --git a/vl.c b/vl.c
index b5bb5cb..3506977 100644
--- a/vl.c
+++ b/vl.c
@@ -4801,7 +4801,6 @@ int main(int argc, char **argv, char **envp)
     machine = first_machine;
     cpu_model = NULL;
     initrd_filename = NULL;
-    ram_size = VGA_RAM_SIZE;
 #ifdef CONFIG_GDBSTUB
     use_gdbstub = 0;
     gdbstub_port = DEFAULT_GDBSTUB_PORT;
@@ -5654,13 +5653,6 @@ int main(int argc, char **argv, char **envp)
     }
 #endif
 
-#if defined (__ia64__)
-    if (ram_size > VGA_IO_START)
-        ram_size += VGA_IO_SIZE; /* skip VGA I/O hole */
-    if (ram_size > MMIO_START)
-        ram_size += 1 * MEM_G; /* skip 3G-4G MMIO, LEGACY_IO_SPACE etc. */
-#endif
-
     /* init the bluetooth world */
     for (i = 0; i < nb_bt_opts; i++)
         if (bt_parse(bt_opts[i]))
@@ -5677,6 +5669,14 @@ int main(int argc, char **argv, char **envp)
 
     phys_ram_size = (machine->ram_require + vga_ram_size) & ~RAMSIZE_FIXED;
 
+#if defined (__ia64__)
+    ram_size = vga_ram_size;
+    if (ram_size > VGA_IO_START)
+        ram_size += VGA_IO_SIZE; /* skip VGA I/O hole */
+    if (ram_size > MMIO_START)
+        ram_size += 1 * MEM_G; /* skip 3G-4G MMIO, LEGACY_IO_SPACE etc. */
+#endif
+
     if (machine->ram_require & RAMSIZE_FIXED) {
         if (ram_size > 0) {
             if (ram_size < phys_ram_size) {

  reply	other threads:[~2009-05-21 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 11:21 stdvga + videoram config option Andrew Lyon
2009-05-21 12:00 ` Stefano Stabellini [this message]
     [not found]   ` <18965.35475.926850.981452@mariner.uk.xensource.com>
2009-05-22  7:44     ` Andrew Lyon
2009-05-25  2:09 ` KUWAMURA Shin'ya
2009-06-05  5:29   ` KUWAMURA Shin'ya

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=4A15424D.1020507@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=andrew.lyon@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.