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 3BD8EA046B for ; Thu, 27 Jun 2019 10:33:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0781A1E20; Thu, 27 Jun 2019 10:33:01 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 40AB7F04 for ; Thu, 27 Jun 2019 10:32:59 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5R8U1IJ023871 for ; Thu, 27 Jun 2019 01:32:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=hRQ381VdcECLuN+fnYAujFGbWdV8GUHxC75tQKUj6fM=; b=M306IZEuEN8OydB44KFK0AnNG2TPdAXm1otPOW/mKtxHKmWoJ3SzFsNnxMXC6OhpW9ac EUxJ8xi7rBf3xr/35Iznutwppg4ZFOda7EXe83FsZA4Q4Wv+b2yBwazysLi0u6nG2rWv z3l/x2tG7EEMH514cYDZ9kbPdPR6VKlUvTnfmBJ666O9dwVeEl7cgI5bNSJq2p8qvbqE djdc+SFbkNeoAKV3BCzcH1nYmDrjvGETwBvYxTSE2gU34yJEVn/E9D+Lbfes3eLrYbKD kzyyaSeWjLgredlK7x3SQo9G9OdK+kjFNSUAAeMZtnBEKUYbm74Jq6MKOmEEKtjhgWZn bA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2tch69a58n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 27 Jun 2019 01:32:58 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 27 Jun 2019 01:32:57 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 27 Jun 2019 01:32:57 -0700 Received: from phanendra-system.marvell.com (unknown [10.28.11.20]) by maili.marvell.com (Postfix) with ESMTP id EA8373F704E; Thu, 27 Jun 2019 01:32:55 -0700 (PDT) From: To: CC: , , Phanendra Vukkisala Date: Thu, 27 Jun 2019 14:02:52 +0530 Message-ID: <1561624372-28833-1-git-send-email-pvukkisala@marvell.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-27_03:, , signatures=0 Subject: [dts] [PATCH] qemu-kvm: Add support to provide Kernel Image explicitly to boot 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" From: Phanendra Vukkisala Enables option to boot VM with Kernel Image which is not part of VM image. Enables provding kernel boot parameters from configs Signed-off-by: Phanendra Vukkisala --- conf/sriov_kvm.cfg | 10 ++++++++++ framework/qemu_kvm.py | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/conf/sriov_kvm.cfg b/conf/sriov_kvm.cfg index a7ba884..8106e04 100644 --- a/conf/sriov_kvm.cfg +++ b/conf/sriov_kvm.cfg @@ -98,6 +98,16 @@ # note: # By default VM will start with the daemonize status. # Not support starting it on the stdin now. +# +#kernel +# kernel_img: +# note: adding kernel_img use this kernel and following argument to as +# kernel boot command args +# console: ttyS0 +# baudrate: 115200 +# root: /dev/sda2 rw rootwait +# note: along with root path, can provide any other extra parameters +# # vm configuration for pmd sriov case diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py index 80a39c8..8408795 100644 --- a/framework/qemu_kvm.py +++ b/framework/qemu_kvm.py @@ -483,6 +483,32 @@ class QEMUKvm(VirtBase): elif options['type'] in ['tap', 'bridge']: self.net_type = 'bridge' + def add_vm_kernel(self, **options): + """ + Add Kernel Image explicitly + kernel_img: path to kernel Image + console: console details in kernel boot args + baudrate: console access baudrate in kernel boot args + root: root partition details in kernel boot args + """ + print options + if 'kernel_img' in options.keys() and options['kernel_img']: + kernel_boot_line = '-kernel %s' % options['kernel_img'] + else: + return False + self.__add_boot_line(kernel_boot_line) + kernel_args = "" + if 'console' in options.keys() and options['console']: + kernel_args = "console=%s" %options['console'] + if 'baudrate' in options.keys() and options['baudrate']: + kernel_args += "," + options['baudrate'] + if 'root' in options.keys() and options['root']: + kernel_args += " root=%s" %options['root'] + if kernel_args: + append_boot_line = '--append \"%s\"' %kernel_args + self.__add_boot_line(append_boot_line) + + def __add_vm_net_nic(self, **options): """ type: nic -- 1.7.9.5