From embedded-pv-devel-bounces@lists.xenproject.org Thu Apr 02 15:05:25 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 02 Apr 2015 15:05:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1YdggP-0001tb-51; Thu, 02 Apr 2015 15:05:25 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <iurii.konovalenko@globallogic.com>)
	id 1YdggN-0001sm-09 for Embedded-pv-devel@lists.xenproject.org;
	Thu, 02 Apr 2015 15:05:23 +0000
Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id
	1D/4C-02028-2BA5D155; Thu, 02 Apr 2015 15:05:22 +0000
X-Env-Sender: iurii.konovalenko@globallogic.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1427987119!9409119!1
X-Originating-IP: [64.18.0.212]
X-SpamReason: No, hits=0.3 required=7.0 tests=RCVD_BY_IP
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17591 invoked from network); 2 Apr 2015 15:05:21 -0000
Received: from exprod5og124.obsmtp.com (HELO exprod5og124.obsmtp.com)
	(64.18.0.212)
	by server-11.tower-206.messagelabs.com with DHE-RSA-AES256-SHA
	encrypted SMTP; 2 Apr 2015 15:05:21 -0000
Received: from mail-ig0-f175.google.com ([209.85.213.175]) (using TLSv1) by
	exprod5ob124.postini.com ([64.18.4.12]) with SMTP
	ID DSNKVR1ar/LHjvIqba9fYXt43eXxA7Ip6079@postini.com;
	Thu, 02 Apr 2015 08:05:21 PDT
Received: by igbqf9 with SMTP id qf9so75386324igb.1
	for <Embedded-pv-devel@lists.xenproject.org>;
	Thu, 02 Apr 2015 08:05:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=globallogic.com; s=google;
	h=mime-version:date:message-id:subject:from:to:cc:content-type;
	bh=n+OJhHO9MmhBwGAm9ZFcQOnMPk4h58QYcVxL9TmhzmA=;
	b=Us8bSncgzga9QPEypn6wQFMTIi7/aEo1y+YGj/+qkj2QWvZ4ADq7yI2CAandTopg8j
	xcb9O6fNZG7l8aNmllbZ/K6XWVPEwmBai4TXrC56Vi6r3bldvH2e1i8seVBDBvNczMjN
	39nPDpP/gEm6c+Wph2uMxOeb/nuwcMryPtw+U=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc
	:content-type;
	bh=n+OJhHO9MmhBwGAm9ZFcQOnMPk4h58QYcVxL9TmhzmA=;
	b=JNKnqyriOxtrC7J2+zt6U9AAsoxRechu1cQBS1IFJf5cdZnm39Ws1iwDQuDFCe62CU
	05ABQBQfG6pzrKf7ItiU6hJqQHxqQMJ+G2+8TxMzpDsSexkKvU6w6ChpGtIc2zIq8W29
	kjDodlo1pXVPOE9FtlX4mMlfvzDRL1AaoAS0bhXOxis37iHdQTG84zinFGc5Ng686tAr
	1ZglmCfyCOXRxbLf61+KO9OfmC6+lG32NhWyKz4twVCDad+imM031A7DlUNMzwLuF9BQ
	98HfFWZR82qgh1/l5wAQcCBwB/6SQobqBC0/CBXEutSRVo2r5qxOI+D6mGX/mKk/XGgR
	Ixtw==
X-Received: by 10.107.6.42 with SMTP id 42mr49349856iog.52.1427987119090;
	Thu, 02 Apr 2015 08:05:19 -0700 (PDT)
X-Gm-Message-State: ALoCoQl85o97My7GhJfTDpzcGTkQWyaBF4uq4LR1QWS6hl+uf3MpGKBCvxeW4ATu5E6/nDpzJfdrGK0raDaFS5vX2wqHoMCoVDpxE8SIIOM8nT4mgbCV3Y/dws9Ig/Jd9CGq02OC1/wkrYgD9+1mjI9bcBaHXDDPpHoAU13CtngKBDLzq8+ZfeQ=
MIME-Version: 1.0
X-Received: by 10.107.6.42 with SMTP id 42mr49349834iog.52.1427987118943; Thu,
	02 Apr 2015 08:05:18 -0700 (PDT)
Received: by 10.36.123.207 with HTTP; Thu, 2 Apr 2015 08:05:18 -0700 (PDT)
Date: Thu, 2 Apr 2015 18:05:18 +0300
Message-ID: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
From: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: Embedded-pv-devel@lists.xenproject.org,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: [Embedded-pv-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

Hi, Julien!

During bringing up Xen on Renesas Lager board we faced with problem.
A lot of Xen sources relies on statement, that IRQ number is less then
256 and variables, parameters, fields etc. are of type uint8_t. But we
can have IRQs, that are greater then 255, for example on RCar H2 SoC.
Also, as I saw from one of your latest commits, GICv supports 1020
physical interrupts. As a result, overflow can occur. So it seems
logical to increase all irq staff to uint16_t or uint32_t. We have
local patches for increasing some structures, functions etc.
But before pushing these patches I want to know your opinion, what do
you think about this problem? What type should we use uint16_t or
uint32_t? How to find all places where uint8_t type is used for IRQ?

Best regards.

Iurii Konovalenko | Senior Software Engineer
GlobalLogic

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Thu Apr 02 15:05:25 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 02 Apr 2015 15:05:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1YdggP-0001tb-51; Thu, 02 Apr 2015 15:05:25 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <iurii.konovalenko@globallogic.com>)
	id 1YdggN-0001sm-09 for Embedded-pv-devel@lists.xenproject.org;
	Thu, 02 Apr 2015 15:05:23 +0000
Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id
	1D/4C-02028-2BA5D155; Thu, 02 Apr 2015 15:05:22 +0000
X-Env-Sender: iurii.konovalenko@globallogic.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1427987119!9409119!1
X-Originating-IP: [64.18.0.212]
X-SpamReason: No, hits=0.3 required=7.0 tests=RCVD_BY_IP
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17591 invoked from network); 2 Apr 2015 15:05:21 -0000
Received: from exprod5og124.obsmtp.com (HELO exprod5og124.obsmtp.com)
	(64.18.0.212)
	by server-11.tower-206.messagelabs.com with DHE-RSA-AES256-SHA
	encrypted SMTP; 2 Apr 2015 15:05:21 -0000
Received: from mail-ig0-f175.google.com ([209.85.213.175]) (using TLSv1) by
	exprod5ob124.postini.com ([64.18.4.12]) with SMTP
	ID DSNKVR1ar/LHjvIqba9fYXt43eXxA7Ip6079@postini.com;
	Thu, 02 Apr 2015 08:05:21 PDT
