Revision f9aebe2e

b/hw/pci.c
140 140
    pci_update_irq_status(dev);
141 141
    /* Clear all writeable bits */
142 142
    pci_word_test_and_clear_mask(dev->config + PCI_COMMAND,
143
                                 pci_get_word(dev->wmask + PCI_COMMAND));
143
                                 pci_get_word(dev->wmask + PCI_COMMAND) |
144
                                 pci_get_word(dev->w1cmask + PCI_COMMAND));
144 145
    dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
145 146
    dev->config[PCI_INTERRUPT_LINE] = 0x0;
146 147
    for (r = 0; r < PCI_NUM_REGIONS; ++r) {
......
292 293

  
293 294
    qemu_get_buffer(f, config, size);
294 295
    for (i = 0; i < size; ++i) {
295
        if ((config[i] ^ s->config[i]) & s->cmask[i] & ~s->wmask[i]) {
296
        if ((config[i] ^ s->config[i]) &
297
            s->cmask[i] & ~s->wmask[i] & ~s->w1cmask[i]) {
296 298
            qemu_free(config);
297 299
            return -EINVAL;
298 300
        }

Also available in: Unified diff