Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bdf5025 authored by Marc Zyngier's avatar Marc Zyngier
Browse files

irqchip/gic-v3: Advertise GICv4 support to KVM



As KVM needs to know about the availability of GICv4 to enable
direct injection of interrupts, let's advertise the feature in
the gic_kvm_info structure.

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 3d63cb53
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1159,6 +1159,7 @@ static void __init gic_of_setup_kvm_info(struct device_node *node)
	if (!ret)
		gic_v3_kvm_info.vcpu = r;

	gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis;
	gic_set_kvm_info(&gic_v3_kvm_info);
}

@@ -1452,6 +1453,7 @@ static void __init gic_acpi_setup_kvm_info(void)
		vcpu->end = vcpu->start + ACPI_GICV2_VCPU_MEM_SIZE - 1;
	}

	gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis;
	gic_set_kvm_info(&gic_v3_kvm_info);
}

+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ struct gic_kvm_info {
	unsigned int	maint_irq;
	/* Virtual control interface */
	struct resource vctrl;
	/* vlpi support */
	bool		has_v4;
};

const struct gic_kvm_info *gic_get_kvm_info(void);