ia64/xen-unstable

changeset 11192:88e8abee7575

[HVM] Allow xenbus to run in an HVM guest.
Signed-off-by: Steven Smith <ssmith@xensource.com>
author kfraser@localhost.localdomain
date Thu Aug 17 16:32:30 2006 +0100 (2006-08-17)
parents 2d734ac9ec85
children 8f2fee2c452c
files linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c unmodified_drivers/linux-2.6/Makefile unmodified_drivers/linux-2.6/mkbuildtree unmodified_drivers/linux-2.6/xenbus/Kbuild
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Thu Aug 17 16:29:21 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Thu Aug 17 16:32:30 2006 +0100
     1.3 @@ -45,12 +45,14 @@
     1.4  
     1.5  #include <asm/io.h>
     1.6  #include <asm/page.h>
     1.7 +#include <asm/maddr.h>
     1.8  #include <asm/pgtable.h>
     1.9  #include <asm/hypervisor.h>
    1.10  #include <xen/xenbus.h>
    1.11  #include <xen/xen_proc.h>
    1.12  #include <xen/evtchn.h>
    1.13  #include <xen/features.h>
    1.14 +#include <xen/hvm.h>
    1.15  
    1.16  #include "xenbus_comms.h"
    1.17  
    1.18 @@ -1015,13 +1017,21 @@ static int __init xenbus_probe_init(void
    1.19  		if (xsd_port_intf)
    1.20  			xsd_port_intf->read_proc = xsd_port_read;
    1.21  #endif
    1.22 +		xen_store_interface = mfn_to_virt(xen_store_mfn);
    1.23  	} else {
    1.24  		xenstored_ready = 1;
    1.25 +#ifdef CONFIG_XEN
    1.26  		xen_store_evtchn = xen_start_info->store_evtchn;
    1.27  		xen_store_mfn = xen_start_info->store_mfn;
    1.28 +		xen_store_interface = mfn_to_virt(xen_store_mfn);
    1.29 +#else
    1.30 +		xen_store_evtchn = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN);
    1.31 +		xen_store_mfn = hvm_get_parameter(HVM_PARAM_STORE_PFN);
    1.32 +		xen_store_interface = ioremap(xen_store_mfn << PAGE_SHIFT,
    1.33 +					      PAGE_SIZE);
    1.34 +#endif
    1.35  	}
    1.36  
    1.37 -	xen_store_interface = mfn_to_virt(xen_store_mfn);
    1.38  
    1.39  	xenbus_dev_init();
    1.40  
     2.1 --- a/unmodified_drivers/linux-2.6/Makefile	Thu Aug 17 16:29:21 2006 +0100
     2.2 +++ b/unmodified_drivers/linux-2.6/Makefile	Thu Aug 17 16:32:30 2006 +0100
     2.3 @@ -1,3 +1,4 @@
     2.4  include $(M)/overrides.mk
     2.5  
     2.6  obj-m += platform-pci/
     2.7 +obj-m += xenbus/
     3.1 --- a/unmodified_drivers/linux-2.6/mkbuildtree	Thu Aug 17 16:29:21 2006 +0100
     3.2 +++ b/unmodified_drivers/linux-2.6/mkbuildtree	Thu Aug 17 16:32:30 2006 +0100
     3.3 @@ -5,8 +5,15 @@ C=$PWD
     3.4  XEN=$C/../../xen
     3.5  XL=$C/../../linux-2.6-xen-sparse
     3.6  
     3.7 +for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
     3.8 +    if ! echo $d | egrep -q back; then
     3.9 +        lndir $d $(basename $d) > /dev/null 2>&1
    3.10 +    fi
    3.11 +done
    3.12 +
    3.13  ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
    3.14  ln -sf ${XL}/drivers/xen/core/features.c platform-pci
    3.15 +ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus
    3.16  
    3.17  mkdir -p include
    3.18  mkdir -p include/xen
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/unmodified_drivers/linux-2.6/xenbus/Kbuild	Thu Aug 17 16:32:30 2006 +0100
     4.3 @@ -0,0 +1,10 @@
     4.4 +include $(M)/overrides.mk
     4.5 +
     4.6 +obj-m	+= xenbus.o
     4.7 +xenbus-objs =
     4.8 +xenbus-objs += xenbus_comms.o
     4.9 +xenbus-objs += xenbus_xs.o
    4.10 +xenbus-objs += xenbus_probe.o 
    4.11 +xenbus-objs += xenbus_dev.o 
    4.12 +xenbus-objs += xenbus_client.o 
    4.13 +xenbus-objs += xen_proc.o