提交 667a87a9 编写于 作者: M Marc Zyngier

KVM: arm/arm64: vgic-v2: Make GICD_SGIR quicker to hit

The GICD_SGIR register lives a long way from the beginning of
the handler array, which is searched linearly. As this is hit
pretty often, let's move it up. This saves us some precious
cycles when the guest is generating IPIs.
Acked-by: NChristoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
上级 cc1daf0b
...@@ -320,6 +320,11 @@ static bool handle_mmio_sgi_clear(struct kvm_vcpu *vcpu, ...@@ -320,6 +320,11 @@ static bool handle_mmio_sgi_clear(struct kvm_vcpu *vcpu,
} }
static const struct vgic_io_range vgic_dist_ranges[] = { static const struct vgic_io_range vgic_dist_ranges[] = {
{
.base = GIC_DIST_SOFTINT,
.len = 4,
.handle_mmio = handle_mmio_sgi_reg,
},
{ {
.base = GIC_DIST_CTRL, .base = GIC_DIST_CTRL,
.len = 12, .len = 12,
...@@ -386,11 +391,6 @@ static const struct vgic_io_range vgic_dist_ranges[] = { ...@@ -386,11 +391,6 @@ static const struct vgic_io_range vgic_dist_ranges[] = {
.bits_per_irq = 2, .bits_per_irq = 2,
.handle_mmio = handle_mmio_cfg_reg, .handle_mmio = handle_mmio_cfg_reg,
}, },
{
.base = GIC_DIST_SOFTINT,
.len = 4,
.handle_mmio = handle_mmio_sgi_reg,
},
{ {
.base = GIC_DIST_SGI_PENDING_CLEAR, .base = GIC_DIST_SGI_PENDING_CLEAR,
.len = VGIC_NR_SGIS, .len = VGIC_NR_SGIS,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册