Received: by igbqf9 with SMTP id qf9so75386324igb.1
	for <Embedded-pv-devel@lists.xenproject.org>;
	Thu, 02 Apr 2015 08:05:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=globallogic.com; s=google;
	h=mime-version:date:message-id:subject:from:to:cc:content-type;
	bh=n+OJhHO9MmhBwGAm9ZFcQOnMPk4h58QYcVxL9TmhzmA=;
	b=Us8bSncgzga9QPEypn6wQFMTIi7/aEo1y+YGj/+qkj2QWvZ4ADq7yI2CAandTopg8j
	xcb9O6fNZG7l8aNmllbZ/K6XWVPEwmBai4TXrC56Vi6r3bldvH2e1i8seVBDBvNczMjN
	39nPDpP/gEm6c+Wph2uMxOeb/nuwcMryPtw+U=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc
	:content-type;
	bh=n+OJhHO9MmhBwGAm9ZFcQOnMPk4h58QYcVxL9TmhzmA=;
	b=JNKnqyriOxtrC7J2+zt6U9AAsoxRechu1cQBS1IFJf5cdZnm39Ws1iwDQuDFCe62CU
	05ABQBQfG6pzrKf7ItiU6hJqQHxqQMJ+G2+8TxMzpDsSexkKvU6w6ChpGtIc2zIq8W29
	kjDodlo1pXVPOE9FtlX4mMlfvzDRL1AaoAS0bhXOxis37iHdQTG84zinFGc5Ng686tAr
	1ZglmCfyCOXRxbLf61+KO9OfmC6+lG32NhWyKz4twVCDad+imM031A7DlUNMzwLuF9BQ
	98HfFWZR82qgh1/l5wAQcCBwB/6SQobqBC0/CBXEutSRVo2r5qxOI+D6mGX/mKk/XGgR
	Ixtw==
X-Received: by 10.107.6.42 with SMTP id 42mr49349856iog.52.1427987119090;
	Thu, 02 Apr 2015 08:05:19 -0700 (PDT)
X-Gm-Message-State: ALoCoQl85o97My7GhJfTDpzcGTkQWyaBF4uq4LR1QWS6hl+uf3MpGKBCvxeW4ATu5E6/nDpzJfdrGK0raDaFS5vX2wqHoMCoVDpxE8SIIOM8nT4mgbCV3Y/dws9Ig/Jd9CGq02OC1/wkrYgD9+1mjI9bcBaHXDDPpHoAU13CtngKBDLzq8+ZfeQ=
MIME-Version: 1.0
X-Received: by 10.107.6.42 with SMTP id 42mr49349834iog.52.1427987118943; Thu,
	02 Apr 2015 08:05:18 -0700 (PDT)
Received: by 10.36.123.207 with HTTP; Thu, 2 Apr 2015 08:05:18 -0700 (PDT)
Date: Thu, 2 Apr 2015 18:05:18 +0300
Message-ID: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
From: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: Embedded-pv-devel@lists.xenproject.org,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: [Embedded-pv-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

Hi, Julien!

During bringing up Xen on Renesas Lager board we faced with problem.
A lot of Xen sources relies on statement, that IRQ number is less then
256 and variables, parameters, fields etc. are of type uint8_t. But we
can have IRQs, that are greater then 255, for example on RCar H2 SoC.
Also, as I saw from one of your latest commits, GICv supports 1020
physical interrupts. As a result, overflow can occur. So it seems
logical to increase all irq staff to uint16_t or uint32_t. We have
local patches for increasing some structures, functions etc.
But before pushing these patches I want to know your opinion, what do
you think about this problem? What type should we use uint16_t or
uint32_t? How to find all places where uint8_t type is used for IRQ?

Best regards.

Iurii Konovalenko | Senior Software Engineer
GlobalLogic

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Thu Apr 02 15:25:51 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 02 Apr 2015 15:25:51 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ydh0B-0006Of-9R; Thu, 02 Apr 2015 15:25:51 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <Ian.Campbell@citrix.com>) id 1Ydh09-0006Nn-U4
	for Embedded-pv-devel@lists.xenproject.org;
	Thu, 02 Apr 2015 15:25:50 +0000
Received: from [193.109.254.147] by server-8.bemta-14.messagelabs.com id
	BF/63-27592-D7F5D155; Thu, 02 Apr 2015 15:25:49 +0000
X-Env-Sender: Ian.Campbell@citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1427988345!11897054!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9083 invoked from network); 2 Apr 2015 15:25:46 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP;
	2 Apr 2015 15:25:46 -0000
X-IronPort-AV: E=Sophos;i="5.11,511,1422921600"; d="scan'208";a="249184336"
Message-ID: <1427987951.4037.92.camel@citrix.com>
From: Ian Campbell <ian.campbell@citrix.com>
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
Date: Thu, 2 Apr 2015 16:19:11 +0100
In-Reply-To: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
X-Mailer: Evolution 3.12.9-1+b1 
MIME-Version: 1.0
X-DLP: MIA1
Cc: Embedded-pv-devel@lists.xenproject.org,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

On Thu, 2015-04-02 at 18:05 +0300, Iurii Konovalenko wrote:
> Hi, Julien!
> 
> During bringing up Xen on Renesas Lager board we faced with problem.
> A lot of Xen sources relies on statement, that IRQ number is less then
> 256 and variables, parameters, fields etc. are of type uint8_t.

Please can you give some example of this?

Internally most irq stuff is unsigned int I think and "git grep
uint8_t.*irq -- xen" is not showing lots of hits, there are a few but
none which seem terribly scary or hard to fix.

>  But we
> can have IRQs, that are greater then 255, for example on RCar H2 SoC.
> Also, as I saw from one of your latest commits, GICv supports 1020
> physical interrupts.

This has always been true, in fact Julien's commit was reducing the
limit (which was too high), not increasing it.

>  As a result, overflow can occur. So it seems
> logical to increase all irq staff to uint16_t or uint32_t. We have
> local patches for increasing some structures, functions etc.
> But before pushing these patches I want to know your opinion, what do
> you think about this problem? What type should we use uint16_t or
> uint32_t? How to find all places where uint8_t type is used for IRQ?

We should certainly fix anywhere which is not using a large enough data
type.

Ian.


