xen/21705-trace-printk.patch
Charles Arnold ff4b346ede - bnc#620694 - Xen yast vm-install for existing paravirtualized
disk fails with UnboundLocalError: local variable 'dev_type' 
  referenced before assignment 
  21678-xend-mac-fix.patch

- bnc#586221 - cannot add DomU with USB host controller defined
  domu-usb-controller.patch (Chun Yan Liu)

- Upstream patches from Jan
  21151-trace-bounds-check.patch
  21627-cpuidle-wrap.patch
  21643-vmx-vpmu-pmc-offset.patch
  21682-trace-buffer-range.patch
  21683-vtd-kill-timer-conditional.patch
  21693-memevent-64bit-only.patch
  21695-trace-t_info-readonly.patch
  21698-x86-pirq-range-check.patch
  21699-p2m-query-for-type-change.patch
  21700-32on64-vm86-gpf.patch
  21705-trace-printk.patch
  21706-trace-security.patch
  21712-amd-osvw.patch
  21744-x86-cpufreq-range-check.patch

- bnc #599550 - Xen cannot distinguish the status of 'pause'
  addcommand_domstate.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=63
2010-07-14 22:43:11 +00:00

52 lines
1.8 KiB
Diff

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1278093217 -3600
# Node ID 19f4d637a52b8723ac1fbcf666c146951bee8e57
# Parent 1390e2ab45c7b63d79ba9496d609cf59af4b44ee
trace: adjust printk()s
They should be lower level or rate limited.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -137,7 +137,7 @@ static int alloc_trace_bufs(void)
}
t_info->tbuf_size = opt_tbuf_size;
- printk("tbuf_size %d\n", t_info->tbuf_size);
+ printk(XENLOG_INFO "tbuf_size %d\n", t_info->tbuf_size);
nr_pages = opt_tbuf_size;
order = get_order_from_pages(nr_pages);
@@ -194,7 +194,7 @@ static int alloc_trace_bufs(void)
/* Write list first, then write per-cpu offset. */
wmb();
t_info->mfn_offset[cpu]=offset;
- printk("p%d mfn %"PRIx32" offset %d\n",
+ printk(XENLOG_INFO "p%d mfn %"PRIx32" offset %d\n",
cpu, mfn, offset);
offset+=i;
}
@@ -489,12 +489,13 @@ static inline int __insert_record(struct
/* Double-check once more that we have enough space.
* Don't bugcheck here, in case the userland tool is doing
* something stupid. */
- if ( calc_bytes_avail(buf) < rec_size )
+ next = calc_bytes_avail(buf);
+ if ( next < rec_size )
{
- printk("%s: %u bytes left (%u - ((%u - %u) %% %u) recsize %u.\n",
- __func__,
- calc_bytes_avail(buf),
- data_size, buf->prod, buf->cons, data_size, rec_size);
+ if ( printk_ratelimit() )
+ printk(XENLOG_WARNING
+ "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n",
+ __func__, next, data_size, buf->prod, buf->cons, rec_size);
return 0;
}
rmb();