aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2004-05-12 09:12:53 +0000
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2004-05-12 09:12:53 +0000
commit0c0d7451988066ceea65cdd0e17070b0a476fd2a (patch)
tree1b1088dc7fe9f0270a3ba83764dcb4aba4df4fec /xen
parent303ca01553d72c480448a085c62854bc3ec1d4d5 (diff)
parente3d8d5ffdd61b1de7510db9c883f96f2a95238ae (diff)
downloadxen-0c0d7451988066ceea65cdd0e17070b0a476fd2a.tar.gz
xen-0c0d7451988066ceea65cdd0e17070b0a476fd2a.tar.bz2
xen-0c0d7451988066ceea65cdd0e17070b0a476fd2a.zip
bitkeeper revision 1.900 (40a1ea95C9xhe9YOF_J5uno7phAXWg)
Merge
Diffstat (limited to 'xen')
-rw-r--r--xen/arch/i386/setup.c3
-rw-r--r--xen/common/kernel.c3
-rw-r--r--xen/common/trace.c10
3 files changed, 11 insertions, 5 deletions
diff --git a/xen/arch/i386/setup.c b/xen/arch/i386/setup.c
index c9eccfeb1d..ebd68d3801 100644
--- a/xen/arch/i386/setup.c
+++ b/xen/arch/i386/setup.c
@@ -15,7 +15,6 @@
#include <asm/desc.h>
#include <asm/domain_page.h>
#include <asm/pdb.h>
-#include <xen/trace.h>
char ignore_irq13; /* set if exception 16 works */
struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
@@ -451,6 +450,4 @@ void __init start_of_day(void)
#endif
watchdog_on = 1;
-
- init_trace_bufs();
}
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index b33524928d..76747fa981 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -32,6 +32,7 @@
#include <xen/net_headers.h>
#include <xen/serial.h>
#include <xen/shadow.h>
+#include <xen/trace.h>
kmem_cache_t *task_struct_cachep;
@@ -291,6 +292,8 @@ void cmain(unsigned long magic, multiboot_info_t *mbi)
add_to_domain_alloc_list(__pa(frame_table) + frame_table_size,
dom0_memory_start);
+ init_trace_bufs();
+
wake_up(new_dom);
startup_cpu_idle_loop();
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 59cefadf9a..0140e7444a 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -53,6 +53,7 @@ void init_trace_bufs(void)
unsigned long nr_pages;
char *rawbuf;
struct t_buf *buf;
+ struct task_struct *dom0;
if ( opt_tbuf_size == 0 )
{
@@ -69,10 +70,15 @@ void init_trace_bufs(void)
return;
}
- /* share pages so that xentrace can map them */
+ /* Share pages so that xentrace can map them. */
+
+ dom0 = find_domain_by_id(0);
+
for( i = 0; i < nr_pages; i++)
- SHARE_PFN_WITH_DOMAIN(virt_to_page(rawbuf+(i*PAGE_SIZE)), 0);
+ SHARE_PFN_WITH_DOMAIN(virt_to_page(rawbuf+(i*PAGE_SIZE)), dom0);
+ put_task_struct(dom0);
+
for ( i = 0; i < smp_num_cpus; i++ )
{
buf = t_bufs[i] = (struct t_buf *)&rawbuf[i*opt_tbuf_size*PAGE_SIZE];