_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Thu Apr 02 15:25:51 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 02 Apr 2015 15:25:51 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ydh0B-0006Of-9R; Thu, 02 Apr 2015 15:25:51 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <Ian.Campbell@citrix.com>) id 1Ydh09-0006Nn-U4
	for Embedded-pv-devel@lists.xenproject.org;
	Thu, 02 Apr 2015 15:25:50 +0000
Received: from [193.109.254.147] by server-8.bemta-14.messagelabs.com id
	BF/63-27592-D7F5D155; Thu, 02 Apr 2015 15:25:49 +0000
X-Env-Sender: Ian.Campbell@citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1427988345!11897054!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9083 invoked from network); 2 Apr 2015 15:25:46 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP;
	2 Apr 2015 15:25:46 -0000
X-IronPort-AV: E=Sophos;i="5.11,511,1422921600"; d="scan'208";a="249184336"
Message-ID: <1427987951.4037.92.camel@citrix.com>
From: Ian Campbell <ian.campbell@citrix.com>
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
Date: Thu, 2 Apr 2015 16:19:11 +0100
In-Reply-To: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
X-Mailer: Evolution 3.12.9-1+b1 
MIME-Version: 1.0
X-DLP: MIA1
Cc: Embedded-pv-devel@lists.xenproject.org,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

On Thu, 2015-04-02 at 18:05 +0300, Iurii Konovalenko wrote:
> Hi, Julien!
> 
> During bringing up Xen on Renesas Lager board we faced with problem.
> A lot of Xen sources relies on statement, that IRQ number is less then
> 256 and variables, parameters, fields etc. are of type uint8_t.

Please can you give some example of this?

Internally most irq stuff is unsigned int I think and "git grep
uint8_t.*irq -- xen" is not showing lots of hits, there are a few but
none which seem terribly scary or hard to fix.

>  But we
> can have IRQs, that are greater then 255, for example on RCar H2 SoC.
> Also, as I saw from one of your latest commits, GICv supports 1020
> physical interrupts.

This has always been true, in fact Julien's commit was reducing the
limit (which was too high), not increasing it.

>  As a result, overflow can occur. So it seems
> logical to increase all irq staff to uint16_t or uint32_t. We have
> local patches for increasing some structures, functions etc.
> But before pushing these patches I want to know your opinion, what do
> you think about this problem? What type should we use uint16_t or
> uint32_t? How to find all places where uint8_t type is used for IRQ?

We should certainly fix anywhere which is not using a large enough data
type.

Ian.


_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Fri Apr 03 12:40:06 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 03 Apr 2015 12:40:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ye0tK-0006Dh-BQ; Fri, 03 Apr 2015 12:40:06 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <iurii.konovalenko@globallogic.com>)
	id 1Ye0tJ-0006DL-Ap for Embedded-pv-devel@lists.xenproject.org;
	Fri, 03 Apr 2015 12:40:05 +0000
Received: from [193.109.254.147] by server-15.bemta-14.messagelabs.com id
	9D/2B-29893-42A8E155; Fri, 03 Apr 2015 12:40:04 +0000
X-Env-Sender: iurii.konovalenko@globallogic.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1428064800!15447539!1
X-Originating-IP: [64.18.0.192]
X-SpamReason: No, hits=0.4 required=7.0 tests=HTML_30_40,HTML_MESSAGE,
	RCVD_BY_IP
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11665 invoked from network); 3 Apr 2015 12:40:02 -0000
Received: from exprod5og122.obsmtp.com (HELO exprod5og122.obsmtp.com)
	(64.18.0.192)
	by server-10.tower-27.messagelabs.com with DHE-RSA-AES256-SHA encrypted
	SMTP; 3 Apr 2015 12:40:02 -0000
Received: from mail-ig0-f177.google.com ([209.85.213.177]) (using TLSv1) by
	exprod5ob122.postini.com ([64.18.4.12]) with SMTP
	ID DSNKVR6KIGM1pZPHmUKU+Mpyg1EE0Q9uayDt@postini.com;
	Fri, 03 Apr 2015 05:40:02 PDT
Received: by igbqf9 with SMTP id qf9so94274257igb.1
	for <Embedded-pv-devel@lists.xenproject.org>;
	Fri, 03 Apr 2015 05:40:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=globallogic.com; s=google;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=pbwOxb2Bsxcnp37s5FUaGr85nI1KDiCzcpn2XNyNgbU=;
	b=YXFHre83cb5oYn4EH3enwTlAwGlo6g0qXhWMX0oAlveem0+rLqXG+AlxSNJHVm7MMW
	Hr387s63y07+2q2dtoFPAKjmQlewOcrS7VuKMEuSjQCE8AWVgVJXkyNkGZqGWpnz66e+
	NV4a7OwmPgu6nn1LRp9n/WKP2AQYw/YD42nHU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=pbwOxb2Bsxcnp37s5FUaGr85nI1KDiCzcpn2XNyNgbU=;
	b=LoYTXr0L4J5cu30uTydVACpbo95FRg9X+/Hi5u95aWdl0hjdZ52eGqoTL/MBgnO+Fe
	tyawjOJt4WTlBbRZKzsT1LcVZqSzXRdPl98AkNa63DitD0s9jvh0OWDMD3mDOtHYLEti
	lJZa/QmeZHHGgdAY2K1bYnUAco9z5TemH250VS9nGFKdBNiarsuqrqiLRCibA7kRW376
	gGjVwNXZjJkfPqe/NC/Tu0cfoBB6o8hjS6cJDpQ5ilhzFmu+l6vkyhpHh5E/WEd/Y2Cf
	ATlbQea+aw322KvkHF50/T5NfIQxrDocm8drRSquXy+VcWF29L/DYDy5bO71FqCGPCWH
	2Qpg==
X-Gm-Message-State: ALoCoQnSDQG0r1+XKfWmgEAOB0LndtcSA+d/MPjQPpA55r+PFC1fYluC9tEXgQGKrOd0dg0tVnTjnzHfytFn0yLKLweImjp+5cMWhUmEfgIiC2uAZtPcsAoSWh4hc7Pg+kKY+Mg2uAP/34DMNUOXnWaHhRGypRTL6//MYpzgO75vQuAEMQrffpY=
X-Received: by 10.107.31.206 with SMTP id f197mr3504244iof.19.1428064800223;
	Fri, 03 Apr 2015 05:40:00 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.107.31.206 with SMTP id f197mr3504220iof.19.1428064800091;
	Fri, 03 Apr 2015 05:40:00 -0700 (PDT)
