def METHOD_NAME(vm, name, addr, chardev):
    reply = cmd_qmp_log(vm, 'device_add', {'driver': 'pci-serial',
                                           'id': name,
                                           'addr': addr,
                                           'chardev': chardev})
    return reply