void msix_load(PCIDevice *dev, QEMUFile *f)

{

    unsigned n = dev->msix_entries_nr;

    unsigned int vector;



    if (!(dev->cap_present & QEMU_PCI_CAP_MSIX)) {

        return;

    }



    msix_free_irq_entries(dev);

    qemu_get_buffer(f, dev->msix_table_page, n * PCI_MSIX_ENTRY_SIZE);

    qemu_get_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8);

    msix_update_function_masked(dev);



    for (vector = 0; vector < n; vector++) {

        msix_handle_mask_update(dev, vector, true);

    }

}

void msix_load(PCIDevice *dev, QEMUFile *f)

{

    unsigned n = dev->msix_entries_nr;

    unsigned int vector;



    if (!(dev->cap_present & QEMU_PCI_CAP_MSIX)) {

        return;

    }



    msix_free_irq_entries(dev);

    qemu_get_buffer(f, dev->msix_table_page, n * PCI_MSIX_ENTRY_SIZE);

    qemu_get_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8);

    msix_update_function_masked(dev);



    for (vector = 0; vector < n; vector++) {

        msix_handle_mask_update(dev, vector, true);

    }

}

void FUNC_0(PCIDevice *VAR_0, QEMUFile *VAR_1)

{

    unsigned VAR_2 = VAR_0->msix_entries_nr;

    unsigned int VAR_3;



    if (!(VAR_0->cap_present & QEMU_PCI_CAP_MSIX)) {

        return;

    }



    msix_free_irq_entries(VAR_0);

    qemu_get_buffer(VAR_1, VAR_0->msix_table_page, VAR_2 * PCI_MSIX_ENTRY_SIZE);

    qemu_get_buffer(VAR_1, VAR_0->msix_table_page + MSIX_PAGE_PENDING, (VAR_2 + 7) / 8);

    msix_update_function_masked(VAR_0);



    for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) {

        msix_handle_mask_update(VAR_0, VAR_3, true);

    }

}

void FUNC_0(PCIDevice *VAR_0, QEMUFile *VAR_1)
{ unsigned VAR_2 = VAR_0->msix_entries_nr; unsigned int VAR_3; if (!(VAR_0->cap_present & QEMU_PCI_CAP_MSIX)) { return; } msix_free_irq_entries(VAR_0); qemu_get_buffer(VAR_1, VAR_0->msix_table_page, VAR_2 * PCI_MSIX_ENTRY_SIZE); qemu_get_buffer(VAR_1, VAR_0->msix_table_page + MSIX_PAGE_PENDING, (VAR_2 + 7) / 8); msix_update_function_masked(VAR_0); for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) { msix_handle_mask_update(VAR_0, VAR_3, true); } }