All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/5] vgic emulation and GICD_ITARGETSR
@ 2014-06-23 16:36 Stefano Stabellini
  2014-06-23 16:37 ` [PATCH v6 1/5] xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs Stefano Stabellini
                   ` (4 more replies)
  0 siblings, 5 replies; 34+ messages in thread
From: Stefano Stabellini @ 2014-06-23 16:36 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Ian Campbell, Stefano Stabellini

Hi all,
this patch series improves vgic emulation in relation to GICD_ITARGETSR,
and implements irq delivery to vcpus other than vcpu0.

vgic_enable_irqs and vgic_disable_irqs currently ignore the itarget
settings and just enable/disable irqs on the current vcpu. Fix their
behaviour to enable/disable irqs on the vcpu set by itarget, that is
vcpu0 for irq >= 32 initially.

Introduce a new vgic function called vgic_get_target_vcpu to retrieve
the right target vcpu (looking at itargets) and use it from do_IRQ.

Change the physical irq affinity to make physical irqs follow virtual
cpus migration.


Changes in v6:
- rebased on f7e46156a1c006a6eb5489e0227d39229eec316d;
- add ASSERT to _vgic_get_target_vcpu;
- add BUG_ON to vgic_distr_mmio_write;
- add in-code comment to _vgic_get_target_vcpu;
- move additional check on itargets writing from the second patch to
the first patch;
- sizeof(itargets) instead of 8*sizeof(itargets[0]);
- remove the unneeded cast of &target for find_first_bit;
- remove unnecessary casts to (const unsigned long *) to the arguments
of find_first_bit and find_next_bit;
- deal with migrating an irq that is inflight and still lr_pending;
- replace the dsb with smb_wmb and smb_rmb, use them to ensure the order
of accesses to GIC_IRQ_GUEST_QUEUED and GIC_IRQ_GUEST_MIGRATING;
- add in-code comments to vgic_vcpu_inject_spi and do_IRQ;
- assert that the guest irq is an SPI in vgic_vcpu_inject_spi;
- use vgic_get_target_vcpu instead of _vgic_get_target_vcpu in
arch_move_irqs;
- introduce sched_move_irqs.


Changes in v5:
- add "rename vgic_irq_rank to vgic_rank_offset";
- add "introduce vgic_rank_irq";
- improve in-code comments;
- use vgic_rank_irq;
- use bit masks to write-ignore GICD_ITARGETSR;
- introduce an version of vgic_get_target_vcpu that doesn't take the
rank lock;
- keep the rank lock while enabling/disabling irqs;
- use find_first_bit instead of find_next_bit;
- pass unsigned long to find_next_bit for alignment on aarch64;
- call vgic_get_target_vcpu instead of gic_add_to_lr_pending to add the
irq in the right inflight queue;
- add barrier and bit tests to make sure that vgic_migrate_irq and
gic_update_one_lr can run simultaneously on different cpus without
issues;
- rework the loop to identify the new vcpu when ITARGETSR is written;
- use find_first_bit instead of find_next_bit;
- prettify vgic_move_irqs;
- rename vgic_move_irqs to arch_move_irqs;
- introduce helper function irq_set_affinity.



Stefano Stabellini (5):
      xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs
      xen/arm: inflight irqs during migration
      xen/arm: support irq delivery to vcpu > 0
      xen/arm: physical irq follow virtual irq
      xen: introduce sched_move_irqs

 xen/arch/arm/gic.c           |   46 +++++++++--
 xen/arch/arm/irq.c           |    5 +-
 xen/arch/arm/vgic.c          |  179 ++++++++++++++++++++++++++++++++++++++----
 xen/common/schedule.c        |   12 ++-
 xen/include/asm-arm/domain.h |    4 +
 xen/include/asm-arm/gic.h    |    4 +
 xen/include/asm-x86/irq.h    |    2 +
 7 files changed, 228 insertions(+), 24 deletions(-)

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2014-07-03 14:43 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 16:36 [PATCH v6 0/5] vgic emulation and GICD_ITARGETSR Stefano Stabellini
2014-06-23 16:37 ` [PATCH v6 1/5] xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs Stefano Stabellini
2014-06-23 17:41   ` Julien Grall
2014-06-24 11:38     ` Stefano Stabellini
2014-06-24 12:07       ` Julien Grall
2014-06-24 18:04         ` Stefano Stabellini
2014-06-24 18:20           ` Julien Grall
2014-06-24 18:29             ` Stefano Stabellini
2014-06-27 15:17   ` Ian Campbell
2014-07-02 15:39     ` Stefano Stabellini
2014-07-02 15:58       ` Ian Campbell
2014-07-02 18:05         ` Stefano Stabellini
2014-06-23 16:37 ` [PATCH v6 2/5] xen/arm: inflight irqs during migration Stefano Stabellini
2014-06-23 20:14   ` Julien Grall
2014-06-24 11:57     ` Stefano Stabellini
2014-06-24 12:17       ` Julien Grall
2014-07-02 22:27         ` Stefano Stabellini
2014-06-27 15:37   ` Ian Campbell
2014-07-02 18:22     ` Stefano Stabellini
2014-06-27 15:40   ` Ian Campbell
2014-07-02 18:33     ` Stefano Stabellini
2014-07-03  9:29       ` Ian Campbell
2014-07-03 14:43         ` Stefano Stabellini
2014-06-23 16:37 ` [PATCH v6 3/5] xen/arm: support irq delivery to vcpu > 0 Stefano Stabellini
2014-06-24 13:33   ` Julien Grall
2014-06-27 15:42     ` Ian Campbell
2014-07-02 15:52     ` Stefano Stabellini
2014-06-23 16:37 ` [PATCH v6 4/5] xen/arm: physical irq follow virtual irq Stefano Stabellini
2014-06-24 13:43   ` Julien Grall
2014-07-02 18:14     ` Stefano Stabellini
2014-06-23 16:37 ` [PATCH v6 5/5] xen: introduce sched_move_irqs Stefano Stabellini
2014-06-24  6:38   ` Jan Beulich
2014-06-24 12:02     ` George Dunlap
2014-06-27 15:46       ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.