diff --git a/test/vhost/common/common.sh b/test/vhost/common/common.sh index ff575747e..09c727456 100644 --- a/test/vhost/common/common.sh +++ b/test/vhost/common/common.sh @@ -123,6 +123,7 @@ function spdk_vhost_run() --conf-path=*) local vhost_conf_path="${param#*=}" ;; --json-path=*) local vhost_json_path="${param#*=}" ;; --memory=*) local memory=${param#*=} ;; + --no-pci*) local no_pci="-u" ;; *) error "Invalid parameter '$param'" return 1 @@ -158,11 +159,11 @@ function spdk_vhost_run() return 1 fi - local cmd="$vhost_app -m $reactor_mask -p $master_core -s $memory -r $vhost_dir/rpc.sock" + local cmd="$vhost_app -m $reactor_mask -p $master_core -s $memory -r $vhost_dir/rpc.sock $no_pci" if [[ -n "$vhost_conf_path" ]]; then cp $vhost_conf_template $vhost_conf_file $SPDK_BUILD_DIR/scripts/gen_nvme.sh >> $vhost_conf_file - cmd="$vhost_app -m $reactor_mask -p $master_core -c $vhost_conf_file -s $memory -r $vhost_dir/rpc.sock" + cmd="$vhost_app -m $reactor_mask -p $master_core -c $vhost_conf_file -s $memory -r $vhost_dir/rpc.sock $no_pci" fi notice "Loging to: $vhost_log_file" @@ -176,7 +177,8 @@ function spdk_vhost_run() notice "waiting for app to run..." waitforlisten "$vhost_pid" "$vhost_dir/rpc.sock" - if [[ -z "$vhost_conf_path" ]]; then + #do not generate nvmes if pci access is disabled + if [[ -z "$vhost_conf_path" ]] && [[ -z "$no_pci" ]]; then $SPDK_BUILD_DIR/scripts/gen_nvme.sh "--json" | $SPDK_BUILD_DIR/scripts/rpc.py\ -s $vhost_dir/rpc.sock load_subsystem_config fi diff --git a/test/vhost/migration/migration-tc2.sh b/test/vhost/migration/migration-tc2.sh index 2c1f06cac..ead0f8646 100644 --- a/test/vhost/migration/migration-tc2.sh +++ b/test/vhost/migration/migration-tc2.sh @@ -101,11 +101,11 @@ function migration_tc2_configure_vhost() waitforlisten "$nvmf_tgt_pid" "$nvmf_dir/rpc.sock" timing_exit start_nvmf_tgt - spdk_vhost_run --memory=512 --vhost-num=0 + spdk_vhost_run --memory=512 --vhost-num=0 --no-pci # Those are global intentionaly vhost_1_reactor_mask=0x2 vhost_1_master_core=1 - spdk_vhost_run --memory=512 --vhost-num=1 + spdk_vhost_run --memory=512 --vhost-num=1 --no-pci local rdma_ip_list=$(get_available_rdma_ips) local nvmf_target_ip=$(echo "$rdma_ip_list" | head -n 1) diff --git a/test/vhost/migration/migration-tc3a.sh b/test/vhost/migration/migration-tc3a.sh index 2e68acdfd..b9eba44f5 100644 --- a/test/vhost/migration/migration-tc3a.sh +++ b/test/vhost/migration/migration-tc3a.sh @@ -118,7 +118,7 @@ function host1_start_vhost() notice "Starting vhost0 instance on local server" trap 'host1_cleanup_vhost; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT - spdk_vhost_run --vhost-num=0 + spdk_vhost_run --vhost-num=0 --no-pci $rpc_0 construct_nvme_bdev -b Nvme0 -t rdma -f ipv4 -a $RDMA_TARGET_IP -s 4420 -n "nqn.2018-02.io.spdk:cnode1" $rpc_0 construct_vhost_scsi_controller $incoming_vm_ctrlr $rpc_0 add_vhost_scsi_lun $incoming_vm_ctrlr 0 Nvme0n1 diff --git a/test/vhost/migration/migration-tc3b.sh b/test/vhost/migration/migration-tc3b.sh index f4b358456..888b4f246 100755 --- a/test/vhost/migration/migration-tc3b.sh +++ b/test/vhost/migration/migration-tc3b.sh @@ -33,7 +33,7 @@ function host_2_start_vhost() notice "Starting vhost 1 instance on remote server" trap 'host_2_cleanup_vhost; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT - spdk_vhost_run --vhost-num=1 + spdk_vhost_run --vhost-num=1 --no-pci $rpc construct_nvme_bdev -b Nvme0 -t rdma -f ipv4 -a $RDMA_TARGET_IP -s 4420 -n "nqn.2018-02.io.spdk:cnode1" $rpc construct_vhost_scsi_controller $target_vm_ctrl