From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 56450A00C5; Fri, 12 Jun 2020 11:20:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BAA092BF5; Fri, 12 Jun 2020 11:20:12 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E3DEF29CB for ; Fri, 12 Jun 2020 11:20:10 +0200 (CEST) IronPort-SDR: h3Q2smPOZ7+Vc+PWc1Uqg7mS9YrGTMll+WYBKh7R61VNt5vXmkOkTcqRCkAkIUMucbUGG0lfTp bpuvm4r65kEg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2020 02:20:10 -0700 IronPort-SDR: qK2j4AWSEqUgXGTufvLp2S6mbGzxa4dQplBsrxXB383XaIVWaPA3tq7gpXJgMKXcOcv4Ndbwac NKVZk8Vq0qDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,502,1583222400"; d="scan'208";a="350480906" Received: from unknown (HELO xqm-virtio_tester.localdomain) ([10.240.183.52]) by orsmga001.jf.intel.com with ESMTP; 12 Jun 2020 02:20:09 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Fri, 12 Jun 2020 17:12:26 +0800 Message-Id: <1591953147-50278-2-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1591953147-50278-1-git-send-email-qimaix.xiao@intel.com> References: <1591953147-50278-1-git-send-email-qimaix.xiao@intel.com> Subject: [dts] [PATCH V1 1/2]framework/project_dpdk: add modprobe vfio-pci in vm X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: Xiao Qimai --- framework/project_dpdk.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index ebc008e..e8b5d0f 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -101,11 +101,17 @@ class DPDKdut(Dut): def setup_modules_linux(self, target, drivername, drivermode): if drivername == "vfio-pci": - self.send_expect("rmmod vfio_pci", "#", 70) - self.send_expect("rmmod vfio_iommu_type1", "#", 70) - self.send_expect("rmmod vfio", "#", 70) - self.send_expect("modprobe vfio", "#", 70) - self.send_expect("modprobe vfio-pci", "#", 70) + if 'VirtDut' in str(self.__class__): + self.send_expect("modprobe -r vfio_iommu_type1", "#") + self.send_expect("modprobe -r vfio", "#") + self.send_expect("modprobe vfio enable_unsafe_noiommu_mode=1", "#") + self.send_expect("modprobe vfio-pci", "#") + else: + self.send_expect("rmmod vfio_pci", "#", 70) + self.send_expect("rmmod vfio_iommu_type1", "#", 70) + self.send_expect("rmmod vfio", "#", 70) + self.send_expect("modprobe vfio", "#", 70) + self.send_expect("modprobe vfio-pci", "#", 70) out = self.send_expect("lsmod | grep vfio_iommu_type1", "#") if not out: out = self.send_expect("ls /sys/module |grep vfio_pci", "#") -- 1.8.3.1