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

Re: [Minios-devel] [UNIKRAFT PATCH 5/7] plat/kvm: Implement intctrl APIs for Arm64



Hi Wei,

On 13/12/2018 09:18, Wei Chen wrote:
Before GICv2 become ready, we had marked the intctrl APIs as TODO.
Now, we have enabled the GICv2, we can implement intctrl APIs with
related GIC APIs.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
  plat/kvm/arm/intctrl.c | 25 ++++++++++++++++++-------
  plat/kvm/arm/setup.c   |  4 ++++
  2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/plat/kvm/arm/intctrl.c b/plat/kvm/arm/intctrl.c
index ac604a7..0662159 100644
--- a/plat/kvm/arm/intctrl.c
+++ b/plat/kvm/arm/intctrl.c
@@ -31,24 +31,35 @@
   *
   * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
   */
+#include <uk/assert.h>
+#include <kvm/kernel.h>
  #include <kvm/intctrl.h>
+#include <arm/cpu.h>
+#include <arm/irq.h>
+#include <arm/gic-v2.h>
void intctrl_init(void)
  {
-       // TO DO
+       int ret;
+
+       /* Initialize GIC from DTB */
+       ret = _dtb_init_gic(_libkvmplat_dtb);
+       if (ret)
+               UK_CRASH("Initialize GIC from DTB failed, ret=%d\n", ret);
+
  }
-void intctrl_ack_irq(unsigned int irq)
+void intctrl_ack_irq(uint32_t irq)
  {
-       // TO DO
+       gic_eoi_irq(irq);

I think you want this helper to be a NOP. Otherwise you may end up to EOI twice the same interrupts (see patch #7).

You can't drop the one in patch #7 because this function may not be called resulting to block the interrupts forever on that processor.

Cheers,

--
Julien Grall

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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