[PATCH 05/33] kvm tools: remove redundancy between kvm_config and kvm

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

 



Remove some redundant members between struct kvm_config and struct kvm
since options are now contained within struct kvm.

Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
---
 tools/kvm/builtin-run.c     | 2 --
 tools/kvm/hw/rtc.c          | 2 +-
 tools/kvm/include/kvm/kvm.h | 3 ---
 tools/kvm/kvm-cpu.c         | 2 +-
 4 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index a8926dd..8221c22 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -1040,8 +1040,6 @@ static int kvm_cmd_run_init(int argc, const char **argv)
 	if (r)
 		goto fail;
 
-	kvm->single_step = kvm->cfg.single_step;
-
 	r = ioeventfd__init(kvm);
 	if (r < 0) {
 		pr_err("ioeventfd__init() failed with error %d\n", r);
diff --git a/tools/kvm/hw/rtc.c b/tools/kvm/hw/rtc.c
index b4f9f1f..4941daf 100644
--- a/tools/kvm/hw/rtc.c
+++ b/tools/kvm/hw/rtc.c
@@ -134,4 +134,4 @@ int rtc__exit(struct kvm *kvm)
 	ioport__unregister(0x0071);
 
 	return 0;
-}
\ No newline at end of file
+}
diff --git a/tools/kvm/include/kvm/kvm.h b/tools/kvm/include/kvm/kvm.h
index 167693e..ca4375a 100644
--- a/tools/kvm/include/kvm/kvm.h
+++ b/tools/kvm/include/kvm/kvm.h
@@ -42,15 +42,12 @@ struct kvm {
 	int			nrcpus;		/* Number of cpus to run */
 
 	u32			mem_slots;	/* for KVM_SET_USER_MEMORY_REGION */
-
 	u64			ram_size;
 	void			*ram_start;
 	u64			ram_pagesize;
 
 	bool			nmi_disabled;
 
-	bool			single_step;
-
 	const char		*vmlinux;
 	struct disk_image       **disks;
 	int                     nr_disks;
diff --git a/tools/kvm/kvm-cpu.c b/tools/kvm/kvm-cpu.c
index 12791dd..dbd14b7 100644
--- a/tools/kvm/kvm-cpu.c
+++ b/tools/kvm/kvm-cpu.c
@@ -92,7 +92,7 @@ int kvm_cpu__start(struct kvm_cpu *cpu)
 
 	kvm_cpu__reset_vcpu(cpu);
 
-	if (cpu->kvm->single_step)
+	if (cpu->kvm->cfg.single_step)
 		kvm_cpu__enable_singlestep(cpu);
 
 	while (cpu->is_running) {
-- 
1.7.12

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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