Received: by 10.36.123.207 with HTTP; Fri, 3 Apr 2015 05:40:00 -0700 (PDT)
In-Reply-To: <551D61A2.6020201@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
Date: Fri, 3 Apr 2015 15:40:00 +0300
Message-ID: <CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
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: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============3607453400884939019=="
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

--===============3607453400884939019==
Content-Type: multipart/alternative; boundary=001a11402ada20656e0512d13f60

--001a11402ada20656e0512d13f60
Content-Type: text/plain; charset=UTF-8

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

--001a11402ada20656e0512d13f60
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: base64

PGRpdiBkaXI9Imx0ciI+PGRpdj48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R5bGU6bm9ybWFsO2ZvbnQtdmFyaWFudDpub3JtYWw7Zm9udC13ZWlnaHQ6
Ym9sZDt0ZXh0LWRlY29yYXRpb246bm9uZTt2ZXJ0aWNhbC1hbGlnbjpiYXNlbGluZTtiYWNrZ3Jv
dW5kLWNvbG9yOnRyYW5zcGFyZW50Ij48L3NwYW4+PHNwYW4gc3R5bGU9ImZvbnQtZmFtaWx5OkFy
aWFsO2ZvbnQtc2l6ZToxMnB4O2ZvbnQtc3R5bGU6bm9ybWFsO2ZvbnQtdmFyaWFudDpub3JtYWw7
Zm9udC13ZWlnaHQ6bm9ybWFsO3RleHQtZGVjb3JhdGlvbjpub25lO3ZlcnRpY2FsLWFsaWduOmJh
c2VsaW5lO2JhY2tncm91bmQtY29sb3I6dHJhbnNwYXJlbnQiPkdsb2JhbExvZ2ljPC9zcGFuPjwv
ZGl2Pjxicj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj4NCg==
--001a11402ada20656e0512d13f60--


--===============3607453400884939019==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel
--===============3607453400884939019==--


From embedded-pv-devel-bounces@lists.xenproject.org Fri Apr 03 12:40:06 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 03 Apr 2015 12:40:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ye0tK-0006Dh-BQ; Fri, 03 Apr 2015 12:40:06 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <iurii.konovalenko@globallogic.com>)
	id 1Ye0tJ-0006DL-Ap for Embedded-pv-devel@lists.xenproject.org;
	Fri, 03 Apr 2015 12:40:05 +0000
Received: from [193.109.254.147] by server-15.bemta-14.messagelabs.com id
	9D/2B-29893-42A8E155; Fri, 03 Apr 2015 12:40:04 +0000
X-Env-Sender: iurii.konovalenko@globallogic.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1428064800!15447539!1
X-Originating-IP: [64.18.0.192]
X-SpamReason: No, hits=0.4 required=7.0 tests=HTML_30_40,HTML_MESSAGE,
	RCVD_BY_IP
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11665 invoked from network); 3 Apr 2015 12:40:02 -0000
Received: from exprod5og122.obsmtp.com (HELO exprod5og122.obsmtp.com)
	(64.18.0.192)
	by server-10.tower-27.messagelabs.com with DHE-RSA-AES256-SHA encrypted
	SMTP; 3 Apr 2015 12:40:02 -0000
Received: from mail-ig0-f177.google.com ([209.85.213.177]) (using TLSv1) by
	exprod5ob122.postini.com ([64.18.4.12]) with SMTP
	ID DSNKVR6KIGM1pZPHmUKU+Mpyg1EE0Q9uayDt@postini.com;
	Fri, 03 Apr 2015 05:40:02 PDT
Received: by igbqf9 with SMTP id qf9so94274257igb.1
	for <Embedded-pv-devel@lists.xenproject.org>;
	Fri, 03 Apr 2015 05:40:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=globallogic.com; s=google;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=pbwOxb2Bsxcnp37s5FUaGr85nI1KDiCzcpn2XNyNgbU=;
	b=YXFHre83cb5oYn4EH3enwTlAwGlo6g0qXhWMX0oAlveem0+rLqXG+AlxSNJHVm7MMW
	Hr387s63y07+2q2dtoFPAKjmQlewOcrS7VuKMEuSjQCE8AWVgVJXkyNkGZqGWpnz66e+
	NV4a7OwmPgu6nn1LRp9n/WKP2AQYw/YD42nHU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=pbwOxb2Bsxcnp37s5FUaGr85nI1KDiCzcpn2XNyNgbU=;
	b=LoYTXr0L4J5cu30uTydVACpbo95FRg9X+/Hi5u95aWdl0hjdZ52eGqoTL/MBgnO+Fe
	tyawjOJt4WTlBbRZKzsT1LcVZqSzXRdPl98AkNa63DitD0s9jvh0OWDMD3mDOtHYLEti
	lJZa/QmeZHHGgdAY2K1bYnUAco9z5TemH250VS9nGFKdBNiarsuqrqiLRCibA7kRW376
	gGjVwNXZjJkfPqe/NC/Tu0cfoBB6o8hjS6cJDpQ5ilhzFmu+l6vkyhpHh5E/WEd/Y2Cf
	ATlbQea+aw322KvkHF50/T5NfIQxrDocm8drRSquXy+VcWF29L/DYDy5bO71FqCGPCWH
	2Qpg==
X-Gm-Message-State: ALoCoQnSDQG0r1+XKfWmgEAOB0LndtcSA+d/MPjQPpA55r+PFC1fYluC9tEXgQGKrOd0dg0tVnTjnzHfytFn0yLKLweImjp+5cMWhUmEfgIiC2uAZtPcsAoSWh4hc7Pg+kKY+Mg2uAP/34DMNUOXnWaHhRGypRTL6//MYpzgO75vQuAEMQrffpY=
X-Received: by 10.107.31.206 with SMTP id f197mr3504244iof.19.1428064800223;
	Fri, 03 Apr 2015 05:40:00 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.107.31.206 with SMTP id f197mr3504220iof.19.1428064800091;
	Fri, 03 Apr 2015 05:40:00 -0700 (PDT)
Received: by 10.36.123.207 with HTTP; Fri, 3 Apr 2015 05:40:00 -0700 (PDT)
In-Reply-To: <551D61A2.6020201@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
Date: Fri, 3 Apr 2015 15:40:00 +0300
Message-ID: <CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
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: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============3607453400884939019=="
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

--===============3607453400884939019==
Content-Type: multipart/alternative; boundary=001a11402ada20656e0512d13f60

--001a11402ada20656e0512d13f60
Content-Type: text/plain; charset=UTF-8

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

--001a11402ada20656e0512d13f60
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: base64

