diff options
author | Alexandru Elisei <alexandru.elisei@arm.com> | 2021-09-23 15:44:57 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-10-12 09:40:46 +0100 |
commit | 6cbec43ef88d88f527c6e8a9f4a412e566f45b72 (patch) | |
tree | 2b8379eaad3a5575408e72f1b57d7e9d14e32daa | |
parent | 6810e75ce9e0af8fb95869710693f3e015ba5894 (diff) | |
download | kvmtool-6cbec43ef88d88f527c6e8a9f4a412e566f45b72.tar.gz |
builtin-run: Warn when ignoring initrd because --firmware was specified
The firmware image is copied into the guest memory with the arch specific
function kvm__load_firmware() in kvm__init(). That function ignores the
initrd file, if the user specified one. Let the user know that the file is
ignored by KVM and the --initrd argument does nothing with --firmware.
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20210923144505.60776-3-alexandru.elisei@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | builtin-run.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin-run.c b/builtin-run.c index 8bb80516..083c7a2a 100644 --- a/builtin-run.c +++ b/builtin-run.c @@ -516,6 +516,9 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv) if (kvm->cfg.kernel_filename && kvm->cfg.firmware_filename) die("Only one of --kernel or --firmware can be specified"); + if (kvm->cfg.firmware_filename && kvm->cfg.initrd_filename) + pr_warning("Ignoring initrd file when loading a firmware image"); + if (!kvm->cfg.kernel_filename && !kvm->cfg.firmware_filename) { kvm->cfg.kernel_filename = find_kernel(); |