static int vhost_client_sync_dirty_bitmap(CPUPhysMemoryClient *client,

                                          target_phys_addr_t start_addr,

                                          target_phys_addr_t end_addr)

{

    struct vhost_dev *dev = container_of(client, struct vhost_dev, client);

    int i;

    if (!dev->log_enabled || !dev->started) {

        return 0;

    }

    for (i = 0; i < dev->mem->nregions; ++i) {

        struct vhost_memory_region *reg = dev->mem->regions + i;

        vhost_dev_sync_region(dev, start_addr, end_addr,

                              reg->guest_phys_addr,

                              range_get_last(reg->guest_phys_addr,

                                             reg->memory_size));

    }

    for (i = 0; i < dev->nvqs; ++i) {

        struct vhost_virtqueue *vq = dev->vqs + i;

        vhost_dev_sync_region(dev, start_addr, end_addr, vq->used_phys,

                              range_get_last(vq->used_phys, vq->used_size));

    }

    return 0;

}

static int vhost_client_sync_dirty_bitmap(CPUPhysMemoryClient *client,

                                          target_phys_addr_t start_addr,

                                          target_phys_addr_t end_addr)

{

    struct vhost_dev *dev = container_of(client, struct vhost_dev, client);

    int i;

    if (!dev->log_enabled || !dev->started) {

        return 0;

    }

    for (i = 0; i < dev->mem->nregions; ++i) {

        struct vhost_memory_region *reg = dev->mem->regions + i;

        vhost_dev_sync_region(dev, start_addr, end_addr,

                              reg->guest_phys_addr,

                              range_get_last(reg->guest_phys_addr,

                                             reg->memory_size));

    }

    for (i = 0; i < dev->nvqs; ++i) {

        struct vhost_virtqueue *vq = dev->vqs + i;

        vhost_dev_sync_region(dev, start_addr, end_addr, vq->used_phys,

                              range_get_last(vq->used_phys, vq->used_size));

    }

    return 0;

}

static int vhost_client_sync_dirty_bitmap(CPUPhysMemoryClient *client,                                           target_phys_addr_t start_addr,                                           target_phys_addr_t end_addr)     struct vhost_dev *dev = container_of(client, struct vhost_dev, client);     struct vhost_dev *dev = container_of(client, struct vhost_dev, client);     struct vhost_dev *dev = container_of(client, struct vhost_dev, client);
static int FUNC_0(CPUPhysMemoryClient *VAR_0,

                                          target_phys_addr_t VAR_1,

                                          target_phys_addr_t VAR_2)

{

    struct vhost_dev *VAR_3 = container_of(VAR_0, struct vhost_dev, VAR_0);

    int VAR_4;

    if (!VAR_3->log_enabled || !VAR_3->started) {

        return 0;

    }

    for (VAR_4 = 0; VAR_4 < VAR_3->mem->nregions; ++VAR_4) {

        struct vhost_memory_region *VAR_5 = VAR_3->mem->regions + VAR_4;

        vhost_dev_sync_region(VAR_3, VAR_1, VAR_2,

                              VAR_5->guest_phys_addr,

                              range_get_last(VAR_5->guest_phys_addr,

                                             VAR_5->memory_size));

    }

    for (VAR_4 = 0; VAR_4 < VAR_3->nvqs; ++VAR_4) {

        struct vhost_virtqueue *VAR_6 = VAR_3->vqs + VAR_4;

        vhost_dev_sync_region(VAR_3, VAR_1, VAR_2, VAR_6->used_phys,

                              range_get_last(VAR_6->used_phys, VAR_6->used_size));

    }

    return 0;

}

static int FUNC_0(CPUPhysMemoryClient *VAR_0,
target_phys_addr_t VAR_1,
target_phys_addr_t VAR_2)
{ struct vhost_dev *VAR_3 = container_of(VAR_0, struct vhost_dev, VAR_0); int VAR_4; if (!VAR_3->log_enabled || !VAR_3->started) { return 0; } for (VAR_4 = 0; VAR_4 < VAR_3->mem->nregions; ++VAR_4) { struct vhost_memory_region *VAR_5 = VAR_3->mem->regions + VAR_4; vhost_dev_sync_region(VAR_3, VAR_1, VAR_2,
VAR_5->guest_phys_addr,
range_get_last(VAR_5->guest_phys_addr,
VAR_5->memory_size)); } for (VAR_4 = 0; VAR_4 < VAR_3->nvqs; ++VAR_4) { struct vhost_virtqueue *VAR_6 = VAR_3->vqs + VAR_4; vhost_dev_sync_region(VAR_3, VAR_1, VAR_2, VAR_6->used_phys,
range_get_last(VAR_6->used_phys, VAR_6->used_size)); } return 0; }