static inline void vhost_dev_log_resize(struct vhost_dev* dev, uint64_t size)

{

    vhost_log_chunk_t *log;

    uint64_t log_base;

    int r;

    if (size) {

        log = g_malloc0(size * sizeof *log);

    } else {

        log = NULL;

    }

    log_base = (uint64_t)(unsigned long)log;

    r = ioctl(dev->control, VHOST_SET_LOG_BASE, &log_base);

    assert(r >= 0);

    vhost_client_sync_dirty_bitmap(&dev->client, 0,

                                   (target_phys_addr_t)~0x0ull);

    if (dev->log) {

        g_free(dev->log);

    }

    dev->log = log;

    dev->log_size = size;

}

static inline void vhost_dev_log_resize(struct vhost_dev* dev, uint64_t size)

{

    vhost_log_chunk_t *log;

    uint64_t log_base;

    int r;

    if (size) {

        log = g_malloc0(size * sizeof *log);

    } else {

        log = NULL;

    }

    log_base = (uint64_t)(unsigned long)log;

    r = ioctl(dev->control, VHOST_SET_LOG_BASE, &log_base);

    assert(r >= 0);

    vhost_client_sync_dirty_bitmap(&dev->client, 0,

                                   (target_phys_addr_t)~0x0ull);

    if (dev->log) {

        g_free(dev->log);

    }

    dev->log = log;

    dev->log_size = size;

}

    vhost_client_sync_dirty_bitmap(&dev->client, 0,                                    (target_phys_addr_t)~0x0ull);                                    (target_phys_addr_t)~0x0ull);
static inline void FUNC_0(struct vhost_dev* VAR_0, uint64_t VAR_1)

{

    vhost_log_chunk_t *log;

    uint64_t log_base;

    int VAR_2;

    if (VAR_1) {

        log = g_malloc0(VAR_1 * sizeof *log);

    } else {

        log = NULL;

    }

    log_base = (uint64_t)(unsigned long)log;

    VAR_2 = ioctl(VAR_0->control, VHOST_SET_LOG_BASE, &log_base);

    assert(VAR_2 >= 0);

    vhost_client_sync_dirty_bitmap(&VAR_0->client, 0,

                                   (target_phys_addr_t)~0x0ull);

    if (VAR_0->log) {

        g_free(VAR_0->log);

    }

    VAR_0->log = log;

    VAR_0->log_size = VAR_1;

}

static inline void FUNC_0(struct vhost_dev* VAR_0, uint64_t VAR_1)
{ vhost_log_chunk_t *log; uint64_t log_base; int VAR_2; if (VAR_1) { log = g_malloc0(VAR_1 * sizeof *log); } else { log = NULL; } log_base = (uint64_t)(unsigned long)log; VAR_2 = ioctl(VAR_0->control, VHOST_SET_LOG_BASE, &log_base); assert(VAR_2 >= 0); vhost_client_sync_dirty_bitmap(&VAR_0->client, 0,
(target_phys_addr_t)~0x0ull); if (VAR_0->log) { g_free(VAR_0->log); } VAR_0->log = log; VAR_0->log_size = VAR_1; }