All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
	Julien Grall <julien.grall@citrix.com>
Cc: Embedded-pv-devel@lists.xenproject.org,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: Size of irq field
Date: Fri, 3 Apr 2015 15:31:40 +0200	[thread overview]
Message-ID: <551E963C.8000606@citrix.com> (raw)
In-Reply-To: <CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>



On 03/04/2015 14:40, Iurii Konovalenko wrote:
> Hi, Ian! Hi, Julien!

Hi Iurii,

> Thank you for your replies.
>
> On Thu, Apr 2, 2015 at 6:19 PM, Ian Campbell <ian.campbell@citrix.com
> <mailto:ian.campbell@citrix.com>> wrote:
>  > Please can you give some example of this?
> On Thu, Apr 2, 2015 at 6:34 PM, Julien Grall <julien.grall@citrix.com
> <mailto:julien.grall@citrix.com>> wrote:
>  > Can you give an example of files/structures using uint8_t for IRQ?
>
> As Julien wrote, it is related to irq_permission. I am not sure if it is
> supported on ARM, but we use it, and this function fails during domain
> creation, because IRQ number is truncated and permission operation is
> applied for incorrect IRQ, so domain creation fails. So, do we need to
> change logic and do not check IRQ permissions?

Where do you need to check the IRQ permission?

Currently (with my DT device passthrough series) only DOM0 is able to 
manage the IRQ (i.e bind/unbind) and we don't let the guest to do it. So 
I don't think it's necessary to to call xc_domain_irq_permission for guest.

The DOMCTL is buggy because it relies on vIRQ == IRQ as many place in 
Xen. Although it would work now because, we chose to map 1:1 the IRQ in 
the guest.

> Also, as we plan to use passtrough, we there are such places:

> In tools/libxc/include/xenctrl.h:
> int xc_domain_bind_pt_irq(xc_interface *xch,
>                            uint32_t domid,
> *uint8_t* machine_irq,
>                            uint8_t irq_type,
>                            uint8_t bus,
>                            uint8_t device,
>                            uint8_t intx,
>                            uint8_t isa_irq);
>
> int xc_domain_unbind_pt_irq(xc_interface *xch,
>                            uint32_t domid,
> *uint8_t* machine_irq,
>                            uint8_t irq_type,
>                            uint8_t bus,
>                            uint8_t device,
>                            uint8_t intx,
>                            uint8_t isa_irq);
>
> int xc_domain_bind_pt_pci_irq(xc_interface *xch,
>                                uint32_t domid,
> *uint8_t* machine_irq,
>                                uint8_t bus,
>                                uint8_t device,
>                                uint8_t intx);
>
> int xc_domain_bind_pt_isa_irq(xc_interface *xch,
>                                uint32_t domid,
> *uint8_t* machine_irq);
>
> And theirs implementation in tools/libxc/xc_domain.c

Whoops. I didn't spot those one thanks.

>
> On Thu, Apr 2, 2015 at 6:19 PM, Ian Campbell <ian.campbell@citrix.com
> <mailto:ian.campbell@citrix.com>> wrote:
>  > We should certainly fix anywhere which is not using a large enough data
>  > type.
> On Thu, Apr 2, 2015 at 6:34 PM, Julien Grall <julien.grall@citrix.com
> <mailto:julien.grall@citrix.com>> wrote:
>  > Ideally the IRQ should use uint32_t. This is allow us to support LPIs
> (IRQ
>  > number start a 8192 up to a very high number).
>
> I have patch that increase size to uint32_t for cases, I described
> previously. Can I push it for review?

Yes please.

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-04-03 13:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 15:05 Size of irq field Iurii Konovalenko
2015-04-02 15:19 ` Ian Campbell
2015-04-02 15:34 ` Julien Grall
2015-04-03 12:40   ` Iurii Konovalenko
2015-04-03 13:31     ` Julien Grall [this message]
2015-04-14 10:33       ` Ian Campbell
2015-04-14 10:34         ` Julien Grall

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=551E963C.8000606@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=Embedded-pv-devel@lists.xenproject.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=iurii.konovalenko@globallogic.com \
    --cc=julien.grall@linaro.org \
    --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.