From: aliguori Date: Fri, 13 Mar 2009 18:11:21 +0000 (+0000) Subject: temporarily disable logging around pci config writes (Avi Kivity) X-Git-Tag: xen-3.4.0-rc2~1^2~20^2~5 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5389a9df5363a683ecf8b11fdfc2e6a657d5ad5d;p=qemu-xen-3.4-testing.git temporarily disable logging around pci config writes (Avi Kivity) A pci config write may remap the vga linear frame buffer, confusing the memory slot dirty logging logic. Fixed Windows with -vga std. Signed-off-by: Avi Kivity Sigend-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6854 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/hw/vga.c b/hw/vga.c index 98c2234f..044b3391 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2482,6 +2482,17 @@ int isa_vga_mm_init(uint8_t *vga_ram_base, return 0; } +static void pci_vga_write_config(PCIDevice *d, + uint32_t address, uint32_t val, int len) +{ + PCIVGAState *pvs = container_of(d, PCIVGAState, dev); + VGAState *s = &pvs->vga_state; + + vga_dirty_log_stop(s); + pci_default_write_config(d, address, val, len); + vga_dirty_log_start(s); +} + int pci_vga_init(PCIBus *bus, uint8_t *vga_ram_base, unsigned long vga_ram_offset, int vga_ram_size, unsigned long vga_bios_offset, int vga_bios_size) @@ -2492,7 +2503,7 @@ int pci_vga_init(PCIBus *bus, uint8_t *vga_ram_base, d = (PCIVGAState *)pci_register_device(bus, "VGA", sizeof(PCIVGAState), - -1, NULL, NULL); + -1, NULL, pci_vga_write_config); if (!d) return -1; s = &d->vga_state;