PGRpdiBkaXI9Imx0ciI+PGRpdj48ZGl2PjxkaXY+PGRpdj5IaSwgSWFuISBIaSwgSnVsaW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Zm9udC13ZWlnaHQ6
Ym9sZDt0ZXh0LWRlY29yYXRpb246bm9uZTt2ZXJ0aWNhbC1hbGlnbjpiYXNlbGluZTtiYWNrZ3Jv
dW5kLWNvbG9yOnRyYW5zcGFyZW50Ij48L3NwYW4+PHNwYW4gc3R5bGU9ImZvbnQtZmFtaWx5OkFy
aWFsO2ZvbnQtc2l6ZToxMnB4O2ZvbnQtc3R5bGU6bm9ybWFsO2ZvbnQtdmFyaWFudDpub3JtYWw7
Zm9udC13ZWlnaHQ6bm9ybWFsO3RleHQtZGVjb3JhdGlvbjpub25lO3ZlcnRpY2FsLWFsaWduOmJh
c2VsaW5lO2JhY2tncm91bmQtY29sb3I6dHJhbnNwYXJlbnQiPkdsb2JhbExvZ2ljPC9zcGFuPjwv
ZGl2Pjxicj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj4NCg==
--001a11402ada20656e0512d13f60--


--===============3607453400884939019==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel
--===============3607453400884939019==--


From embedded-pv-devel-bounces@lists.xenproject.org Fri Apr 03 15:14:34 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 03 Apr 2015 15:14:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ye3In-0003dG-MG; Fri, 03 Apr 2015 15:14:33 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <julien.grall@citrix.com>) id 1Ye1hL-0000iL-Ev
	for Embedded-pv-devel@lists.xenproject.org;
	Fri, 03 Apr 2015 13:31:47 +0000
Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id
	08/D7-12190-2469E155; Fri, 03 Apr 2015 13:31:46 +0000
X-Env-Sender: julien.grall@citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1428067904!13676638!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17716 invoked from network); 3 Apr 2015 13:31:45 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-9.tower-206.messagelabs.com with RC4-SHA encrypted SMTP;
	3 Apr 2015 13:31:45 -0000
X-IronPort-AV: E=Sophos;i="5.11,517,1422921600"; d="scan'208";a="249642738"
Message-ID: <551E963C.8000606@citrix.com>
Date: Fri, 3 Apr 2015 15:31:40 +0200
From: Julien Grall <julien.grall@citrix.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10;
	rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>, Julien Grall
	<julien.grall@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
	<CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
In-Reply-To: <CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
X-DLP: MIA2
X-Mailman-Approved-At: Fri, 03 Apr 2015 15:14:33 +0000
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: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org



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

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Fri Apr 03 15:14:34 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 03 Apr 2015 15:14:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ye3In-0003dC-LK; Fri, 03 Apr 2015 15:14:33 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <julien.grall@citrix.com>) id 1Ydh9l-0001mb-6u
	for Embedded-pv-devel@lists.xenproject.org;
	Thu, 02 Apr 2015 15:35:45 +0000
Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id
	3E/1A-06062-0D16D155; Thu, 02 Apr 2015 15:35:44 +0000
X-Env-Sender: julien.grall@citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1427988941!15253766!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26765 invoked from network); 2 Apr 2015 15:35:43 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-7.tower-27.messagelabs.com with RC4-SHA encrypted SMTP;
	2 Apr 2015 15:35:43 -0000
X-IronPort-AV: E=Sophos;i="5.11,511,1422921600"; d="scan'208";a="249191470"
Message-ID: <551D61A2.6020201@citrix.com>
Date: Thu, 2 Apr 2015 16:34:58 +0100
From: Julien Grall <julien.grall@citrix.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10;
	rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>, Julien Grall
	<julien.grall@linaro.org>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
In-Reply-To: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
X-DLP: MIA2
X-Mailman-Approved-At: Fri, 03 Apr 2015 15:14:33 +0000
Cc: Embedded-pv-devel@lists.xenproject.org, Stefano
	Stabellini <Stefano.Stabellini@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

(CC Stefano and Ian)

On 02/04/2015 16:05, Iurii Konovalenko wrote:
> Hi, Julien!

Hello Iurii,

>
> During bringing up Xen on Renesas Lager board we faced with problem.
> A lot of Xen sources relies on statement, that IRQ number is less then
> 256 and variables, parameters, fields etc. are of type uint8_t. But we
> can have IRQs, that are greater then 255, for example on RCar H2 SoC.
> Also, as I saw from one of your latest commits, GICv supports 1020
> physical interrupts. As a result, overflow can occur. So it seems
> logical to increase all irq staff to uint16_t or uint32_t. We have
> local patches for increasing some structures, functions etc.
> But before pushing these patches I want to know your opinion, what do
> you think about this problem? What type should we use uint16_t or
> uint32_t? How to find all places where uint8_t type is used for IRQ?

I'm a bit surprised. I looked through the hypervisor and libxl and I was 
able to found only one place (DOMCTL_irq_permission which is not really 
supported on ARM). We are usually using uint32_t/int for IRQ.

Can you give an example of files/structures using uint8_t for IRQ?

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).

> Best regards.

Regards,

-- 
Julien Grall

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Fri Apr 03 15:14:34 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 03 Apr 2015 15:14:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ye3In-0003dG-MG; Fri, 03 Apr 2015 15:14:33 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <julien.grall@citrix.com>) id 1Ye1hL-0000iL-Ev
	for Embedded-pv-devel@lists.xenproject.org;
	Fri, 03 Apr 2015 13:31:47 +0000
Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id
	08/D7-12190-2469E155; Fri, 03 Apr 2015 13:31:46 +0000
X-Env-Sender: julien.grall@citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1428067904!13676638!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17716 invoked from network); 3 Apr 2015 13:31:45 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-9.tower-206.messagelabs.com with RC4-SHA encrypted SMTP;
	3 Apr 2015 13:31:45 -0000
X-IronPort-AV: E=Sophos;i="5.11,517,1422921600"; d="scan'208";a="249642738"
Message-ID: <551E963C.8000606@citrix.com>
Date: Fri, 3 Apr 2015 15:31:40 +0200
From: Julien Grall <julien.grall@citrix.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10;
	rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>, Julien Grall
	<julien.grall@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
	<CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
