]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen-traditional.git/commitdiff
cirrus_vga: default all I/O port reads to 0xff
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 4 Nov 2014 11:39:43 +0000 (11:39 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Oct 2015 15:52:05 +0000 (16:52 +0100)
Some error paths in vga_ioport_read() would return undefined values.
Always default the result to 0xff.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
hw/cirrus_vga.c

index a26b0517298bad202c5d7ef5f126e7baeeea7c37..11ce212d4846f9bf81a49c3e385f0dc2291efdd1 100644 (file)
@@ -2674,7 +2674,7 @@ static void cirrus_update_memory_access(CirrusVGAState *s)
 static uint32_t vga_ioport_read(void *opaque, uint32_t addr)
 {
     CirrusVGAState *s = opaque;
-    int val, index;
+    int val = 0xff, index;
 
     /* check port range access depending on color/monochrome mode */
     if ((addr >= 0x3b0 && addr <= 0x3bf && (s->msr & MSR_COLOR_EMULATION))