From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "pvukkisala@marvell.com" <pvukkisala@marvell.com>,
"dts@dpdk.org" <dts@dpdk.org>
Cc: "avijay@marvell.com" <avijay@marvell.com>,
"fmasood@marvell.com" <fmasood@marvell.com>
Subject: Re: [dts] [PATCH] qemu-kvm: Add support to provide Kernel Image explicitly to boot VM
Date: Wed, 3 Jul 2019 06:07:36 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAD93DD@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1561624372-28833-1-git-send-email-pvukkisala@marvell.com>
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
> <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] qemu-kvm: Add support to provide Kernel Image
> explicitly to boot VM
>
> From: Phanendra Vukkisala <pvukkisala@marvell.com>
>
> 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 <pvukkisala@marvell.com>
> ---
> 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: <path of kernel image>
> +# 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
prev parent reply other threads:[~2019-07-03 6:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 8:32 pvukkisala
2019-07-03 6:07 ` Tu, Lijuan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BAD93DD@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=avijay@marvell.com \
--cc=dts@dpdk.org \
--cc=fmasood@marvell.com \
--cc=pvukkisala@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).