In-Reply-To: <CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
X-DLP: MIA2
X-Mailman-Approved-At: Fri, 03 Apr 2015 15:14:33 +0000
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: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org



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

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Fri Apr 03 15:14:34 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 03 Apr 2015 15:14:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Ye3In-0003dC-LK; Fri, 03 Apr 2015 15:14:33 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <julien.grall@citrix.com>) id 1Ydh9l-0001mb-6u
	for Embedded-pv-devel@lists.xenproject.org;
	Thu, 02 Apr 2015 15:35:45 +0000
Received: from [193.109.254.147] by server-10.bemta-14.messagelabs.com id
	3E/1A-06062-0D16D155; Thu, 02 Apr 2015 15:35:44 +0000
X-Env-Sender: julien.grall@citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1427988941!15253766!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26765 invoked from network); 2 Apr 2015 15:35:43 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-7.tower-27.messagelabs.com with RC4-SHA encrypted SMTP;
	2 Apr 2015 15:35:43 -0000
X-IronPort-AV: E=Sophos;i="5.11,511,1422921600"; d="scan'208";a="249191470"
Message-ID: <551D61A2.6020201@citrix.com>
Date: Thu, 2 Apr 2015 16:34:58 +0100
From: Julien Grall <julien.grall@citrix.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10;
	rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>, Julien Grall
	<julien.grall@linaro.org>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
In-Reply-To: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
X-DLP: MIA2
X-Mailman-Approved-At: Fri, 03 Apr 2015 15:14:33 +0000
Cc: Embedded-pv-devel@lists.xenproject.org, Stefano
	Stabellini <Stefano.Stabellini@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

(CC Stefano and Ian)

On 02/04/2015 16:05, Iurii Konovalenko wrote:
> Hi, Julien!

Hello Iurii,

>
> During bringing up Xen on Renesas Lager board we faced with problem.
> A lot of Xen sources relies on statement, that IRQ number is less then
> 256 and variables, parameters, fields etc. are of type uint8_t. But we
> can have IRQs, that are greater then 255, for example on RCar H2 SoC.
> Also, as I saw from one of your latest commits, GICv supports 1020
> physical interrupts. As a result, overflow can occur. So it seems
> logical to increase all irq staff to uint16_t or uint32_t. We have
> local patches for increasing some structures, functions etc.
> But before pushing these patches I want to know your opinion, what do
> you think about this problem? What type should we use uint16_t or
> uint32_t? How to find all places where uint8_t type is used for IRQ?

I'm a bit surprised. I looked through the hypervisor and libxl and I was 
able to found only one place (DOMCTL_irq_permission which is not really 
supported on ARM). We are usually using uint32_t/int for IRQ.

Can you give an example of files/structures using uint8_t for IRQ?

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).

> Best regards.

Regards,

-- 
Julien Grall

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Tue Apr 14 10:20:22 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 14 Apr 2015 10:20:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Yhxx8-0008F6-IN; Tue, 14 Apr 2015 10:20:22 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <lars.kurth.xen@gmail.com>)
	id 1Yhxx6-0008EB-Pi; Tue, 14 Apr 2015 10:20:20 +0000
Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id
	D9/64-14975-3E9EC255; Tue, 14 Apr 2015 10:20:19 +0000
X-Env-Sender: lars.kurth.xen@gmail.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1429006818!16207764!1
X-Originating-IP: [74.125.82.41]
X-SpamReason: No, hits=0.0 required=7.0 tests=HTML_MESSAGE
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30466 invoked from network); 14 Apr 2015 10:20:18 -0000
Received: from mail-wg0-f41.google.com (HELO mail-wg0-f41.google.com)
	(74.125.82.41)
	by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP;
	14 Apr 2015 10:20:18 -0000
Received: by wgin8 with SMTP id n8so6435457wgi.0;
	Tue, 14 Apr 2015 03:20:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:content-type:subject:date:message-id:cc:to:mime-version;
	bh=vSblshgxs5ALvnkkVGrsAJBiAl5RZJHDwfATCml3QbI=;
	b=ma+RHzrGCgC5fSYMKgs64ZGgxRViE5B7XPd4JFONXmUfJ4q0mBpfMppjBGGe0Prh9j
	C9IJlSvZabgH65QzbVS30Z4I+YltFpUqV8PRpka18kNK5Eu0er+xOxCf62y3iIVmq2Vk
	Z5NXGzMkcuZwpkEAaGUtk7YbObExZFmXF8/xEkeoJ13jzw1U6jToz+nARmsU+UR04jxi
	tEbeXjzHDL40rCaoq6kgp42s04sKUI+Bm9DbXfOUt5xO9YlUM2ZNPXQPKQJYqnJvwIOv
	KgbLtkdWgaOGoAZfawQSwXQZ8obAIe0LcjxSOE45DHNMAidi6uBpZoHJbnPZXcAtfZMm
	x97Q==
X-Received: by 10.195.12.138 with SMTP id eq10mr36359569wjd.65.1429006818461; 
	Tue, 14 Apr 2015 03:20:18 -0700 (PDT)
Received: from [192.168.0.12] (97e5522d.skybroadband.com. [151.229.82.45])
	by mx.google.com with ESMTPSA id
	gu7sm14944489wib.21.2015.04.14.03.20.16
	(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
	Tue, 14 Apr 2015 03:20:17 -0700 (PDT)
From: Lars Kurth <lars.kurth.xen@gmail.com>
Date: Tue, 14 Apr 2015 11:20:16 +0100
Message-Id: <BBB27505-4839-45AD-A000-12534C6544F9@gmail.com>
To: "<xen-devel@lists.xen.org>" <xen-devel@lists.xen.org>,
	xen-api@lists.xenproject.org, mirageos-devel@xenproject.org,
	embedded-pv-devel@lists.xenproject.org, Win-pv-devel@lists.xenproject.org
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
X-Mailer: Apple Mail (2.2070.6)
Cc: xen-users@lists.xenproject.org
Subject: [Embedded-pv-devel] Reminder: CfP for Xen Project Development
	Summit is closing on May 1st
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============6164175582546569440=="
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org


--===============6164175582546569440==
Content-Type: multipart/alternative; boundary="Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320"


--Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

The CfP is at =
http://events.linuxfoundation.org/events/xen-project-developer-summit/prog=
ram/cfp =
<http://events.linuxfoundation.org/events/xen-project-developer-summit/pro=
gram/cfp>
Regards
Lars=

--Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The CfP is at&nbsp;<a href="http://events.linuxfoundation.org/events/xen-project-developer-summit/program/cfp" class="">http://events.linuxfoundation.org/events/xen-project-developer-summit/program/cfp</a><div class="">Regards</div><div class="">Lars</div></body></html>
--Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320--


--===============6164175582546569440==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel
--===============6164175582546569440==--


From embedded-pv-devel-bounces@lists.xenproject.org Tue Apr 14 10:20:22 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 14 Apr 2015 10:20:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1Yhxx8-0008F6-IN; Tue, 14 Apr 2015 10:20:22 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <lars.kurth.xen@gmail.com>)
	id 1Yhxx6-0008EB-Pi; Tue, 14 Apr 2015 10:20:20 +0000
Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id
	D9/64-14975-3E9EC255; Tue, 14 Apr 2015 10:20:19 +0000
