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 079BCA0487 for ; Wed, 3 Jul 2019 08:07:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F13394C8F; Wed, 3 Jul 2019 08:07:41 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 67D271BE0 for ; Wed, 3 Jul 2019 08:07:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 23:07:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="166422701" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 02 Jul 2019 23:07:39 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jul 2019 23:07:39 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jul 2019 23:07:39 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.60]) with mapi id 14.03.0439.000; Wed, 3 Jul 2019 14:07:37 +0800 From: "Tu, Lijuan" To: "pvukkisala@marvell.com" , "dts@dpdk.org" CC: "avijay@marvell.com" , "fmasood@marvell.com" Thread-Topic: [dts] [PATCH] qemu-kvm: Add support to provide Kernel Image explicitly to boot VM Thread-Index: AQHVLML8coMYLMoyAkSLJ0T47E5bQ6a4ca6g Date: Wed, 3 Jul 2019 06:07:36 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAD93DD@SHSMSX101.ccr.corp.intel.com> References: <1561624372-28833-1-git-send-email-pvukkisala@marvell.com> In-Reply-To: <1561624372-28833-1-git-send-email-pvukkisala@marvell.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDQzZDQwYWItYWUyNC00ZjA4LWFiYjktM2E2NzM1ZTM2OTdlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiekRIcFJCMWNpdFhRWkE4MjIwb1wvZ0VXMDVGTU1Ta21wcjIyanQ0cU13cVpWd0Z5RnFkNWZoMHNXcUkxNU9iZHMifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of > pvukkisala@marvell.com > Sent: Thursday, June 27, 2019 4:33 PM > To: dts@dpdk.org > Cc: avijay@marvell.com; fmasood@marvell.com; Phanendra Vukkisala > > Subject: [dts] [PATCH] qemu-kvm: Add support to provide Kernel Image > explicitly to boot VM >=20 > From: Phanendra Vukkisala >=20 > Enables option to boot VM with Kernel Image which is not part of VM image= . > Enables provding kernel boot parameters from configs >=20 > Signed-off-by: Phanendra Vukkisala > --- > conf/sriov_kvm.cfg | 10 ++++++++++ > framework/qemu_kvm.py | 26 ++++++++++++++++++++++++++ > 2 files changed, 36 insertions(+) >=20 > diff --git a/conf/sriov_kvm.cfg b/conf/sriov_kvm.cfg index a7ba884..8106e= 04 > 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 argume= nt 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 para= meters > +# >=20 >=20 > # 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 =3D 'bridge' >=20 > + 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 =3D '-kernel %s' % options['kernel_img'] > + else: > + return False > + self.__add_boot_line(kernel_boot_line) > + kernel_args =3D "" > + if 'console' in options.keys() and options['console']: > + kernel_args =3D "console=3D%s" %options['console'] > + if 'baudrate' in options.keys() and options['baudrate']: > + kernel_args +=3D "," + options['baudrate'] > + if 'root' in options.keys() and options['root']: > + kernel_args +=3D " root=3D%s" %options['root'] > + if kernel_args: > + append_boot_line =3D '--append \"%s\"' %kernel_args > + self.__add_boot_line(append_boot_line) > + > + > def __add_vm_net_nic(self, **options): > """ > type: nic > -- > 1.7.9.5