~ubuntu-branches/ubuntu/precise/qemu-kvm/precise

« back to all changes in this revision

Viewing changes to hw/vga-pci.c

  • Committer: Serge Hallyn
  • Date: 2011-10-19 07:37:43 UTC
  • mfrom: (1.2.7)
  • Revision ID: serge.hallyn@ubuntu.com-20111019073743-7i7n9irsxlm38wic
Tags: 0.15.0+noroms-0ubuntu1
* New upstream release
* Remaining changes from upstream:
  - removed all binary roms and tests/pi_10.com
* Removed Detect-and-use-GCC-atomic-builtins-for-locking.patch - non-NPTL
  implementations were removed with commit
  02615337ef295443daa03233e492194e289a807e
* Drop spice-qxl-locking-fix-for-qemu-kvm.patch - should be unnecessary
  as of commit 196a778428989217b82de042725dc8eb29c8f8d8
* drop patches applied upstream:
  - CVE-2011-1751.diff
  - virtio-guard-against-negative-vq-notifies-CVE-2011-2512.diff
  - CVE-2011-2527.patch
  - fix-pa-configure.patch
* Refreshed the remaining patches:
  - larger_default_ram_size.patch
  - CVE-2011-2212-virtqueue-indirect-overflow.patch
  - qemuifup-fix-paths.patch
  - vpc.patch
* e1000-Dont-set-the-Capabilities-List-bit.patch - switched to the
  cherrypicked upstream patch (as the source file changed quite a bit,
  and the hand-ported patch backported to 0.14.1 does not apply).
* Drop qemu-kvm-spice (all changes from 0.14.1+noroms-0ubuntu7), it will
  need its own source package (LP: #878162)

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    PCIVGAState *pvs = container_of(d, PCIVGAState, dev);
66
66
    VGACommonState *s = &pvs->vga;
67
67
 
68
 
    vga_dirty_log_stop(s);
69
68
    pci_default_write_config(d, address, val, len);
70
69
    if (s->map_addr && pvs->dev.io_regions[0].addr == -1)
71
70
        s->map_addr = 0;
72
 
    vga_dirty_log_start(s);
73
71
}
74
72
 
75
73
static int pci_vga_initfn(PCIDevice *dev)
76
74
{
77
75
     PCIVGAState *d = DO_UPCAST(PCIVGAState, dev, dev);
78
76
     VGACommonState *s = &d->vga;
79
 
     uint8_t *pci_conf = d->dev.config;
80
77
 
81
78
     // vga + console init
82
79
     vga_common_init(s, VGA_RAM_SIZE);
85
82
     s->ds = graphic_console_init(s->update, s->invalidate,
86
83
                                  s->screen_dump, s->text_update, s);
87
84
 
88
 
     // dummy VGA (same as Bochs ID)
89
 
     pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_QEMU);
90
 
     pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_QEMU_VGA);
91
 
     pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA);
92
 
 
93
85
     /* XXX: VGA_RAM_SIZE must be a power of two */
94
86
     pci_register_bar(&d->dev, 0, VGA_RAM_SIZE,
95
87
                      PCI_BASE_ADDRESS_MEM_PREFETCH, vga_map);
116
108
    .init         = pci_vga_initfn,
117
109
    .config_write = pci_vga_write_config,
118
110
    .romfile      = "vgabios-stdvga.bin",
 
111
 
 
112
    /* dummy VGA (same as Bochs ID) */
 
113
    .vendor_id    = PCI_VENDOR_ID_QEMU,
 
114
    .device_id    = PCI_DEVICE_ID_QEMU_VGA,
 
115
    .class_id     = PCI_CLASS_DISPLAY_VGA,
119
116
};
120
117
 
121
118
static void vga_register(void)