All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Winkelbauer <andreas.winkelbauer@gmx.at>
To: Avi Kivity <avi@qumranet.com>, arne.brutschy@ulb.ac.be
Cc: kvm-devel@lists.sourceforge.net
Subject: [PATCH] fix widescreen resolution issues (v2)
Date: Fri, 22 Feb 2008 03:11:49 +0100	[thread overview]
Message-ID: <47BE2F65.1010903@gmx.at> (raw)

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

hi,

I found out what crashed kvm when I increased VGA_RAM_SIZE in pc.h. The 
crash was caused by a really _dirty_ hack in a kvm specific part of 
vga.c (it took me at least an hour to find this amazing piece of code... 
at least the "HACK ALERT" was a good hint ;-) ).

I've attached the patch. It works for me (tested with windows xp as 
guest os @ 1680x1050). As always, please test the patch. I'd highly 
appreciate it if somebody could test it with linux as guest os.

@Arne: Could you please test the patch with your setup? I hope it works 
this time...

cheers,
Andi

[-- Attachment #2: widescreen-fix.patch --]
[-- Type: text/x-patch, Size: 3041 bytes --]

--- kvm-61.orig/qemu/hw/vga.c	2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/qemu/hw/vga.c	2008-02-22 02:43:08.000000000 +0100
@@ -1438,7 +1438,7 @@
     long page0, page1, page_min, page_max;
     vga_draw_line_func *vga_draw_line;
     /* HACK ALERT */
-#define VGA_BITMAP_SIZE ((8*1024*1024) / 4096 / 8 / sizeof(long))
+#define VGA_BITMAP_SIZE ((VGA_RAM_SIZE) / 4096 / 8 / sizeof(long))
     unsigned long bitmap[VGA_BITMAP_SIZE];
 #ifndef TARGET_IA64
     int r;

--- kvm-61.orig/qemu/hw/vga_int.h	2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/qemu/hw/vga_int.h	2008-02-20 19:25:35.000000000 +0100
@@ -30,8 +30,8 @@
 /* bochs VBE support */
 #define CONFIG_BOCHS_VBE
 
-#define VBE_DISPI_MAX_XRES              1600
-#define VBE_DISPI_MAX_YRES              1200
+#define VBE_DISPI_MAX_XRES              2560
+#define VBE_DISPI_MAX_YRES              1600
 #define VBE_DISPI_MAX_BPP               32
 
 #define VBE_DISPI_INDEX_ID              0x0

--- kvm-61.orig/vgabios/vbetables-gen.c	2008-02-19 15:58:28.000000000 +0100
+++ kvm-61/vgabios/vbetables-gen.c	2008-02-20 19:22:48.000000000 +0100
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 8
+#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 16
 
 typedef struct {
     int width;
@@ -55,18 +55,27 @@
 { 1152, 864, 16                      , 0x14a},
 { 1152, 864, 24                      , 0x14b},
 { 1152, 864, 32                      , 0x14c},
-{ 1280, 800, 24                      , 0x178},
-{ 1280, 800, 32                      , 0x179},
-{ 1280, 960, 24                      , 0x180},
-{ 1280, 960, 32                      , 0x181},
-{ 1280, 960, 24                      , 0x182},
-{ 1280, 960, 32                      , 0x183},
-{ 1440, 900, 24                      , 0x184},
-{ 1440, 900, 32                      , 0x185},
-{ 1400, 1050, 24                     , 0x186},
-{ 1400, 1050, 32                     , 0x187},
-{ 1680, 1050, 24                     , 0x188},
-{ 1680, 1050, 32                     , 0x189},
+{ 1280, 800, 16                      , 0x178},
+{ 1280, 800, 24                      , 0x179},
+{ 1280, 800, 32                      , 0x17a},
+{ 1280, 960, 16                      , 0x17b},
+{ 1280, 960, 24                      , 0x17c},
+{ 1280, 960, 32                      , 0x17d},
+{ 1440, 900, 16                      , 0x17e},
+{ 1440, 900, 24                      , 0x17f},
+{ 1440, 900, 32                      , 0x180},
+{ 1400, 1050, 16                     , 0x181},
+{ 1400, 1050, 24                     , 0x182},
+{ 1400, 1050, 32                     , 0x183},
+{ 1680, 1050, 16                     , 0x184},
+{ 1680, 1050, 24                     , 0x185},
+{ 1680, 1050, 32                     , 0x186},
+{ 1920, 1200, 16                     , 0x187},
+{ 1920, 1200, 24                     , 0x188},
+{ 1920, 1200, 32                     , 0x189},
+{ 2560, 1600, 16                     , 0x18a},
+{ 2560, 1600, 24                     , 0x18b},
+{ 2560, 1600, 32                     , 0x18c},
 { 0, },
 };


[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

             reply	other threads:[~2008-02-22  2:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22  2:11 Andreas Winkelbauer [this message]
2008-02-22  3:39 ` [PATCH] fix widescreen resolution issues (v2) Leslie Mann
2008-02-22  7:45 ` Avi Kivity
2008-02-22  9:17 ` Arne Brutschy
2008-02-22 12:44   ` Andreas Winkelbauer
2008-02-22 12:55   ` Leslie Mann

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=47BE2F65.1010903@gmx.at \
    --to=andreas.winkelbauer@gmx.at \
    --cc=arne.brutschy@ulb.ac.be \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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.