@@ -28,6 +28,7 @@
#include <asm/cpufeature.h>
#include <asm/domain_build.h>
#include <xsm/xsm.h>
+#include <xen/event.h>
#include <xen/irq.h>
#include <xen/grant_table.h>
@@ -2806,6 +2807,8 @@ static int __init prepare_dtb_domU(struct domain *d, struct kernel_info *kinfo)
int ret;
kinfo->phandle_gic = GUEST_PHANDLE_GIC;
+ kinfo->gnttab_start = GUEST_GNTTAB_BASE;
+ kinfo->gnttab_size = GUEST_GNTTAB_SIZE;
addrcells = GUEST_ROOT_ADDRESS_CELLS;
sizecells = GUEST_ROOT_SIZE_CELLS;
@@ -2880,6 +2883,13 @@ static int __init prepare_dtb_domU(struct domain *d, struct kernel_info *kinfo)
goto err;
}
+ if ( kinfo->dom0less_enhanced )
+ {
+ ret = make_hypervisor_node(d, kinfo, addrcells, sizecells);
+ if ( ret )
+ goto err;
+ }
+
ret = fdt_end_node(kinfo->fdt);
if ( ret < 0 )
goto err;
@@ -3146,6 +3156,25 @@ static int __init construct_domain(struct domain *d, struct kernel_info *kinfo)
return 0;
}
+static int __init alloc_xenstore_evtchn(struct domain *d)
+{
+ evtchn_alloc_unbound_t alloc;
+ int rc;
+
+ alloc.dom = d->domain_id;
+ alloc.remote_dom = hardware_domain->domain_id;
+ rc = evtchn_alloc_unbound(&alloc);
+ if ( rc )
+ {
+ printk("Failed allocating event channel for domain\n");
+ return rc;
+ }
+
+ d->arch.hvm.params[HVM_PARAM_STORE_EVTCHN] = alloc.port;
+
+ return 0;
+}
+
static int __init construct_domU(struct domain *d,
const struct dt_device_node *node)
{
@@ -3210,6 +3239,14 @@ static int __init construct_domU(struct domain *d,
if ( rc < 0 )
return rc;
+ if ( kinfo.dom0less_enhanced )
+ {
+ rc = alloc_xenstore_evtchn(d);
+ if ( rc < 0 )
+ return rc;
+ d->arch.hvm.params[HVM_PARAM_STORE_PFN] = ~0ULL;
+ }
+
return rc;
}