mbox

[Xen-devel,v12,00/10] gic and vgic fixes and improvements

Message ID alpine.DEB.2.02.1408131723250.2293@kaball.uk.xensource.com
State New
Headers show

Pull-request

git://xenbits.xen.org/people/sstabellini/xen-unstable.git gic-v12

Message

Stefano Stabellini Aug. 13, 2014, 4:29 p.m. UTC
Hi all,
this patch series is a collection of three previously sent patch series
to fix bugs in the gic/vgic and implement irq migration on arm.
They have been grouped together under Ian's suggestion.

The last versions of the series, sent separately, were:
<alpine.DEB.2.02.1407031546180.11722@kaball.uk.xensource.com>
<alpine.DEB.2.02.1406131216260.13771@kaball.uk.xensource.com>
<alpine.DEB.2.02.1406241906040.19982@kaball.uk.xensource.com>


A: Acked/Reviewed
AA    xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs
AA    xen/arm: move setting GIC_IRQ_GUEST_QUEUED earlier
A     xen/arm: inflight irqs during migration
AA    xen/arm: support irq delivery to vcpu > 0
AA    xen/arm: physical irq follow virtual irq
AAA   xen: introduce sched_move_irqs
AA    xen: remove workaround to inject evtchn_irq on irq enable
A     xen/arm: take the rank lock before accessing ipriority
A     xen: introduce bit access macros for the IRQ line status flags
AA    xen/arm: make accesses to desc->status flags atomic



Changes in v12:
- clear GIC_IRQ_GUEST_QUEUED in vgic_migrate_irq.

Changes in v11:
- fix irq calculation in vgic_v2_distr_mmio_write;
- code style fix.

Changes in v10:
- provide an implementation for x86 of arch_evtchn_inject;
- fix _IRQF_SHARED renaming;
- add in-code comment;
- fix for loop over vgic.nr_lines.

Changes in v9:
- move vgic_get_target_vcpu declaration to vgic.h;
- move _vgic_get_target_vcpu to vgic-v2.c and name it
vgic_v2_get_target_vcpu;
- introduce get_target_vcpu to vgic_ops;
- simplify the code to deal with inflight irqs while migrating irqs;
- move arch_move_irqs declaration to irq.h;
- use an arch hook to remove workaround to inject evtchn_irq on irq
enable;
- add explicit flags parameter to vgic_lock_rank and vgic_unlock_rank;
- do not rename IRQF_SHARED to IRQ_SHARED.



The following changes since commit f2ae8bfa498831ee6343d672066b898d3cd73892:

  xen: arm: Correctly handle do_sysreg exception injection from 64-bit userspace (2014-08-12 15:38:01 +0200)

are available in the git repository at:

  git://xenbits.xen.org/people/sstabellini/xen-unstable.git gic-v12

for you to fetch changes up to 5f8c7758928ce26c96fd536b1e0835dde7070542:

  xen/arm: make accesses to desc->status flags atomic (2014-08-13 16:19:07 +0000)

----------------------------------------------------------------
Stefano Stabellini (10):
      xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs
      xen/arm: move setting GIC_IRQ_GUEST_QUEUED earlier
      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: remove workaround to inject evtchn_irq on irq enable
      xen/arm: take the rank lock before accessing ipriority
      xen: introduce bit access macros for the IRQ line status flags
      xen/arm: make accesses to desc->status flags atomic

 xen/arch/arm/gic-v2.c      |   19 ++++--
 xen/arch/arm/gic.c         |   21 +++++--
 xen/arch/arm/irq.c         |   44 +++++++------
 xen/arch/arm/vgic-v2.c     |  138 +++++++++++++++++++++++++++++------------
 xen/arch/arm/vgic.c        |  147 ++++++++++++++++++++++++++++++++++++--------
 xen/arch/x86/hvm/irq.c     |    6 ++
 xen/common/domain.c        |    1 +
 xen/common/schedule.c      |   12 +++-
 xen/include/asm-arm/irq.h  |    3 +
 xen/include/asm-arm/vgic.h |   16 ++++-
 xen/include/asm-x86/irq.h  |    2 +
 xen/include/xen/event.h    |    3 +
 xen/include/xen/irq.h      |   32 +++++++---
 13 files changed, 337 insertions(+), 107 deletions(-)

Comments

Ian Campbell Sept. 3, 2014, 4:19 p.m. UTC | #1
On Wed, 2014-08-13 at 17:29 +0100, Stefano Stabellini wrote:
> this patch series is a collection of three previously sent patch series
> to fix bugs in the gic/vgic and implement irq migration on arm.
> They have been grouped together under Ian's suggestion.

All applied, thanks.

A few patches here touch (v)gic-v2.c, which I assume means some sort of
update to the gic v3 series is going to be needed? Can you offer any
advice to Vijay (ccd)?

From "git log --oneline origin/staging..HEAD -- xen/arch/arm/*gic-v2.c"
these seem to be:

50d8fe8 xen/arm: make accesses to desc->status flags atomic
446df2f xen/arm: take the rank lock before accessing ipriority

        These two should be trivial to carry over.

5bd62a7 xen/arm: physical irq follow virtual irq

        gic v3 version will be different, but should be pretty easy?

6e42345 xen/arm: inflight irqs during migration

        This one looks a bit scary, and would need similar handling for
        the IROUTER stuff, I think?

5b3a817 xen/arm: observe itargets setting in vgic_enable_irqs and vgic

        A new vgic_ops hook needs implementing.

Ian.
Vijay Kilari Sept. 4, 2014, 1:19 p.m. UTC | #2
Hi Ian,

On Wed, Sep 3, 2014 at 9:49 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>
> On Wed, 2014-08-13 at 17:29 +0100, Stefano Stabellini wrote:
>> this patch series is a collection of three previously sent patch series
>> to fix bugs in the gic/vgic and implement irq migration on arm.
>> They have been grouped together under Ian's suggestion.
>
> All applied, thanks.
>
> A few patches here touch (v)gic-v2.c, which I assume means some sort of
> update to the gic v3 series is going to be needed? Can you offer any
> advice to Vijay (ccd)?
>
> From "git log --oneline origin/staging..HEAD -- xen/arch/arm/*gic-v2.c"
> these seem to be:
>
> 50d8fe8 xen/arm: make accesses to desc->status flags atomic
> 446df2f xen/arm: take the rank lock before accessing ipriority
>
>         These two should be trivial to carry over.
>
> 5bd62a7 xen/arm: physical irq follow virtual irq
>
>         gic v3 version will be different, but should be pretty easy?
>
    All the above changes are taken care in v9 series

> 6e42345 xen/arm: inflight irqs during migration
>
>         This one looks a bit scary, and would need similar handling for
>         the IROUTER stuff, I think?
>
> 5b3a817 xen/arm: observe itargets setting in vgic_enable_irqs and vgic
>
>         A new vgic_ops hook needs implementing.

   I have completed changes in gicv3 using IROUTER. I will send separate
RFC patch for this tomorrow.

>
> Ian.
>
>