A few more xen hypervisor fixes/updates

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

 



Hello Oda-san,

Here are a couple more xen hypervisor specific patches
that I plan to apply to the next release.

The first patch is for the "bt" command when run on the
xen hypervisor.  The patch will reject "bt -o", "bt -O",
"bt -e" and "bt -E" with "option not supported" messages.
Additionally, it fixes "bt -R" so that it works correctly,
and does not cause a segmentation violation.

The second patch removes "foreach" from the list of xen
hypervisor commands.  It could never have possibly worked,
and if you attempted to actually use it, it would silently
fail.

Unless you have any objections, they are queued for
the next release.

Thanks,
  Dave





--- kernel.c.orig	2008-09-29 13:57:02.000000000 -0400
+++ kernel.c	2008-09-29 15:47:54.000000000 -0400
@@ -1604,11 +1604,14 @@
 			break;
 
 		case 'o':
+			if (XEN_HYPER_MODE())
+				option_not_supported(c);
 			bt->flags |= BT_OLD_BACK_TRACE;
 			break;
 
 		case 'O':
-			if (!(machine_type("X86") || machine_type("X86_64"))) 
+			if (!(machine_type("X86") || machine_type("X86_64")) ||
+			    XEN_HYPER_MODE()) 
 				option_not_supported(c);
 			else if (kt->flags & USE_OLD_BT) { 
 				/* 
@@ -1644,11 +1647,15 @@
 			break;
 
 		case 'E':
+			if (XEN_HYPER_MODE())
+				option_not_supported(c);
 			bt->flags |= BT_EFRAME_SEARCH|BT_EFRAME_SEARCH2;
 			bt->hp = &hook;
 			break;
 
 		case 'e':
+			if (XEN_HYPER_MODE())
+				option_not_supported(c);
 			bt->flags |= BT_EFRAME_SEARCH;
 			break;
 
@@ -1738,11 +1745,6 @@
 		}
 	}
 
-	if (XEN_HYPER_MODE()) {
-		if (bt->flags & BT_EFRAME_SEARCH)
-			argerrs++;
-	}
-
 	if (argerrs)
 		cmd_usage(pc->curcmd, SYNOPSIS);
 
@@ -1783,7 +1785,9 @@
 					continue;
 				fake_tc.task = xen_hyper_pcpu_to_active_vcpu(c);
 				BT_SETUP(&fake_tc);
-				xen_hyper_print_bt_header(fp, fake_tc.task, subsequent++);
+			        if (!BT_REFERENCE_CHECK(bt))
+					xen_hyper_print_bt_header(fp, fake_tc.task, 
+						subsequent++);
 				back_trace(bt);
 			}
 		} else {
@@ -1794,7 +1798,8 @@
 				fake_tc.task = XEN_HYPER_VCPU_LAST_CONTEXT()->vcpu;
 			}
 			BT_SETUP(&fake_tc);
-			xen_hyper_print_bt_header(fp, fake_tc.task, 0);
+			if (!BT_REFERENCE_CHECK(bt))
+				xen_hyper_print_bt_header(fp, fake_tc.task, 0);
 			back_trace(bt);
 		}
 		return;
@@ -2080,7 +2085,10 @@
 		goto complete_trace;
 
 	if (BT_REFERENCE_FOUND(bt)) {
-		print_task_header(fp, task_to_context(bt->task), 0);
+		if (XEN_HYPER_MODE())
+			xen_hyper_print_bt_header(fp, bt->task, 0);
+		else
+			print_task_header(fp, task_to_context(bt->task), 0);
 		BCOPY(&btsave, bt, sizeof(struct bt_info));
 		bt->ref = NULL;
 		machdep->back_trace(bt);
--- xen_hyper_global_data.c.orig	2008-09-29 16:08:06.000000000 -0400
+++ xen_hyper_global_data.c	2008-09-29 16:06:32.000000000 -0400
@@ -74,7 +74,6 @@
 	{"eval",    cmd_eval,    help_eval,    0},
 	{"exit",    cmd_quit,    help_exit,    0},
 	{"extend",  cmd_extend,  help_extend,  0},
-	{"foreach", cmd_foreach, help_foreach, 0},
 	{"gdb",     cmd_gdb,     help_gdb,     0},
         {"help",    xen_hyper_cmd_help,     help_help,              0},
 	{"list",    cmd_list,    help__list,   0},
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux