Diff for /qemu/hw/xen_platform.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 19:28:02 version 1.1.1.3, 2018/04/24 19:47:45
Line 87  static void unplug_nic(PCIBus *b, PCIDev Line 87  static void unplug_nic(PCIBus *b, PCIDev
 {  {
     if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==      if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
             PCI_CLASS_NETWORK_ETHERNET) {              PCI_CLASS_NETWORK_ETHERNET) {
         qdev_unplug(&(d->qdev));          /* Until qdev_free includes a call to object_unparent, we call it here
            */
           object_unparent(&d->qdev.parent_obj);
           qdev_free(&d->qdev);
     }      }
 }  }
   
Line 100  static void unplug_disks(PCIBus *b, PCID Line 103  static void unplug_disks(PCIBus *b, PCID
 {  {
     if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==      if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
             PCI_CLASS_STORAGE_IDE) {              PCI_CLASS_STORAGE_IDE) {
         qdev_unplug(&(d->qdev));          qdev_unplug(&(d->qdev), NULL);
     }      }
 }  }
   
Line 120  static void platform_fixed_ioport_writew Line 123  static void platform_fixed_ioport_writew
            devices, and bit 2 the non-primary-master IDE devices. */             devices, and bit 2 the non-primary-master IDE devices. */
         if (val & UNPLUG_ALL_IDE_DISKS) {          if (val & UNPLUG_ALL_IDE_DISKS) {
             DPRINTF("unplug disks\n");              DPRINTF("unplug disks\n");
             qemu_aio_flush();              bdrv_drain_all();
             bdrv_flush_all();              bdrv_flush_all();
             pci_unplug_disks(s->pci_dev.bus);              pci_unplug_disks(s->pci_dev.bus);
         }          }
Line 372  static void platform_reset(DeviceState * Line 375  static void platform_reset(DeviceState *
     platform_fixed_ioport_reset(s);      platform_fixed_ioport_reset(s);
 }  }
   
 static PCIDeviceInfo xen_platform_info = {  static void xen_platform_class_init(ObjectClass *klass, void *data)
     .init = xen_platform_initfn,  {
     .qdev.name = "xen-platform",      DeviceClass *dc = DEVICE_CLASS(klass);
     .qdev.desc = "XEN platform pci device",      PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
     .qdev.size = sizeof(PCIXenPlatformState),  
     .qdev.vmsd = &vmstate_xen_platform,      k->init = xen_platform_initfn;
     .qdev.reset = platform_reset,      k->vendor_id = PCI_VENDOR_ID_XEN;
       k->device_id = PCI_DEVICE_ID_XEN_PLATFORM;
     .vendor_id    =  PCI_VENDOR_ID_XEN,      k->class_id = PCI_CLASS_OTHERS << 8 | 0x80;
     .device_id    = PCI_DEVICE_ID_XEN_PLATFORM,      k->subsystem_vendor_id = PCI_VENDOR_ID_XEN;
     .class_id     = PCI_CLASS_OTHERS << 8 | 0x80,      k->subsystem_id = PCI_DEVICE_ID_XEN_PLATFORM;
     .subsystem_vendor_id = PCI_VENDOR_ID_XEN,      k->revision = 1;
     .subsystem_id = PCI_DEVICE_ID_XEN_PLATFORM,      dc->desc = "XEN platform pci device";
     .revision = 1,      dc->reset = platform_reset;
       dc->vmsd = &vmstate_xen_platform;
   }
   
   static TypeInfo xen_platform_info = {
       .name          = "xen-platform",
       .parent        = TYPE_PCI_DEVICE,
       .instance_size = sizeof(PCIXenPlatformState),
       .class_init    = xen_platform_class_init,
 };  };
   
 static void xen_platform_register(void)  static void xen_platform_register_types(void)
 {  {
     pci_qdev_register(&xen_platform_info);      type_register_static(&xen_platform_info);
 }  }
   
 device_init(xen_platform_register);  type_init(xen_platform_register_types)

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


unix.superglobalmegacorp.com