X-Env-Sender: lars.kurth.xen@gmail.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1429006818!16207764!1
X-Originating-IP: [74.125.82.41]
X-SpamReason: No, hits=0.0 required=7.0 tests=HTML_MESSAGE
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30466 invoked from network); 14 Apr 2015 10:20:18 -0000
Received: from mail-wg0-f41.google.com (HELO mail-wg0-f41.google.com)
	(74.125.82.41)
	by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP;
	14 Apr 2015 10:20:18 -0000
Received: by wgin8 with SMTP id n8so6435457wgi.0;
	Tue, 14 Apr 2015 03:20:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:content-type:subject:date:message-id:cc:to:mime-version;
	bh=vSblshgxs5ALvnkkVGrsAJBiAl5RZJHDwfATCml3QbI=;
	b=ma+RHzrGCgC5fSYMKgs64ZGgxRViE5B7XPd4JFONXmUfJ4q0mBpfMppjBGGe0Prh9j
	C9IJlSvZabgH65QzbVS30Z4I+YltFpUqV8PRpka18kNK5Eu0er+xOxCf62y3iIVmq2Vk
	Z5NXGzMkcuZwpkEAaGUtk7YbObExZFmXF8/xEkeoJ13jzw1U6jToz+nARmsU+UR04jxi
	tEbeXjzHDL40rCaoq6kgp42s04sKUI+Bm9DbXfOUt5xO9YlUM2ZNPXQPKQJYqnJvwIOv
	KgbLtkdWgaOGoAZfawQSwXQZ8obAIe0LcjxSOE45DHNMAidi6uBpZoHJbnPZXcAtfZMm
	x97Q==
X-Received: by 10.195.12.138 with SMTP id eq10mr36359569wjd.65.1429006818461; 
	Tue, 14 Apr 2015 03:20:18 -0700 (PDT)
Received: from [192.168.0.12] (97e5522d.skybroadband.com. [151.229.82.45])
	by mx.google.com with ESMTPSA id
	gu7sm14944489wib.21.2015.04.14.03.20.16
	(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
	Tue, 14 Apr 2015 03:20:17 -0700 (PDT)
From: Lars Kurth <lars.kurth.xen@gmail.com>
Date: Tue, 14 Apr 2015 11:20:16 +0100
Message-Id: <BBB27505-4839-45AD-A000-12534C6544F9@gmail.com>
To: "<xen-devel@lists.xen.org>" <xen-devel@lists.xen.org>,
	xen-api@lists.xenproject.org, mirageos-devel@xenproject.org,
	embedded-pv-devel@lists.xenproject.org, Win-pv-devel@lists.xenproject.org
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
X-Mailer: Apple Mail (2.2070.6)
Cc: xen-users@lists.xenproject.org
Subject: [Embedded-pv-devel] Reminder: CfP for Xen Project Development
	Summit is closing on May 1st
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============6164175582546569440=="
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org


--===============6164175582546569440==
Content-Type: multipart/alternative; boundary="Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320"


--Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

The CfP is at =
http://events.linuxfoundation.org/events/xen-project-developer-summit/prog=
ram/cfp =
<http://events.linuxfoundation.org/events/xen-project-developer-summit/pro=
gram/cfp>
Regards
Lars=

--Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The CfP is at&nbsp;<a href="http://events.linuxfoundation.org/events/xen-project-developer-summit/program/cfp" class="">http://events.linuxfoundation.org/events/xen-project-developer-summit/program/cfp</a><div class="">Regards</div><div class="">Lars</div></body></html>
--Apple-Mail=_6B14DE52-3863-4A22-80AB-5CD642AF2320--


--===============6164175582546569440==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel
--===============6164175582546569440==--


From embedded-pv-devel-bounces@lists.xenproject.org Tue Apr 14 10:33:45 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 14 Apr 2015 10:33:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1YhyA5-0001SE-Pm; Tue, 14 Apr 2015 10:33:45 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <Ian.Campbell@citrix.com>) id 1YhyA4-0001Rl-3X
	for Embedded-pv-devel@lists.xenproject.org;
	Tue, 14 Apr 2015 10:33:44 +0000
Received: from [85.158.137.68] by server-15.bemta-3.messagelabs.com id
	CF/39-32487-70DEC255; Tue, 14 Apr 2015 10:33:43 +0000
X-Env-Sender: Ian.Campbell@citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1429007620!16301955!1
X-Originating-IP: [66.165.176.63]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30958 invoked from network); 14 Apr 2015 10:33:42 -0000
Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63)
	by server-2.tower-31.messagelabs.com with RC4-SHA encrypted SMTP;
	14 Apr 2015 10:33:42 -0000
X-IronPort-AV: E=Sophos;i="5.11,575,1422921600"; d="scan'208";a="254817207"
Message-ID: <1429007619.15516.22.camel@citrix.com>
From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Date: Tue, 14 Apr 2015 11:33:39 +0100
In-Reply-To: <551E963C.8000606@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
	<CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
	<551E963C.8000606@citrix.com>
X-Mailer: Evolution 3.12.9-1+b1 
MIME-Version: 1.0
X-DLP: MIA2
Cc: Embedded-pv-devel@lists.xenproject.org,
	Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

On Fri, 2015-04-03 at 15:31 +0200, Julien Grall wrote:
> > 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.

libxc is not ABI stable, we can make these bigger if necessary, or
introduce new interface etc as required depending on how things pan out
at the hypercall layer.

Ian.


_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Tue Apr 14 10:33:45 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 14 Apr 2015 10:33:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1YhyA5-0001SE-Pm; Tue, 14 Apr 2015 10:33:45 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <Ian.Campbell@citrix.com>) id 1YhyA4-0001Rl-3X
	for Embedded-pv-devel@lists.xenproject.org;
	Tue, 14 Apr 2015 10:33:44 +0000
Received: from [85.158.137.68] by server-15.bemta-3.messagelabs.com id
	CF/39-32487-70DEC255; Tue, 14 Apr 2015 10:33:43 +0000
