debuggers.hg
changeset 21006:845da68515d8
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>
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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Feb 22 10:04:22 2010 +0000 (2010-02-22) |
parents | 87f1e5b7660b |
children | 628600e0e3b4 |
files | tools/firmware/hvmloader/hvmloader.c |
line diff
1.1 --- a/tools/firmware/hvmloader/hvmloader.c Mon Feb 22 10:02:17 2010 +0000 1.2 +++ b/tools/firmware/hvmloader/hvmloader.c Mon Feb 22 10:04:22 2010 +0000 1.3 @@ -210,11 +210,12 @@ static void pci_setup(void) 1.4 switch ( class ) 1.5 { 1.6 case 0x0300: 1.7 + /* If emulated VGA is found, preserve it as primary VGA. */ 1.8 if ( (vendor_id == 0x1234) && (device_id == 0x1111) ) 1.9 virtual_vga = VGA_std; 1.10 else if ( (vendor_id == 0x1013) && (device_id == 0xb8) ) 1.11 virtual_vga = VGA_cirrus; 1.12 - else 1.13 + else if ( virtual_vga == VGA_none ) 1.14 virtual_vga = VGA_pt; 1.15 break; 1.16 case 0x0680: