static int kvm_s390_store_adtl_status(S390CPU *cpu, hwaddr addr)

{

    void *mem;

    hwaddr len = ADTL_SAVE_AREA_SIZE;



    mem = cpu_physical_memory_map(addr, &len, 1);

    if (!mem) {

        return -EFAULT;

    }

    if (len != ADTL_SAVE_AREA_SIZE) {

        cpu_physical_memory_unmap(mem, len, 1, 0);

        return -EFAULT;

    }



    memcpy(mem, &cpu->env.vregs, 512);



    cpu_physical_memory_unmap(mem, len, 1, len);



    return 0;

}

static int kvm_s390_store_adtl_status(S390CPU *cpu, hwaddr addr)

{

    void *mem;

    hwaddr len = ADTL_SAVE_AREA_SIZE;



    mem = cpu_physical_memory_map(addr, &len, 1);

    if (!mem) {

        return -EFAULT;

    }

    if (len != ADTL_SAVE_AREA_SIZE) {

        cpu_physical_memory_unmap(mem, len, 1, 0);

        return -EFAULT;

    }



    memcpy(mem, &cpu->env.vregs, 512);



    cpu_physical_memory_unmap(mem, len, 1, len);



    return 0;

}

static int FUNC_0(S390CPU *VAR_0, hwaddr VAR_1)

{

    void *VAR_2;

    hwaddr len = ADTL_SAVE_AREA_SIZE;



    VAR_2 = cpu_physical_memory_map(VAR_1, &len, 1);

    if (!VAR_2) {

        return -EFAULT;

    }

    if (len != ADTL_SAVE_AREA_SIZE) {

        cpu_physical_memory_unmap(VAR_2, len, 1, 0);

        return -EFAULT;

    }



    memcpy(VAR_2, &VAR_0->env.vregs, 512);



    cpu_physical_memory_unmap(VAR_2, len, 1, len);



    return 0;

}

static int FUNC_0(S390CPU *VAR_0, hwaddr VAR_1)
{ void *VAR_2; hwaddr len = ADTL_SAVE_AREA_SIZE; VAR_2 = cpu_physical_memory_map(VAR_1, &len, 1); if (!VAR_2) { return -EFAULT; } if (len != ADTL_SAVE_AREA_SIZE) { cpu_physical_memory_unmap(VAR_2, len, 1, 0); return -EFAULT; } memcpy(VAR_2, &VAR_0->env.vregs, 512); cpu_physical_memory_unmap(VAR_2, len, 1, len); return 0; }