From: kfraser@localhost.localdomain Date: Thu, 17 Aug 2006 15:32:30 +0000 (+0100) Subject: [HVM] Allow xenbus to run in an HVM guest. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15710^2~59 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=05592e02ad24568f053867afdb98ff3aa0323b54;p=xen.git [HVM] Allow xenbus to run in an HVM guest. Signed-off-by: Steven Smith --- 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 #include +#include #include #include #include #include #include #include +#include #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