@@ -327,6 +327,7 @@ static void __cpuinit gicv2_hyp_init(void)
vtr = readl_gich(GICH_VTR);
nr_lrs = (vtr & GICH_V2_VTR_NRLRGS) + 1;
gicv2_info.nr_lrs = nr_lrs;
+ gicv2_info.nr_lrs = 1;
writel_gich(GICH_MISR_EOI, GICH_MISR);
}
@@ -488,6 +489,16 @@ static void gicv2_write_lr(int lr, const struct gic_lr *lr_reg)
static void gicv2_hcr_status(uint32_t flag, bool_t status)
{
+ uint32_t lr = readl_gich(GICH_LR + 0);
+
+ if ( status )
+ lr |= GICH_V2_LR_MAINTENANCE_IRQ;
+ else
+ lr &= ~GICH_V2_LR_MAINTENANCE_IRQ;
+
+ writel_gich(lr, GICH_LR + 0);
+
+#if 0
uint32_t hcr = readl_gich(GICH_HCR);
if ( status )
@@ -496,6 +507,7 @@ static void gicv2_hcr_status(uint32_t flag, bool_t status)
hcr &= (~flag);
writel_gich(hcr, GICH_HCR);
+#endif
}
static unsigned int gicv2_read_vmcr_priority(void)
@@ -599,6 +599,7 @@ static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *r
* on return to guest that is going to clear the old LRs and inject
* new interrupts.
*/
+ gdprintk(XENLOG_DEBUG, "\n");
}
void gic_dump_info(struct vcpu *v)