Map the XenStore shared page for non-domain0.

This commit is contained in:
bouyer 2006-03-06 20:32:28 +00:00
parent f0dc72de02
commit 8adab3e01b
3 changed files with 16 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.6 2006/01/15 22:09:51 bouyer Exp $
# $NetBSD: genassym.cf,v 1.7 2006/03/06 20:32:28 bouyer Exp $
# NetBSD: genassym.cf,v 1.40 2004/02/20 17:35:01 yamt Exp
#
@ -316,6 +316,7 @@ ifdef XEN3
define START_INFO_SHARED_INFO offsetof(struct start_info, shared_info)
define START_INFO_FLAGS offsetof(struct start_info, flags)
define START_INFO_CONSOLE_MFN offsetof(struct start_info, console_mfn)
define START_INFO_STORE_MFN offsetof(struct start_info, store_mfn)
else
define START_INFO_SHARED_INFO offsetof(start_info_t, shared_info)
endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.S,v 1.14 2006/01/15 22:09:51 bouyer Exp $ */
/* $NetBSD: locore.S,v 1.15 2006/03/06 20:32:28 bouyer Exp $ */
/* NetBSD: locore.S,v 1.31 2004/08/26 10:12:33 junyoung Exp */
/*
@ -420,6 +420,11 @@ start:
orl $(PG_V|PG_RW), %eax;
movl %eax, (%ebx)
addl $4,%ebx
movl RELOC(start_info_union)+START_INFO_STORE_MFN,%eax
shll $PGSHIFT,%eax
orl $(PG_V|PG_RW), %eax;
movl %eax, (%ebx)
addl $4,%ebx
1:
#endif
@ -448,12 +453,14 @@ start:
movl %edx,_C_LABEL(HYPERVISOR_shared_info)
addl $PAGE_SIZE,%edx # shared_inf
#ifdef XEN3
/* set console page virtual address if not domain0 */
/* set console and xenstore pages virtual address if not domain0 */
movl RELOC(start_info_union)+START_INFO_FLAGS,%eax
testl $SIF_INITDOMAIN, %eax;
jnz 1f
movl %edx,_C_LABEL(xencons_interface)
addl $PAGE_SIZE,%edx # xencons_interface
movl %edx,_C_LABEL(xenstore_interface)
addl $PAGE_SIZE,%edx # xenstore_interface
1:
#endif
movl %edx,_C_LABEL(atdevbase)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.24 2006/01/15 22:09:51 bouyer Exp $ */
/* $NetBSD: machdep.c,v 1.25 2006/03/06 20:32:28 bouyer Exp $ */
/* NetBSD: machdep.c,v 1.559 2004/07/22 15:12:46 mycroft Exp */
/*-
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2006/01/15 22:09:51 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 2006/03/06 20:32:28 bouyer Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@ -1490,8 +1490,11 @@ init386(paddr_t first_avail)
HYPERVISOR_shared_info->wc_sec));
if ((xen_start_info.flags & SIF_INITDOMAIN) == 0) {
extern volatile struct xencons_interface *xencons_interface;
extern struct xenstore_domain_interface *xenstore_interface;
XENPRINTK(("xencons %p (%x)\n",
xencons_interface, xen_start_info.console_mfn));
XENPRINTK(("xenstore %p (%x)\n",
xenstore_interface, xen_start_info.store_mfn));
}
#endif
#ifdef XENDEBUG_LOW