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

[Xen-devel] [PATCH 5/5] xen: Read data correctly from dynamically allocated console ring too



console ring is dynamically allocated since 19543 changeset (New option
conring_size= to allow larger console ring). Take into account that
and read data correctly from it too.

Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>

diff -Npru crash-6.0.8.orig/xen_hyper_command.c crash-6.0.8/xen_hyper_command.c
--- crash-6.0.8.orig/xen_hyper_command.c        2012-06-29 16:59:18.000000000 
+0200
+++ crash-6.0.8/xen_hyper_command.c     2012-07-05 16:22:35.000000000 +0200
@@ -590,24 +590,31 @@ xen_hyper_dump_log(void)
        ulong conring;
        char *buf;
        char last;
+       uint32_t conring_size;
 
-       conring = symbol_value("conring");
+       get_symbol_data("conring", sizeof(ulong), &conring);
        get_symbol_data("conringc", sizeof(uint), &conringc);
        get_symbol_data("conringp", sizeof(uint), &conringp);
+
+       if (symbol_exists("conring_size"))
+               get_symbol_data("conring_size", sizeof(uint32_t), 
&conring_size);
+       else
+               conring_size = XEN_HYPER_CONRING_SIZE;
+
        warp = FALSE;
-       if (conringp >= XEN_HYPER_CONRING_SIZE) {
-               if ((start = conringp & (XEN_HYPER_CONRING_SIZE - 1))) {
+       if (conringp >= conring_size) {
+               if ((start = conringp & (conring_size - 1))) {
                        warp = TRUE;
                }
        } else {
                start = 0;
        }
 
-       buf = GETBUF(XEN_HYPER_CONRING_SIZE);
-       readmem(conring, KVADDR, buf, XEN_HYPER_CONRING_SIZE,
+       buf = GETBUF(conring_size);
+       readmem(conring, KVADDR, buf, conring_size,
                "conring contents", FAULT_ON_ERROR);
        idx = start;
-       len = XEN_HYPER_CONRING_SIZE;
+       len = conring_size;
        last = 0;
 
 wrap_around:

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.