static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr, target_phys_addr_t end_addr,

                                      unsigned flags,

                                      unsigned mask)

{

    KVMState *s = kvm_state;

    KVMSlot *mem = kvm_lookup_slot(s, phys_addr);

    if (mem == NULL)  {

            dprintf("invalid parameters %llx-%llx\n", phys_addr, end_addr);

            return -EINVAL;

    }



    flags = (mem->flags & ~mask) | flags;

    /* Nothing changed, no need to issue ioctl */

    if (flags == mem->flags)

            return 0;



    mem->flags = flags;



    return kvm_set_user_memory_region(s, mem);

}

static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr, target_phys_addr_t end_addr,

                                      unsigned flags,

                                      unsigned mask)

{

    KVMState *s = kvm_state;

    KVMSlot *mem = kvm_lookup_slot(s, phys_addr);

    if (mem == NULL)  {

            dprintf("invalid parameters %llx-%llx\n", phys_addr, end_addr);

            return -EINVAL;

    }



    flags = (mem->flags & ~mask) | flags;

    

    if (flags == mem->flags)

            return 0;



    mem->flags = flags;



    return kvm_set_user_memory_region(s, mem);

}

static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr, target_phys_addr_t end_addr,                                       unsigned flags,     KVMSlot *mem = kvm_lookup_slot(s, phys_addr);             dprintf("invalid parameters %llx-%llx\n", phys_addr, end_addr);
static int FUNC_0(target_phys_addr_t VAR_0, target_phys_addr_t VAR_1,

                                      unsigned VAR_2,

                                      unsigned VAR_3)

{

    KVMState *s = kvm_state;

    KVMSlot *mem = kvm_lookup_slot(s, VAR_0);

    if (mem == NULL)  {

            dprintf("invalid parameters %llx-%llx\n", VAR_0, VAR_1);

            return -EINVAL;

    }



    VAR_2 = (mem->VAR_2 & ~VAR_3) | VAR_2;

    

    if (VAR_2 == mem->VAR_2)

            return 0;



    mem->VAR_2 = VAR_2;



    return kvm_set_user_memory_region(s, mem);

}

static int FUNC_0(target_phys_addr_t VAR_0, target_phys_addr_t VAR_1,
unsigned VAR_2,
unsigned VAR_3)
{ KVMState *s = kvm_state; KVMSlot *mem = kvm_lookup_slot(s, VAR_0); if (mem == NULL)  { dprintf("invalid parameters %llx-%llx\n", VAR_0, VAR_1); return -EINVAL; } VAR_2 = (mem->VAR_2 & ~VAR_3) | VAR_2; if (VAR_2 == mem->VAR_2)
return 0; mem->VAR_2 = VAR_2; return kvm_set_user_memory_region(s, mem); }