|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: no need to set HCR_VI when using the vgic to inject irqs
commit 6f91502be64a05d0635454d629118b96ae38b50f
Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
AuthorDate: Tue Jun 10 15:07:09 2014 +0100
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Jun 18 11:29:55 2014 +0100
xen/arm: no need to set HCR_VI when using the vgic to inject irqs
HCR_VI forces the guest to resume execution in IRQ mode and can actually
cause spurious interrupt injections.
The GIC is capable of injecting interrupts into the guest and causing it
to switch to IRQ mode automatically, without any need for the hypervisor
to set HCR_VI manually.
See ARM ARM B1.8.11 and chapter 5.4 of the Generic Interrupt Controller
Architecture Specification.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
xen/arch/arm/gic.c | 20 --------------------
1 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index ff1addc..6b2653f 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -649,22 +649,6 @@ void gic_clear_pending_irqs(struct vcpu *v)
spin_unlock_irqrestore(&gic.lock, flags);
}
-static void gic_inject_irq_start(void)
-{
- register_t hcr = READ_SYSREG(HCR_EL2);
- WRITE_SYSREG(hcr | HCR_VI, HCR_EL2);
- isb();
-}
-
-static void gic_inject_irq_stop(void)
-{
- register_t hcr = READ_SYSREG(HCR_EL2);
- if (hcr & HCR_VI) {
- WRITE_SYSREG(hcr & ~HCR_VI, HCR_EL2);
- isb();
- }
-}
-
int gic_events_need_delivery(void)
{
return (!list_empty(¤t->arch.vgic.lr_pending) ||
@@ -677,10 +661,6 @@ void gic_inject(void)
vgic_vcpu_inject_irq(current, current->domain->arch.evtchn_irq, 1);
gic_restore_pending_irqs(current);
- if (!gic_events_need_delivery())
- gic_inject_irq_stop();
- else
- gic_inject_irq_start();
}
static void do_sgi(struct cpu_user_regs *regs, int othercpu, enum gic_sgi sgi)
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |