what is this function doing? 
bool vgicd_emul_handler(struct emul_access *acc)
{
    struct vgic_reg_handler_info *handler_info = NULL;
    switch (GICD_REG_MASK(acc-&gt;addr) &gt;&gt; 7) {
        case GICD_REG_GROUP(CTLR):
            handler_info = &amp;vgicd_misc_info;
            break;
        case GICD_REG_GROUP(ISENABLER):
            handler_info = &amp;isenabler_info;
            break;
        case GICD_REG_GROUP(ISPENDR):
            handler_info = &amp;ispendr_info;
            break;
        case GICD_REG_GROUP(ISACTIVER):
            handler_info = &amp;isactiver_info;
            break;
        case GICD_REG_GROUP(ICENABLER):
            handler_info = &amp;icenabler_info;
            break;
        case GICD_REG_GROUP(ICPENDR):
            handler_info = &amp;icpendr_info;
            break;
        case GICD_REG_GROUP(ICACTIVER):
            handler_info = &amp;iactiver_info;
            break;
        case GICD_REG_GROUP(ICFGR):
            handler_info = &amp;icfgr_info;
            break;
        case GICD_REG_GROUP(SGIR):
            handler_info = &amp;sgir_info;
            break;
        default: {
            size_t acc_off = GICD_REG_MASK(acc-&gt;addr);
            if (GICD_IS_REG(IPRIORITYR, acc_off)) {
                handler_info = &amp;ipriorityr_info;
            } else if (GICD_IS_REG(ITARGETSR, acc_off)) {
                handler_info = &amp;itargetr_info;
            } else if (GICD_IS_REG(IROUTER, acc_off)) {
                handler_info = &amp;irouter_info;
            } else if (GICD_IS_REG(ID, acc_off)) {
                handler_info = &amp;vgicd_pidr_info;
            } else {
                handler_info = &amp;razwi_info;
            }
        }
    }

    if (vgic_check_reg_alignment(acc, handler_info)) {
        spin_lock(&amp;cpu()-&gt;vcpu-&gt;vm-&gt;arch.vgicd.lock);
        handler_info-&gt;reg_access(acc, handler_info, false, cpu()-&gt;vcpu-&gt;id);
        spin_unlock(&amp;cpu()-&gt;vcpu-&gt;vm-&gt;arch.vgicd.lock);
        return true;
    } else {
        return false;
    }
}