[PATCH kvmtool 03/10] builtin-run: Do not attempt to find vmlinux if --firmware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kvm->vmlinux is used by symbol.c on x86 to translate a PC address to a
kernel symbol when kvmtool exits unexpectedly. When the --firmware argument
is used, a kernel image is not used for the VM, and the vmlinux file has no
relevance in this case.

Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx>
---
 builtin-run.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin-run.c b/builtin-run.c
index 083c7a2abea7..6a55e34ab7f9 100644
--- a/builtin-run.c
+++ b/builtin-run.c
@@ -528,8 +528,10 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv)
 		}
 	}
 
-	kvm->cfg.vmlinux_filename = find_vmlinux();
-	kvm->vmlinux = kvm->cfg.vmlinux_filename;
+	if (kvm->cfg.kernel_filename) {
+		kvm->cfg.vmlinux_filename = find_vmlinux();
+		kvm->vmlinux = kvm->cfg.vmlinux_filename;
+	}
 
 	if (kvm->cfg.nrcpus == 0)
 		kvm->cfg.nrcpus = nr_online_cpus;
-- 
2.31.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux