All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: vijay.kilari@gmail.com, stefano.stabellini@eu.citrix.com,
	Prasun.Kapoor@caviumnetworks.com,
	vijaya.kumar@caviumnetworks.com, tim@xen.org,
	xen-devel@lists.xen.org, stefano.stabellini@citrix.com
Subject: Re: [PATCH v5 16/21] xen/arm: split vgic driver into generic and vgic-v2 driver
Date: Tue, 17 Jun 2014 14:19:01 +0100	[thread overview]
Message-ID: <1403011141.16844.98.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <539DD21A.2030108@linaro.org>

On Sun, 2014-06-15 at 18:04 +0100, Julien Grall wrote:
> You've reintroduced the XSA-94 here (see bf70db7 vgic: Check rank in
> GICD_ICFGR* emulation before locking). When you send a new version of a
> serie, please *check* there is no update on this code which may fix error.

One technique I use here is, given the patch in file "x":
        grep ^- x | cut -c2- > A
        grep ^\+ x | cut -c2- > B
        diff -u A B
        
It's far from perfect and relies on the code order not changing too
drastically over the movement, but it would have caught this.

> I saw you shared a part of the emulation between the distributor and the
> redistributor in GICv3. I think you can also share with GICv2, this
> could avoid fix in 2 places the same bug (or worst only fixing in 1 place).

I'm not convinced that sharing vgic-2 and vgic-3 code wouldn't end up
being more confusing in the long run.

> > -static int vgic_to_sgi(struct vcpu *v, register_t sgir)
> > +int vgic_to_sgi(struct vcpu *v, register_t sgir, enum gic_sgi_mode irqmode, int virq,
> > +                unsigned long vcpu_mask)
> 
> 
> You can't assume that all the VCPU bits will fit in an unsigned long. We
> will have to use cpumask_t at some point.
> 
> I'm fine if you don't handle it for now, but you need to *write down*
> somewhere the limitation of this function.

To be fair, this is a preexisting restriction and this is far from the
only place which will need fixing.

> [..]
> 
> > +    case SGI_TARGET_OTHERS:
> 
> [..]
> 
> > +    case SGI_TARGET_SELF:
> 
> For this 2 case, you can't assume that vcpu_mask will be equal to 0...
> It comes from the GICD_SGIR...

This is passed from the caller, isn't it?

Ian.

  reply	other threads:[~2014-06-17 13:19 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 13:36 [PATCH v5 00/21] xen/arm: Add GICv3 support vijay.kilari
2014-06-12 13:36 ` [PATCH v5 01/21] xen/arm: move io.h as mmio.h to include folder vijay.kilari
2014-06-17 11:52   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 02/21] xen/arm: make mmio handlers domain specific vijay.kilari
2014-06-12 16:07   ` Stefano Stabellini
2014-06-12 22:19   ` Julien Grall
2014-06-17 11:53   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 03/21] xen/arm: make sgi handling generic vijay.kilari
2014-06-17 11:52   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 04/21] xen/arm: remove unused parameter in do_sgi call vijay.kilari
2014-06-12 13:36 ` [PATCH v5 05/21] xen/arm: use ioremap to map gic-v2 registers vijay.kilari
2014-06-12 16:11   ` Stefano Stabellini
2014-06-15 16:02   ` Julien Grall
2014-06-17 11:59   ` Ian Campbell
2014-06-18 21:19   ` Julien Grall
2014-06-12 13:36 ` [PATCH v5 06/21] xen/arm: segregate and split GIC low level functionality vijay.kilari
2014-06-12 16:26   ` Stefano Stabellini
2014-06-12 22:46     ` Julien Grall
2014-06-12 22:44   ` Julien Grall
2014-06-13  8:30     ` Ian Campbell
2014-06-19  9:56     ` Vijay Kilari
2014-06-19 10:49       ` Julien Grall
2014-06-15 17:47   ` Julien Grall
2014-06-17 12:15   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 07/21] arm/xen: move GIC context data structure to gic driver vijay.kilari
2014-06-12 16:28   ` Stefano Stabellini
2014-06-15 16:05   ` Julien Grall
2014-06-17 12:19   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 08/21] xen/arm: use device api to detect GIC version vijay.kilari
2014-06-15 16:09   ` Julien Grall
2014-06-17 12:23   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 09/21] xen/arm: move vgic rank data to gic header file vijay.kilari
2014-06-17 12:25   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 10/21] xen/arm: move vgic defines to vgic " vijay.kilari
2014-06-17 12:27   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 11/21] xen/arm: prefix byte_read and byte_write functions with vgic vijay.kilari
2014-06-15 16:23   ` Julien Grall
2014-06-15 16:34   ` Julien Grall
2014-06-17 12:28     ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 12/21] xen/arm: move is_vcpu_running function to sched.h vijay.kilari
2014-06-15 16:26   ` Julien Grall
2014-06-16  8:34     ` Jan Beulich
2014-06-19 10:58       ` Vijay Kilari
2014-06-19 11:03         ` Julien Grall
2014-06-19 11:11     ` Vijay Kilari
2014-06-12 13:36 ` [PATCH v5 13/21] xen/arm: move pending_irq structure to vgic header file vijay.kilari
2014-06-17 12:33   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 14/21] xen/arm: calculate vgic irq rank based on register size vijay.kilari
2014-06-17 12:36   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 15/21] xen/arm: Remove REG macro in vgic driver vijay.kilari
2014-06-12 16:42   ` Stefano Stabellini
2014-06-15 16:37   ` Julien Grall
2014-06-17 12:37   ` Ian Campbell
2014-06-12 13:36 ` [PATCH v5 16/21] xen/arm: split vgic driver into generic and vgic-v2 driver vijay.kilari
2014-06-15 17:04   ` Julien Grall
2014-06-17 13:19     ` Ian Campbell [this message]
2014-06-17 13:40       ` Julien Grall
2014-06-19 12:35     ` Vijay Kilari
2014-06-17 13:21   ` Ian Campbell
2014-06-18  3:33     ` Vijay Kilari
2014-06-18  9:17       ` Julien Grall
2014-06-12 13:36 ` [PATCH v5 17/21] xen/arm: Add support for GIC v3 vijay.kilari
2014-06-12 17:03   ` Stefano Stabellini
2014-06-12 22:58     ` Julien Grall
2014-06-15 18:10   ` Julien Grall
2014-06-12 13:36 ` [PATCH v5 18/21] xen/arm: Add virtual GICv3 support vijay.kilari
2014-06-12 17:09   ` Stefano Stabellini
2014-06-15 17:07     ` Julien Grall
2014-06-16 10:59       ` Stefano Stabellini
2014-06-16 11:08         ` Stefano Stabellini
2014-06-15 18:32   ` Julien Grall
2014-06-20  6:31     ` Vijay Kilari
2014-06-12 13:36 ` [PATCH v5 19/21] xen/arm: Update Dom0 GIC dt node with GICv3 information vijay.kilari
2014-06-15 18:36   ` Julien Grall
2014-06-12 13:36 ` [PATCH v5 20/21] xen/arm: add SGI handling for GICv3 vijay.kilari
2014-06-12 17:15   ` Stefano Stabellini
2014-06-12 17:23     ` Stefano Stabellini
2014-06-12 13:36 ` [PATCH v5 21/21] xen/arm: check for GICv3 platform support vijay.kilari
2014-06-12 22:51   ` Julien Grall
2014-06-16 15:28     ` Vijay Kilari
2014-06-16 15:37       ` Julien Grall
2014-06-16 15:43         ` Ian Campbell
2014-06-13 15:59 ` [PATCH v5 00/21] xen/arm: Add GICv3 support Stefano Stabellini
2014-06-13 16:15   ` Julien Grall
2014-06-17 15:39 ` Ian Campbell
2014-06-18  3:43   ` Vijay Kilari
2014-06-18 10:37     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403011141.16844.98.camel@kazak.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=vijay.kilari@gmail.com \
    --cc=vijaya.kumar@caviumnetworks.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.