|
| unsigned long | extract_bytes (u64 data, unsigned int offset, unsigned int num) |
| |
| u64 | update_64bit_reg (u64 reg, unsigned int offset, unsigned int len, unsigned long val) |
| |
| bool | vgic_has_its (struct kvm *kvm) |
| |
| bool | vgic_supports_direct_msis (struct kvm *kvm) |
| |
| static unsigned long | vgic_mmio_read_v3_misc (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static void | vgic_mmio_write_v3_misc (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| static int | vgic_mmio_uaccess_write_v3_misc (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| static unsigned long | vgic_mmio_read_irouter (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static void | vgic_mmio_write_irouter (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| bool | vgic_lpis_enabled (struct kvm_vcpu *vcpu) |
| |
| static unsigned long | vgic_mmio_read_v3r_ctlr (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static void | vgic_mmio_write_v3r_ctlr (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| static bool | vgic_mmio_vcpu_rdist_is_last (struct kvm_vcpu *vcpu) |
| |
| static unsigned long | vgic_mmio_read_v3r_typer (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static unsigned long | vgic_mmio_read_v3r_iidr (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static unsigned long | vgic_mmio_read_v3_idregs (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static int | vgic_v3_uaccess_write_pending (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| u64 | vgic_sanitise_shareability (u64 field) |
| |
| u64 | vgic_sanitise_inner_cacheability (u64 field) |
| |
| u64 | vgic_sanitise_outer_cacheability (u64 field) |
| |
| u64 | vgic_sanitise_field (u64 reg, u64 field_mask, int field_shift, u64(*sanitise_fn)(u64)) |
| |
| static u64 | vgic_sanitise_pendbaser (u64 reg) |
| |
| static u64 | vgic_sanitise_propbaser (u64 reg) |
| |
| static unsigned long | vgic_mmio_read_propbase (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static void | vgic_mmio_write_propbase (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| static unsigned long | vgic_mmio_read_pendbase (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static void | vgic_mmio_write_pendbase (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| static unsigned long | vgic_mmio_read_sync (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len) |
| |
| static void | vgic_set_rdist_busy (struct kvm_vcpu *vcpu, bool busy) |
| |
| static void | vgic_mmio_write_invlpi (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| static void | vgic_mmio_write_invall (struct kvm_vcpu *vcpu, gpa_t addr, unsigned int len, unsigned long val) |
| |
| unsigned int | vgic_v3_init_dist_iodev (struct vgic_io_device *dev) |
| |
| int | vgic_register_redist_iodev (struct kvm_vcpu *vcpu) |
| |
| void | vgic_unregister_redist_iodev (struct kvm_vcpu *vcpu) |
| |
| static int | vgic_register_all_redist_iodevs (struct kvm *kvm) |
| |
| static int | vgic_v3_alloc_redist_region (struct kvm *kvm, uint32_t index, gpa_t base, uint32_t count) |
| |
| void | vgic_v3_free_redist_region (struct vgic_redist_region *rdreg) |
| |
| int | vgic_v3_set_redist_base (struct kvm *kvm, u32 index, u64 addr, u32 count) |
| |
| int | vgic_v3_has_attr_regs (struct kvm_device *dev, struct kvm_device_attr *attr) |
| |
| static void | vgic_v3_queue_sgi (struct kvm_vcpu *vcpu, u32 sgi, bool allow_group1) |
| |
| void | vgic_v3_dispatch_sgi (struct kvm_vcpu *vcpu, u64 reg, bool allow_group1) |
| |
| int | vgic_v3_dist_uaccess (struct kvm_vcpu *vcpu, bool is_write, int offset, u32 *val) |
| |
| int | vgic_v3_redist_uaccess (struct kvm_vcpu *vcpu, bool is_write, int offset, u32 *val) |
| |
| int | vgic_v3_line_level_info_uaccess (struct kvm_vcpu *vcpu, bool is_write, u32 intid, u32 *val) |
| |
| void vgic_v3_dispatch_sgi |
( |
struct kvm_vcpu * |
vcpu, |
|
|
u64 |
reg, |
|
|
bool |
allow_group1 |
|
) |
| |
vgic_v3_dispatch_sgi - handle SGI requests from VCPUs @vcpu: The VCPU requesting a SGI @reg: The value written into ICC_{ASGI1,SGI0,SGI1}R by that VCPU @allow_group1: Does the sysreg access allow generation of G1 SGIs
With GICv3 (and ARE=1) CPUs trigger SGIs by writing to a system register. This will trap in sys_regs.c and call this function. This ICC_SGI1R_EL1 register contains the upper three affinity levels of the target processors as well as a bitmask of 16 Aff0 CPUs.
If the interrupt routing mode bit is not set, we iterate over the Aff0 bits and signal the VCPUs matching the provided Aff{3,2,1}.
If this bit is set, we signal all, but not the calling VCPU.
Definition at line 1058 of file vgic-mmio-v3.c.
1060 struct kvm *kvm = vcpu->kvm;
1061 struct kvm_vcpu *c_vcpu;
1062 unsigned long target_cpus;
1067 sgi = FIELD_GET(ICC_SGI1R_SGI_ID_MASK, reg);
1070 if (unlikely(reg & BIT_ULL(ICC_SGI1R_IRQ_ROUTING_MODE_BIT))) {
1071 kvm_for_each_vcpu(c, c_vcpu, kvm) {
1086 target_cpus = FIELD_GET(ICC_SGI1R_TARGET_LIST_MASK, reg);
1088 for_each_set_bit(aff0, &target_cpus, hweight_long(ICC_SGI1R_TARGET_LIST_MASK)) {
static void vgic_v3_queue_sgi(struct kvm_vcpu *vcpu, u32 sgi, bool allow_group1)
#define SGI_AFFINITY_LEVEL(reg, level)