Revision 340b50c7

b/hw/pci/msix.c
569 569
    dev->msix_vector_release_notifier = NULL;
570 570
    dev->msix_vector_poll_notifier = NULL;
571 571
}
572

  
573
static void put_msix_state(QEMUFile *f, void *pv, size_t size)
574
{
575
    msix_save(pv, f);
576
}
577

  
578
static int get_msix_state(QEMUFile *f, void *pv, size_t size)
579
{
580
    msix_load(pv, f);
581
    return 0;
582
}
583

  
584
static VMStateInfo vmstate_info_msix = {
585
    .name = "msix state",
586
    .get  = get_msix_state,
587
    .put  = put_msix_state,
588
};
589

  
590
const VMStateDescription vmstate_msix = {
591
    .name = "msix",
592
    .fields = (VMStateField[]) {
593
        {
594
            .name         = "msix",
595
            .version_id   = 0,
596
            .field_exists = NULL,
597
            .size         = 0,   /* ouch */
598
            .info         = &vmstate_info_msix,
599
            .flags        = VMS_SINGLE,
600
            .offset       = 0,
601
        },
602
        VMSTATE_END_OF_LIST()
603
    }
604
};
b/include/hw/pci/msix.h
43 43
                              MSIVectorReleaseNotifier release_notifier,
44 44
                              MSIVectorPollNotifier poll_notifier);
45 45
void msix_unset_vector_notifiers(PCIDevice *dev);
46

  
47
extern const VMStateDescription vmstate_msix;
48

  
49
#define VMSTATE_MSIX(_field, _state) {                               \
50
    .name       = (stringify(_field)),                               \
51
    .size       = sizeof(PCIDevice),                                 \
52
    .vmsd       = &vmstate_msix,                                     \
53
    .flags      = VMS_STRUCT,                                        \
54
    .offset     = vmstate_offset_value(_state, _field, PCIDevice),   \
55
}
56

  
46 57
#endif

Also available in: Unified diff