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


[-- Attachment #1.1: Type: text/plain, Size: 2884 bytes --]

Hi, Ian! Hi, Julien!
Thank you for your replies.

On Thu, Apr 2, 2015 at 6:19 PM, Ian Campbell <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>
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?

In tools/libxc/include/xenctrl.h:
int xc_domain_irq_permission(xc_interface *xch,
    uint32_t domid,
    *uint8_t* pirq,
    uint8_t allow_access);

In tools/libxc/xc_domain.c:
int xc_domain_irq_permission(xc_interface *xch,
    uint32_t domid,
    *uint8_t* pirq,
    uint8_t allow_access)

In xen/include/public/domctl.h:
struct xen_domctl_irq_permission {
    *uint8_t* pirq;
    uint8_t allow_access;
};

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


On Thu, Apr 2, 2015 at 6:19 PM, Ian Campbell <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>
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?

Best regards.

Iurii Konovalenko | Senior Software Engineer
GlobalLogic

[-- Attachment #1.2: Type: text/html, Size: 5056 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-04-03 12:40 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 [this message]
2015-04-03 13:31     ` Julien Grall
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='CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com' \
    --to=iurii.konovalenko@globallogic.com \
    --cc=Embedded-pv-devel@lists.xenproject.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=julien.grall@citrix.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.