[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RESEND 11/14] libxl/arm: Initialize domain param HVM_PARAM_CALLBACK_IRQ



From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>

If Xen guest boots with ACPI, the guest kernel will get the event
channel interrupt information via domain param HVM_PARAM_CALLBACK_IRQ.
Initialize that domain param.

Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
 tools/libxl/libxl_arm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 1bef9b0..13259f8 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -1105,6 +1105,7 @@ static int prepare_acpi(libxl__gc *gc, 
libxl_domain_build_info *info,
 {
     const libxl_version_info *vers;
     int rc;
+    uint64_t val;
 
     /* convenience aliases */
     xc_domain_configuration_t *xc_config = &state->config;
@@ -1130,7 +1131,12 @@ static int prepare_acpi(libxl__gc *gc, 
libxl_domain_build_info *info,
     make_acpi_xsdt(gc, dom);
     make_acpi_rsdp(gc, dom);
 
-    return 0;
+    /* Set the value of domain param HVM_PARAM_CALLBACK_IRQ. */
+    val = (uint64_t)HVM_PARAM_CALLBACK_TYPE_PPI << 56;
+    val |= (2 << 8); /* Active-low level-sensitive  */
+    val |= GUEST_EVTCHN_PPI & 0xff;
+    return xc_hvm_param_set(dom->xch, dom->guest_domid, HVM_PARAM_CALLBACK_IRQ,
+                            val);
 }
 
 int libxl__arch_domain_init_hw_description(libxl__gc *gc,
-- 
2.0.4



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.