diff --git a/hw/pass-through.c b/hw/pass-through.c index ecb3d6f..3381782 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -4258,11 +4258,23 @@ static int setup_vga_pt(void) goto out; } - /* Adjust the bios checksum */ + /* Validate the bios checksum */ for ( c = (char*)bios; c < ((char*)bios + bios_size); c++ ) checksum += *c; if ( checksum ) - bios[bios_size - 1] -= checksum; + { + if ( igd_passthru ) + { + bios[bios_size - 1] -= checksum; + PT_LOG("vga bios checksum is adjusted!\n"); + } + else + { + PT_LOG("vga bios checksum is invalid!\n"); + rc = -1; + goto out; + } + } cpu_physical_memory_rw(0xc0000, bios, bios_size, 1);