aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-02-22 10:04:22 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-02-22 10:04:22 +0000
commitb0e6d9b53ad560c76de274ff5cb91dacac327012 (patch)
treeef460b7d8592c930d37f5bfaae01e74d6171f9a5
parent8a5761d2b7238cf4a15c79307307031757c9b38b (diff)
downloadxen-b0e6d9b53ad560c76de274ff5cb91dacac327012.tar.gz
xen-b0e6d9b53ad560c76de274ff5cb91dacac327012.tar.bz2
xen-b0e6d9b53ad560c76de274ff5cb91dacac327012.zip
hvmloader: fix vgatype detecting issue
When graphics card is assigned to a guest as a secondary VGA, without gfx_passthru and emulated VGA is the primary VGA, hvmloader misreads gfx_passthru is specified if VGA device is found after the emulated VGA. This patch fix this issue. If emulated VGA is found, hvmloader preserves it and loads vgabios of the emulated VGA. Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
-rw-r--r--tools/firmware/hvmloader/hvmloader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c
index 6574a9baae..be0c3ffb98 100644
--- a/tools/firmware/hvmloader/hvmloader.c
+++ b/tools/firmware/hvmloader/hvmloader.c
@@ -210,11 +210,12 @@ static void pci_setup(void)
switch ( class )
{
case 0x0300:
+ /* If emulated VGA is found, preserve it as primary VGA. */
if ( (vendor_id == 0x1234) && (device_id == 0x1111) )
virtual_vga = VGA_std;
else if ( (vendor_id == 0x1013) && (device_id == 0xb8) )
virtual_vga = VGA_cirrus;
- else
+ else if ( virtual_vga == VGA_none )
virtual_vga = VGA_pt;
break;
case 0x0680: