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

[Xen-devel] [PATCH v7 20/22] xen/acpi: Fix event-channel interrupt when booting with ACPI



Store the event-channel interrupt number and flag in HVM parameter
HVM_PARAM_CALLBACK_IRQ. Then Dom0 could get it through hypercall
HVMOP_get_param.

Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
Reviewed-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 xen/arch/arm/domain_build.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index f004d92..d9bc3de 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -2047,6 +2047,7 @@ static void initrd_load(struct kernel_info *kinfo)
 static void evtchn_fixup(struct domain *d, struct kernel_info *kinfo)
 {
     int res, node;
+    u64 val;
     gic_interrupt_t intr;
 
     /*
@@ -2062,6 +2063,19 @@ static void evtchn_fixup(struct domain *d, struct 
kernel_info *kinfo)
     printk("Allocating PPI %u for event channel interrupt\n",
            d->arch.evtchn_irq);
 
+    /* Set the value of domain param HVM_PARAM_CALLBACK_IRQ */
+    val = (u64)HVM_PARAM_CALLBACK_TYPE_PPI << 56;
+    val |= (2 << 8); /* Active-low level-sensitive  */
+    val |= d->arch.evtchn_irq & 0xff;
+    d->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ] = val;
+
+    /*
+     * When booting Dom0 using ACPI, Dom0 can only get the event channel
+     * interrupt via hypercall.
+     */
+    if ( !acpi_disabled )
+        return;
+
     /* Fix up "interrupts" in /hypervisor node */
     node = fdt_path_offset(kinfo->fdt, "/hypervisor");
     if ( node < 0 )
-- 
2.1.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®.