diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-08-17 16:32:30 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-08-17 16:32:30 +0100 |
commit | 05592e02ad24568f053867afdb98ff3aa0323b54 (patch) | |
tree | bd7b5b8e583b1538798ebfe1eae2ebb428e45ed7 | |
parent | 66f06183699015de464d8f5c79e6233ad48a9d2d (diff) | |
download | xen-05592e02ad24568f053867afdb98ff3aa0323b54.tar.gz xen-05592e02ad24568f053867afdb98ff3aa0323b54.tar.bz2 xen-05592e02ad24568f053867afdb98ff3aa0323b54.zip |
[HVM] Allow xenbus to run in an HVM guest.
Signed-off-by: Steven Smith <ssmith@xensource.com>
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c | 12 | ||||
-rw-r--r-- | unmodified_drivers/linux-2.6/Makefile | 1 | ||||
-rw-r--r-- | unmodified_drivers/linux-2.6/mkbuildtree | 7 | ||||
-rw-r--r-- | unmodified_drivers/linux-2.6/xenbus/Kbuild | 10 |
4 files changed, 29 insertions, 1 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 9668d6d7ae..a508e76461 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -45,12 +45,14 @@ #include <asm/io.h> #include <asm/page.h> +#include <asm/maddr.h> #include <asm/pgtable.h> #include <asm/hypervisor.h> #include <xen/xenbus.h> #include <xen/xen_proc.h> #include <xen/evtchn.h> #include <xen/features.h> +#include <xen/hvm.h> #include "xenbus_comms.h" @@ -1015,13 +1017,21 @@ static int __init xenbus_probe_init(void) if (xsd_port_intf) xsd_port_intf->read_proc = xsd_port_read; #endif + xen_store_interface = mfn_to_virt(xen_store_mfn); } else { xenstored_ready = 1; +#ifdef CONFIG_XEN xen_store_evtchn = xen_start_info->store_evtchn; xen_store_mfn = xen_start_info->store_mfn; + xen_store_interface = mfn_to_virt(xen_store_mfn); +#else + xen_store_evtchn = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN); + xen_store_mfn = hvm_get_parameter(HVM_PARAM_STORE_PFN); + xen_store_interface = ioremap(xen_store_mfn << PAGE_SHIFT, + PAGE_SIZE); +#endif } - xen_store_interface = mfn_to_virt(xen_store_mfn); xenbus_dev_init(); diff --git a/unmodified_drivers/linux-2.6/Makefile b/unmodified_drivers/linux-2.6/Makefile index 37353776d7..a7a52f8f9e 100644 --- a/unmodified_drivers/linux-2.6/Makefile +++ b/unmodified_drivers/linux-2.6/Makefile @@ -1,3 +1,4 @@ include $(M)/overrides.mk obj-m += platform-pci/ +obj-m += xenbus/ diff --git a/unmodified_drivers/linux-2.6/mkbuildtree b/unmodified_drivers/linux-2.6/mkbuildtree index 6002b2722d..382a493796 100644 --- a/unmodified_drivers/linux-2.6/mkbuildtree +++ b/unmodified_drivers/linux-2.6/mkbuildtree @@ -5,8 +5,15 @@ C=$PWD XEN=$C/../../xen XL=$C/../../linux-2.6-xen-sparse +for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do + if ! echo $d | egrep -q back; then + lndir $d $(basename $d) > /dev/null 2>&1 + fi +done + ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci ln -sf ${XL}/drivers/xen/core/features.c platform-pci +ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus mkdir -p include mkdir -p include/xen diff --git a/unmodified_drivers/linux-2.6/xenbus/Kbuild b/unmodified_drivers/linux-2.6/xenbus/Kbuild new file mode 100644 index 0000000000..1a463ab6e3 --- /dev/null +++ b/unmodified_drivers/linux-2.6/xenbus/Kbuild @@ -0,0 +1,10 @@ +include $(M)/overrides.mk + +obj-m += xenbus.o +xenbus-objs = +xenbus-objs += xenbus_comms.o +xenbus-objs += xenbus_xs.o +xenbus-objs += xenbus_probe.o +xenbus-objs += xenbus_dev.o +xenbus-objs += xenbus_client.o +xenbus-objs += xen_proc.o |