X-Env-Sender: Ian.Campbell@citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1429007620!16301955!1
X-Originating-IP: [66.165.176.63]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30958 invoked from network); 14 Apr 2015 10:33:42 -0000
Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63)
	by server-2.tower-31.messagelabs.com with RC4-SHA encrypted SMTP;
	14 Apr 2015 10:33:42 -0000
X-IronPort-AV: E=Sophos;i="5.11,575,1422921600"; d="scan'208";a="254817207"
Message-ID: <1429007619.15516.22.camel@citrix.com>
From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Date: Tue, 14 Apr 2015 11:33:39 +0100
In-Reply-To: <551E963C.8000606@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
	<CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
	<551E963C.8000606@citrix.com>
X-Mailer: Evolution 3.12.9-1+b1 
MIME-Version: 1.0
X-DLP: MIA2
Cc: Embedded-pv-devel@lists.xenproject.org,
	Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

On Fri, 2015-04-03 at 15:31 +0200, Julien Grall wrote:
> > 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.

libxc is not ABI stable, we can make these bigger if necessary, or
introduce new interface etc as required depending on how things pan out
at the hypercall layer.

Ian.


_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Tue Apr 14 11:06:11 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 14 Apr 2015 11:06:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1YhyfT-00066y-Fu; Tue, 14 Apr 2015 11:06:11 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <julien.grall@citrix.com>) id 1YhyBs-0001iG-1K
	for Embedded-pv-devel@lists.xenproject.org;
	Tue, 14 Apr 2015 10:35:36 +0000
Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id
	6A/36-08090-77DEC255; Tue, 14 Apr 2015 10:35:35 +0000
X-Env-Sender: julien.grall@citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1429007733!12863701!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24395 invoked from network); 14 Apr 2015 10:35:34 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-16.tower-206.messagelabs.com with RC4-SHA encrypted SMTP;
	14 Apr 2015 10:35:34 -0000
X-IronPort-AV: E=Sophos;i="5.11,575,1422921600"; d="scan'208";a="252916074"
Message-ID: <552CED4F.7000006@citrix.com>
Date: Tue, 14 Apr 2015 11:34:55 +0100
From: Julien Grall <julien.grall@citrix.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:31.0) Gecko/20100101 Icedove/31.6.0
MIME-Version: 1.0
To: Ian Campbell <ian.campbell@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
	<CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
	<551E963C.8000606@citrix.com> <1429007619.15516.22.camel@citrix.com>
In-Reply-To: <1429007619.15516.22.camel@citrix.com>
X-DLP: MIA1
X-Mailman-Approved-At: Tue, 14 Apr 2015 11:06:10 +0000
Cc: Embedded-pv-devel@lists.xenproject.org,
	Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

On 14/04/15 11:33, Ian Campbell wrote:
>> Whoops. I didn't spot those one thanks.
> 
> libxc is not ABI stable, we can make these bigger if necessary, or
> introduce new interface etc as required depending on how things pan out
> at the hypercall layer.

FIY, a patch has been sent on the ML see "[PATCH v3] increase size of
irq from uint8_t to uint32_t" in order to fix it.

Regards,

-- 
Julien Grall

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

From embedded-pv-devel-bounces@lists.xenproject.org Tue Apr 14 11:06:11 2015
Return-path: <embedded-pv-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 14 Apr 2015 11:06:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <embedded-pv-devel-bounces@lists.xenproject.org>)
	id 1YhyfT-00066y-Fu; Tue, 14 Apr 2015 11:06:11 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <julien.grall@citrix.com>) id 1YhyBs-0001iG-1K
	for Embedded-pv-devel@lists.xenproject.org;
	Tue, 14 Apr 2015 10:35:36 +0000
Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id
	6A/36-08090-77DEC255; Tue, 14 Apr 2015 10:35:35 +0000
X-Env-Sender: julien.grall@citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1429007733!12863701!1
X-Originating-IP: [66.165.176.89]
X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: 
	VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n,
	received_headers: No Received headers
X-StarScan-Received: 
X-StarScan-Version: 6.13.6; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24395 invoked from network); 14 Apr 2015 10:35:34 -0000
Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89)
	by server-16.tower-206.messagelabs.com with RC4-SHA encrypted SMTP;
	14 Apr 2015 10:35:34 -0000
X-IronPort-AV: E=Sophos;i="5.11,575,1422921600"; d="scan'208";a="252916074"
Message-ID: <552CED4F.7000006@citrix.com>
Date: Tue, 14 Apr 2015 11:34:55 +0100
From: Julien Grall <julien.grall@citrix.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:31.0) Gecko/20100101 Icedove/31.6.0
MIME-Version: 1.0
To: Ian Campbell <ian.campbell@citrix.com>
References: <CABc08z+1KgYoXtG7TZTzokOVqT42tAN3NKSeYhGFp+sV1JufMg@mail.gmail.com>
	<551D61A2.6020201@citrix.com>
	<CABc08zLWvXHViAh1uYYRGfat8fng=J6KkSb0O7dLgGrgEYwykQ@mail.gmail.com>
	<551E963C.8000606@citrix.com> <1429007619.15516.22.camel@citrix.com>
In-Reply-To: <1429007619.15516.22.camel@citrix.com>
X-DLP: MIA1
X-Mailman-Approved-At: Tue, 14 Apr 2015 11:06:10 +0000
Cc: Embedded-pv-devel@lists.xenproject.org,
	Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
	Julien Grall <julien.grall@linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Embedded-pv-devel] [Xen-devel] Size of irq field
X-BeenThere: embedded-pv-devel@lists.xenproject.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <embedded-pv-devel.lists.xenproject.org>
List-Unsubscribe: <http://lists.xenproject.org/cgi-bin/mailman/options/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:embedded-pv-devel@lists.xenproject.org>
List-Help: <mailto:embedded-pv-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel>,
	<mailto:embedded-pv-devel-request@lists.xenproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: embedded-pv-devel-bounces@lists.xenproject.org
Errors-To: embedded-pv-devel-bounces@lists.xenproject.org

On 14/04/15 11:33, Ian Campbell wrote:
>> Whoops. I didn't spot those one thanks.
> 
> libxc is not ABI stable, we can make these bigger if necessary, or
> introduce new interface etc as required depending on how things pan out
> at the hypercall layer.

FIY, a patch has been sent on the ML see "[PATCH v3] increase size of
irq from uint8_t to uint32_t" in order to fix it.

Regards,

-- 
Julien Grall

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@lists.xenproject.org
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

