def METHOD_NAME(dev_type):
    """
    Check the locked memory for the vm with hostdev and vDPA interfaces.
    1. The locked memory will be "1G + current memory * ${num of vDPA interface}";
    2. All hostdev interfaces will share one memory space, so the locked
        memory will be "current memory(for hostdev interfaces) + current
        memory * num of vDPA interface (for vDPA) + 1G";
    """
    test.log.info("TEST_STEP: Start the vm with a vDPA interface.")
    vm.start()
    vm.wait_for_serial_login(timeout=240).close()
    new_vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
    iface_no = len(new_vmxml.devices.by_device_tag("hostdev")) + len(new_vmxml.devices.by_device_tag("interface"))
    expr_memlock = libvirt_memory.normalize_mem_size(
        new_vmxml.get_current_mem(),
        new_vmxml.get_current_mem_unit()) * iface_no + 1073741824
    if not libvirt_memory.comp_memlock(expr_memlock):
        test.fail("Unalbe to get correct MEMLOCK after VM startup!")
    if test_scenario == "cold_plug":
        return
    test.log.info("TEST_STEP: Hotplug a hostdev interface.")
    virsh.attach_interface(vm.name, "hostdev --managed %s" % sriov_test_obj.vf_pci,
                           debug=True, ignore_status=False)
    new_vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
    expr_memlock = libvirt_memory.normalize_mem_size(
        new_vmxml.get_current_mem(),
        new_vmxml.get_current_mem_unit()) * 2 + 1073741824
    if not libvirt_memory.comp_memlock(expr_memlock):
        test.fail("Unalbe to get correct MEMLOCK after attaching a hostdev "
                  "interface!")
    test.log.info("TEST_STEP: Hotplug another hostdev interface.")
    virsh.attach_interface(vm.name, "hostdev --managed %s" % sriov_test_obj.vf_pci2,
                           debug=True, ignore_status=False)
    if not libvirt_memory.comp_memlock(expr_memlock):
        test.fail("Unalbe to get correct MEMLOCK after attaching a hostdev "
                  "interface!")
    test.log.info("TEST_STEP: Add one more vDPA interface.")
    iface2 = interface_base.create_iface(
        dev_type, eval(params.get(
            'iface_dict2', "{'source': {'dev':'/dev/vhost-vdpa-1'}}")))
    virsh.attach_device(vm_name, iface2.xml, **virsh_args)
    new_vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
    expr_memlock = libvirt_memory.normalize_mem_size(
        new_vmxml.get_current_mem(),
        new_vmxml.get_current_mem_unit()) * 3 + 1073741824
    if not libvirt_memory.comp_memlock(expr_memlock):
        test.fail("Unalbe to get correct MEMLOCK after attaching the 2nd "
                  "vDPA interface device!")