def METHOD_NAME():
    """
    Verify that virtio mode setting in qtree are correct.
    """
    device_type = params["device_type"]
    qtree = qemu_qtree.QtreeContainer()
    try:
        qtree.parse_info_qtree(vm.monitor.info('qtree'))
    except AttributeError:
        test.cancel("Monitor deson't supoort qtree, skip this test")
    for node in qtree.get_nodes():
        if (isinstance(node, qemu_qtree.QtreeDev) and
                node.qtree['type'] == device_type):
            disable_modern = node.qtree["disable-modern"]
            disable_legacy = node.qtree["disable-legacy"].strip('"')
    if (disable_modern != params["virtio_dev_disable_modern"] or
            disable_legacy != params["virtio_dev_disable_legacy"]):
        test.fail("virtio mode in qtree is not correct, details are %s %s"
                  % (disable_modern, disable_legacy))