From minios-devel-bounces@lists.xenproject.org Tue May 11 09:30:07 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 11 May 2021 09:30:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.125693.236606 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgOiK-0000ly-JH; Tue, 11 May 2021 09:30:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 125693.236606; Tue, 11 May 2021 09:30:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgOiK-0000lV-FV; Tue, 11 May 2021 09:30:04 +0000
Received: by outflank-mailman (input) for mailman id 125693;
 Tue, 11 May 2021 09:30:03 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=9LXA=KG=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lgOiJ-0000Zv-Fp
 for minios-devel@lists.xen.org; Tue, 11 May 2021 09:30:03 +0000
Received: from EUR03-DB5-obe.outbound.protection.outlook.com (unknown
 [40.107.4.48]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 6c070717-d0a1-4a76-b1f1-ec941a71d56a;
 Tue, 11 May 2021 09:30:01 +0000 (UTC)
Received: from DB6PR0202CA0023.eurprd02.prod.outlook.com (2603:10a6:4:29::33)
 by AM5PR0801MB1681.eurprd08.prod.outlook.com (2603:10a6:203:3b::19)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Tue, 11 May
 2021 09:29:59 +0000
Received: from DB5EUR03FT058.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:4:29:cafe::54) by DB6PR0202CA0023.outlook.office365.com
 (2603:10a6:4:29::33) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend
 Transport; Tue, 11 May 2021 09:29:59 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 DB5EUR03FT058.mail.protection.outlook.com (10.152.20.255) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4108.25 via Frontend Transport; Tue, 11 May 2021 09:29:59 +0000
Received: ("Tessian outbound 52fcc5bd9d3a:v91");
 Tue, 11 May 2021 09:28:58 +0000
Received: from fda3aa518436.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 53881CE6-93B3-4CA9-BC99-0B7101BA4F9C.1; 
 Tue, 11 May 2021 09:28:51 +0000
Received: from EUR01-HE1-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fda3aa518436.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Tue, 11 May 2021 09:28:51 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AS8PR08MB6328.eurprd08.prod.outlook.com (2603:10a6:20b:33e::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Tue, 11 May
 2021 09:28:49 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Tue, 11 May 2021
 09:28:49 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 6c070717-d0a1-4a76-b1f1-ec941a71d56a
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=CbfZMcG8/pvHtR2oFgH048+i505TkvclgWoJZBeo0FY=;
 b=j3ctqsf/vR6mVOghbl/eXirirhKlNoV/SdUFLcQKFe3Onxzf/uy91Z4MmR9qPhI6J9kewqvl1PsuiBJKxvQnLH2HZ0ycyMoyar5Eyqy/dc5D76+AeAqWZQqYAFGac949imu1xM0gJ1TOPArM2UZDxklQDMvh1fUUbTj2tdkGrdc=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=jVpwww1n2F1E+I02fV1v1/2EtskZJvWKiLxhhokXuQ5IgJVCO6GAs3ayt1eYDOQOhxuJHfbwYaMzl0NNXF2RoJD6J73cSHcrovR+o7GoXiQNzYVVjE3utr93/PESOO3K/NX29YBPv09eQwHtaowoRJmX8yDzXSQotOtwoKPxJhQmxwGmH7kbXxxHX0eURoldJN3lI9QjOctd/7USiBOXNFqQ+xyqjKUGD1eabO/JERmPqL3fdU390u3p5REDQ3g6HvBeGGrvl9nP3PmsLFLV7M/yl8H7tJYWUTEQl82sAey3DHekKErnx+eujxSxxQYvrD3kKAorRpwDi1fPbJxC0w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=CbfZMcG8/pvHtR2oFgH048+i505TkvclgWoJZBeo0FY=;
 b=R0xDGpW76y4Khps4HRZSgGpmpiRHnz/WL4RNtfjCw3A/NmmURKylnjrAzImtzGmdd9JjLLZKYEgHWQ15pB/zmDJ+ypz8/gAx4ISVPcPfK0WMrX+2W4ca1w45r+RVQn48BdravMNCTeT+VD0RPiJtGYiu1Q5XjqKMA8J+mDS7+YfF46IiBqzJIWNUXjNmvqCGi8qNlxMNINRFcED9l7XMISb8YImJpMylauN0UeetWfYiwZ0v0Klvn7nU/8MEG19VAwgBlXcNp0GvGJvz2IB0qlw2zA+SwgjgINxJHkhFmak+kKygHnLEBhFK4Pdm6U5vAiV8tUaVb3hK6W3RWOPKQg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=CbfZMcG8/pvHtR2oFgH048+i505TkvclgWoJZBeo0FY=;
 b=j3ctqsf/vR6mVOghbl/eXirirhKlNoV/SdUFLcQKFe3Onxzf/uy91Z4MmR9qPhI6J9kewqvl1PsuiBJKxvQnLH2HZ0ycyMoyar5Eyqy/dc5D76+AeAqWZQqYAFGac949imu1xM0gJ1TOPArM2UZDxklQDMvh1fUUbTj2tdkGrdc=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,01/35] plat/virtio: Introduce several helpers for virtio
 ring
Thread-Topic: [RFCv4,01/35] plat/virtio: Introduce several helpers for virtio
 ring
Thread-Index: AQHXGbwCrdWcrRWCQUKZ8YVCogevuqreUlxQ
Date: Tue, 11 May 2021 09:28:48 +0000
Message-ID:
 <AM6PR08MB4376CEBAE442F42ABF30A276F7539@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-2-justin.he@arm.com>
 <20210315165452.30686-1-razvanvirtan@gmail.com>
In-Reply-To: <20210315165452.30686-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: C0E8892DE72EE846BA5922CDC67B9324.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.111]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: fde97c2c-ea55-4844-60a1-08d9145f58a7
x-ms-traffictypediagnostic: AS8PR08MB6328:|AM5PR0801MB1681:
X-Microsoft-Antispam-PRVS:
	<AM5PR0801MB16816642CDCFE6D9C13D4683F7539@AM5PR0801MB1681.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:1002;OLM:7691;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 jLDap4ZmREPmHDoRJr0bVCxF5QQCpPOa5WyIG3xscNvqrDbxpQKQYMd4bilRxVeBDOm/JEQ1eBDL8Xt2gqyPGsGVw8YXMB+/bXCZceQjnlzauG6KOJKRz/tBw1eptsTvaUOisZh5odRKyrltaz8x9V8nnAiIbjC0EFsMCQG1OqfScc+dg9KIa9utMEXdI4NREhJM5PqnxUz9Ekh/0/mljWVasdI8DK6TP4FOZLUMbDhXVxp+wIfUJCNC77jNUVXIEnbuyHoXo99L31PBL/ixl6Rfhi+ucQC8B8sE3QUkrwKBhM5zu3gmSg0z3IQJwfFGUKX8FAB6Q9b5SoPUBQlscKnHtabL1Qzt1+ChVpJnVmi1Oyw6TtGozIohLVoRM951kzlzFV7S7kgRVc6gUARR0SClD7MKOfdb15uQQcW1gnRAA6FsKmjOFUZrOLLUKvKkgrzAz8LieYGHtISZs7GDk3294OzvZ2XAFtPsjZvxHHtzsXvacVZZDBXRm0KCC0nXr0Wm+jF38Ys26+SS1ALEB430dheSvlZNS1kGs+aJiNaQixMTFhljJ5Eub9S0DMyJD6YjW/TsgDRKrVvciiviezSzw3+1vqaeP0EfZG0N484=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(136003)(346002)(376002)(39850400004)(396003)(6916009)(66476007)(316002)(4326008)(7696005)(66946007)(66446008)(66556008)(6506007)(83380400001)(64756008)(76116006)(8936002)(53546011)(33656002)(9686003)(86362001)(5660300002)(2906002)(186003)(52536014)(478600001)(71200400001)(122000001)(55016002)(8676002)(38100700002)(26005);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?Wbk8ddkSwD+PDVCRnZixl5BgQE6BOVAb+O/xivbmF0FMokcnaALuzkE2bPnP?=
 =?us-ascii?Q?9AWPVK1w3KMfTb8vTsu7ISWjXLjn+Ury6llS0zTkNpeme5HAL2Gdj9gTTZkn?=
 =?us-ascii?Q?BeNHEm0IAryU+N/DXRTmWS0KAxYo5R9Hf6cH8aEhHzATQZPZtYfx9nzyIuK5?=
 =?us-ascii?Q?k4EGvgl4pRjkEgcouAkkAZMmMI6D66OmtD31gJd4tR17bwGMVWcYJ6O0ieDJ?=
 =?us-ascii?Q?H0IHPGAOCXMA+ti2QmPsfahj/WemJN94poN1qkhxEugUm30UaH6uj4NERJxm?=
 =?us-ascii?Q?v7HjdrOQwDT8AwMrK4FCo+hnoewYYDFAMJLwNPC1RsZhq08hXLucQJLuZknc?=
 =?us-ascii?Q?jUl/lYcr5BkIkb6SZ5sYo/x8C36xoQo6EKm5MmQk8gLUe30H8RvI8OMuHsMJ?=
 =?us-ascii?Q?Qtm3NdCvXo92ZzbqiTsed0aVU7KLf3X+gOpEV21SgL5Ra0UTrIVUFRzkx4RB?=
 =?us-ascii?Q?hNRJ16OHquNh4SQDsNNfhyDlS8WVr0y9bxUHVFWDpwItNSa7xcNG8szgs6yI?=
 =?us-ascii?Q?6wQ5RYDjb/JntGi08t7exolO/xKBcyughhlWT1o5VwxxCHRe9jV/EKNnrlDU?=
 =?us-ascii?Q?Mw7mu6zbakz+d7tEV//pSE1ElpX3brmAp73ounTOFSN1LzG4nf0TmU8IVCJN?=
 =?us-ascii?Q?9KLQJTTqCWItkUmv85SZcRv4RB9OmkGrAYhjNSxo4t3NNM8SvVbDt8nrl6hG?=
 =?us-ascii?Q?Y0gTqgieRHFua/LRCuaQmYXgDFVb066j+UwlbdmqU6Jx+CLS+MZrvMqM2Rva?=
 =?us-ascii?Q?vgclnOwK+WknirvszdOVeLb8FXULTvxszF8CjegZTIR6kYt+zArxsYNgGrvg?=
 =?us-ascii?Q?Ks5IwTww08fFaZ0xmNPrVCfKR32sXpkf2EZ5oLZqGDKj03vvG20SdQ0KSk+z?=
 =?us-ascii?Q?i1D2a6rjS4IbbWVWBQKzupANNdtCIDzrQKEzCYi74kG0vF+AJVCunwxvWbfS?=
 =?us-ascii?Q?kjwDofymrmyDwQlqKCtkFoR4JHE9XDGKUcxLKNb/oGnIQKfy2vdhUPztvoAG?=
 =?us-ascii?Q?r/FdgDZu1g1pkapT2S67Z6e5q3jnc3k3fH5wd9AFXs9ziwSJoGkkii+aOPv/?=
 =?us-ascii?Q?4lGaLP2wVVm0VvwJ7ubWQ4WAb1cQ9nXYf4mIgEnQtX0LAbX6roGkIvxvA3AB?=
 =?us-ascii?Q?tWexX9NC5PeEFxoPykorua4oVnOiRh+xQHpDig4RLqawte4yprl7KuAsVtMc?=
 =?us-ascii?Q?YQYMH0vPyDI2rVsgGqzmkh8c+8Ey0M/jT8Q/LhDRkQdmxahlkEgCI4x4VxpC?=
 =?us-ascii?Q?vSu8lPE9KwIEDASCWaUdv2d0Hx8aa3BYRVZSFOJeMXOhrJEJrOdYxSrVYrzc?=
 =?us-ascii?Q?M3Dlqr+xMquW7nKqM6xV/dNT?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6328
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 DB5EUR03FT058.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	c9bb9275-2756-463a-c813-08d9145f2ee3
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	yDtxfTorGdsG4XFdUw2hGw3kiOataIKsqV1p2hzYFyJXOu0l/E0i7kFwBOskiq4761k4FOrmktBM2X8CYRXLkg5VQB9pqWZEQDbbTEotubl3vXKSyOAmGyxM7WM6TP0QQLrqcQ5MLDlR0D7cnQjEr3KJ+eHBMfQvaHahqpEQE/fIlclAqowwBHoASEZPrXyurBtoRzWTQVU+edh4lJ/T6DBWSxbZ0Rew6dl6tmHpZANEbhcg5ZtqP+HUL4v174iagkW9oR0zx0KmN6qMvaEFCPaAJCm4fdC09HcMvdQWw0MCInfmfbyD07W+zcpOjU8kqdj+Mqq6VRisk7wzH4h1+t5qTAE1Uaog4aiO2NMbaMh6jIhNngW3Jp2VgCjVDPfKpbJs3WjsNa0VYFaQlIwAaLLboSfHMmcpwWpH+YyXKXwCswqST8DQKuHO2pindzf5HrSBbaMvdzdFvYOt5zt7So4VDsOKcBr/LGc+oUeh/hcTUbdD0AHdd8+OAUlNpmM/8k+k8bgQdOo7zUNtQuPwmn6ITBY6sFSrOngGLJSbD39huRw/BV5qKgV4hecOTusG2zIbWcoBSuxnbyoIgvXGuZV5pkEExxPEgDmppbrKsySTmC+bL0gh5NXJTi8+V3BmLv6EdchZH19WX3oOkO9zxg==
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(346002)(396003)(376002)(39850400004)(136003)(36840700001)(46966006)(70206006)(70586007)(33656002)(478600001)(8676002)(7696005)(8936002)(186003)(47076005)(336012)(2906002)(82740400003)(9686003)(6506007)(5660300002)(6862004)(36860700001)(82310400003)(4326008)(53546011)(316002)(356005)(81166007)(83380400001)(55016002)(86362001)(52536014)(26005);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2021 09:29:59.1368
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: fde97c2c-ea55-4844-60a1-08d9145f58a7
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	DB5EUR03FT058.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1681

Hi Razvan

> -----Original Message-----
> From: Minios-devel <minios-devel-bounces@lists.xenproject.org> On Behalf =
Of
> Razvan Virtan
> Sent: Tuesday, March 16, 2021 12:55 AM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,01/35] plat/virtio: Introduce several helpers for
> virtio ring
>
> This patch looks good to me, I have only 2 inline sugestions for
> "virito_ring.c".
>
> diff --git a/plat/drivers/virtio/virtio_ring.c
> b/plat/drivers/virtio/virtio_ring.c
> index 0a5c3f3..bda7549 100644
> --- a/plat/drivers/virtio/virtio_ring.c
> +++ b/plat/drivers/virtio/virtio_ring.c
> @@ -262,6 +262,38 @@  __phys_addr virtqueue_physaddr(struct virtqueue *vq=
)
>       return ukplat_virt_to_phys(vrq->vring_mem);
>  }
>
> +__phys_addr virtqueue_get_avail_addr(struct virtqueue *vq)
> +{
> +     struct virtqueue_vring *vrq =3D NULL;
> +
> +     UK_ASSERT(vq);
> +
> +     vrq =3D to_virtqueue_vring(vq);
> Maybe `return ukplat_virt_to_phys((void *) vrq->vring.avail);` would be
> more straightforward?
> +     return virtqueue_physaddr(vq) +
> +             ((char *)vrq->vring.avail - (char *)vrq->vring.desc);
> +}
> +
> +__phys_addr virtqueue_get_used_addr(struct virtqueue *vq)
> +{
> +     struct virtqueue_vring *vrq =3D NULL;
> +
> +     UK_ASSERT(vq);
> +
> +     vrq =3D to_virtqueue_vring(vq);
> Maybe `return ukplat_virt_to_phys((void *) vrq->vring.used);` would be mo=
re
> straightforward?

I don't quite understand you suggestion here. Seems they are not equal.
ukplat_virt_to_phys((void *) vrq->vring.used) !=3D virtqueue_physaddr(vq) +=
 ((char *)vrq->vring.used - (char *)vrq->vring.desc)


--
Cheers,
Justin (Jia He)


> +     return virtqueue_physaddr(vq) +
> +             ((char *)vrq->vring.used - (char *)vrq->vring.desc);
> +}
> +
> +unsigned int virtqueue_vring_get_num(struct virtqueue *vq)
> +{
> +     struct virtqueue_vring *vrq =3D NULL;
> +
> +     UK_ASSERT(vq);
> +
> +     vrq =3D to_virtqueue_vring(vq);
> +     return vrq->vring.num;
> +}
> +
>
> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>

IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Tue May 11 09:31:47 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 11 May 2021 09:31:47 +0000
Received: from list by lists.xenproject.org with outflank-mailman.125698.236610 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgOjy-0001BI-P7; Tue, 11 May 2021 09:31:46 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 125698.236610; Tue, 11 May 2021 09:31:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgOjy-0001B8-LN; Tue, 11 May 2021 09:31:46 +0000
Received: by outflank-mailman (input) for mailman id 125698;
 Tue, 11 May 2021 09:31:46 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=9LXA=KG=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lgOjy-0001B2-3J
 for minios-devel@lists.xen.org; Tue, 11 May 2021 09:31:46 +0000
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (unknown
 [40.107.7.41]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 446d9679-43ab-4039-bfde-b862f3492d99;
 Tue, 11 May 2021 09:31:44 +0000 (UTC)
Received: from AM6P191CA0045.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:7f::22)
 by AM4PR08MB2865.eurprd08.prod.outlook.com (2603:10a6:205:d::14) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Tue, 11 May
 2021 09:28:59 +0000
Received: from AM5EUR03FT027.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:209:7f:cafe::d9) by AM6P191CA0045.outlook.office365.com
 (2603:10a6:209:7f::22) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend
 Transport; Tue, 11 May 2021 09:28:59 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 AM5EUR03FT027.mail.protection.outlook.com (10.152.16.138) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4108.25 via Frontend Transport; Tue, 11 May 2021 09:28:59 +0000
Received: ("Tessian outbound 52fcc5bd9d3a:v91");
 Tue, 11 May 2021 09:28:58 +0000
Received: from fda3aa518436.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 53881CE6-93B3-4CA9-BC99-0B7101BA4F9C.1; 
 Tue, 11 May 2021 09:28:51 +0000
Received: from EUR01-HE1-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fda3aa518436.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Tue, 11 May 2021 09:28:51 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AS8PR08MB6328.eurprd08.prod.outlook.com (2603:10a6:20b:33e::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Tue, 11 May
 2021 09:28:49 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Tue, 11 May 2021
 09:28:49 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 446d9679-43ab-4039-bfde-b862f3492d99
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=CbfZMcG8/pvHtR2oFgH048+i505TkvclgWoJZBeo0FY=;
 b=j3ctqsf/vR6mVOghbl/eXirirhKlNoV/SdUFLcQKFe3Onxzf/uy91Z4MmR9qPhI6J9kewqvl1PsuiBJKxvQnLH2HZ0ycyMoyar5Eyqy/dc5D76+AeAqWZQqYAFGac949imu1xM0gJ1TOPArM2UZDxklQDMvh1fUUbTj2tdkGrdc=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=jVpwww1n2F1E+I02fV1v1/2EtskZJvWKiLxhhokXuQ5IgJVCO6GAs3ayt1eYDOQOhxuJHfbwYaMzl0NNXF2RoJD6J73cSHcrovR+o7GoXiQNzYVVjE3utr93/PESOO3K/NX29YBPv09eQwHtaowoRJmX8yDzXSQotOtwoKPxJhQmxwGmH7kbXxxHX0eURoldJN3lI9QjOctd/7USiBOXNFqQ+xyqjKUGD1eabO/JERmPqL3fdU390u3p5REDQ3g6HvBeGGrvl9nP3PmsLFLV7M/yl8H7tJYWUTEQl82sAey3DHekKErnx+eujxSxxQYvrD3kKAorRpwDi1fPbJxC0w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=CbfZMcG8/pvHtR2oFgH048+i505TkvclgWoJZBeo0FY=;
 b=R0xDGpW76y4Khps4HRZSgGpmpiRHnz/WL4RNtfjCw3A/NmmURKylnjrAzImtzGmdd9JjLLZKYEgHWQ15pB/zmDJ+ypz8/gAx4ISVPcPfK0WMrX+2W4ca1w45r+RVQn48BdravMNCTeT+VD0RPiJtGYiu1Q5XjqKMA8J+mDS7+YfF46IiBqzJIWNUXjNmvqCGi8qNlxMNINRFcED9l7XMISb8YImJpMylauN0UeetWfYiwZ0v0Klvn7nU/8MEG19VAwgBlXcNp0GvGJvz2IB0qlw2zA+SwgjgINxJHkhFmak+kKygHnLEBhFK4Pdm6U5vAiV8tUaVb3hK6W3RWOPKQg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=CbfZMcG8/pvHtR2oFgH048+i505TkvclgWoJZBeo0FY=;
 b=j3ctqsf/vR6mVOghbl/eXirirhKlNoV/SdUFLcQKFe3Onxzf/uy91Z4MmR9qPhI6J9kewqvl1PsuiBJKxvQnLH2HZ0ycyMoyar5Eyqy/dc5D76+AeAqWZQqYAFGac949imu1xM0gJ1TOPArM2UZDxklQDMvh1fUUbTj2tdkGrdc=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,01/35] plat/virtio: Introduce several helpers for virtio
 ring
Thread-Topic: [RFCv4,01/35] plat/virtio: Introduce several helpers for virtio
 ring
Thread-Index: AQHXGbwCrdWcrRWCQUKZ8YVCogevuqreUlxQ
Date: Tue, 11 May 2021 09:28:48 +0000
Message-ID:
 <AM6PR08MB4376CEBAE442F42ABF30A276F7539@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-2-justin.he@arm.com>
 <20210315165452.30686-1-razvanvirtan@gmail.com>
In-Reply-To: <20210315165452.30686-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: C0E8892DE72EE846BA5922CDC67B9324.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.111]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 9d0650b3-532a-4e52-5def-08d9145f34dd
x-ms-traffictypediagnostic: AS8PR08MB6328:|AM4PR08MB2865:
X-Microsoft-Antispam-PRVS:
	<AM4PR08MB286589DB1B2327A4B9936DF9F7539@AM4PR08MB2865.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:1002;OLM:7691;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 jLDap4ZmREPmHDoRJr0bVCxF5QQCpPOa5WyIG3xscNvqrDbxpQKQYMd4bilRxVeBDOm/JEQ1eBDL8Xt2gqyPGsGVw8YXMB+/bXCZceQjnlzauG6KOJKRz/tBw1eptsTvaUOisZh5odRKyrltaz8x9V8nnAiIbjC0EFsMCQG1OqfScc+dg9KIa9utMEXdI4NREhJM5PqnxUz9Ekh/0/mljWVasdI8DK6TP4FOZLUMbDhXVxp+wIfUJCNC77jNUVXIEnbuyHoXo99L31PBL/ixl6Rfhi+ucQC8B8sE3QUkrwKBhM5zu3gmSg0z3IQJwfFGUKX8FAB6Q9b5SoPUBQlscKnHtabL1Qzt1+ChVpJnVmi1Oyw6TtGozIohLVoRM951kzlzFV7S7kgRVc6gUARR0SClD7MKOfdb15uQQcW1gnRAA6FsKmjOFUZrOLLUKvKkgrzAz8LieYGHtISZs7GDk3294OzvZ2XAFtPsjZvxHHtzsXvacVZZDBXRm0KCC0nXr0Wm+jF38Ys26+SS1ALEB430dheSvlZNS1kGs+aJiNaQixMTFhljJ5Eub9S0DMyJD6YjW/TsgDRKrVvciiviezSzw3+1vqaeP0EfZG0N484=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(136003)(346002)(376002)(39850400004)(396003)(6916009)(66476007)(316002)(4326008)(7696005)(66946007)(66446008)(66556008)(6506007)(83380400001)(64756008)(76116006)(8936002)(53546011)(33656002)(9686003)(86362001)(5660300002)(2906002)(186003)(52536014)(478600001)(71200400001)(122000001)(55016002)(8676002)(38100700002)(26005);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?Wbk8ddkSwD+PDVCRnZixl5BgQE6BOVAb+O/xivbmF0FMokcnaALuzkE2bPnP?=
 =?us-ascii?Q?9AWPVK1w3KMfTb8vTsu7ISWjXLjn+Ury6llS0zTkNpeme5HAL2Gdj9gTTZkn?=
 =?us-ascii?Q?BeNHEm0IAryU+N/DXRTmWS0KAxYo5R9Hf6cH8aEhHzATQZPZtYfx9nzyIuK5?=
 =?us-ascii?Q?k4EGvgl4pRjkEgcouAkkAZMmMI6D66OmtD31gJd4tR17bwGMVWcYJ6O0ieDJ?=
 =?us-ascii?Q?H0IHPGAOCXMA+ti2QmPsfahj/WemJN94poN1qkhxEugUm30UaH6uj4NERJxm?=
 =?us-ascii?Q?v7HjdrOQwDT8AwMrK4FCo+hnoewYYDFAMJLwNPC1RsZhq08hXLucQJLuZknc?=
 =?us-ascii?Q?jUl/lYcr5BkIkb6SZ5sYo/x8C36xoQo6EKm5MmQk8gLUe30H8RvI8OMuHsMJ?=
 =?us-ascii?Q?Qtm3NdCvXo92ZzbqiTsed0aVU7KLf3X+gOpEV21SgL5Ra0UTrIVUFRzkx4RB?=
 =?us-ascii?Q?hNRJ16OHquNh4SQDsNNfhyDlS8WVr0y9bxUHVFWDpwItNSa7xcNG8szgs6yI?=
 =?us-ascii?Q?6wQ5RYDjb/JntGi08t7exolO/xKBcyughhlWT1o5VwxxCHRe9jV/EKNnrlDU?=
 =?us-ascii?Q?Mw7mu6zbakz+d7tEV//pSE1ElpX3brmAp73ounTOFSN1LzG4nf0TmU8IVCJN?=
 =?us-ascii?Q?9KLQJTTqCWItkUmv85SZcRv4RB9OmkGrAYhjNSxo4t3NNM8SvVbDt8nrl6hG?=
 =?us-ascii?Q?Y0gTqgieRHFua/LRCuaQmYXgDFVb066j+UwlbdmqU6Jx+CLS+MZrvMqM2Rva?=
 =?us-ascii?Q?vgclnOwK+WknirvszdOVeLb8FXULTvxszF8CjegZTIR6kYt+zArxsYNgGrvg?=
 =?us-ascii?Q?Ks5IwTww08fFaZ0xmNPrVCfKR32sXpkf2EZ5oLZqGDKj03vvG20SdQ0KSk+z?=
 =?us-ascii?Q?i1D2a6rjS4IbbWVWBQKzupANNdtCIDzrQKEzCYi74kG0vF+AJVCunwxvWbfS?=
 =?us-ascii?Q?kjwDofymrmyDwQlqKCtkFoR4JHE9XDGKUcxLKNb/oGnIQKfy2vdhUPztvoAG?=
 =?us-ascii?Q?r/FdgDZu1g1pkapT2S67Z6e5q3jnc3k3fH5wd9AFXs9ziwSJoGkkii+aOPv/?=
 =?us-ascii?Q?4lGaLP2wVVm0VvwJ7ubWQ4WAb1cQ9nXYf4mIgEnQtX0LAbX6roGkIvxvA3AB?=
 =?us-ascii?Q?tWexX9NC5PeEFxoPykorua4oVnOiRh+xQHpDig4RLqawte4yprl7KuAsVtMc?=
 =?us-ascii?Q?YQYMH0vPyDI2rVsgGqzmkh8c+8Ey0M/jT8Q/LhDRkQdmxahlkEgCI4x4VxpC?=
 =?us-ascii?Q?vSu8lPE9KwIEDASCWaUdv2d0Hx8aa3BYRVZSFOJeMXOhrJEJrOdYxSrVYrzc?=
 =?us-ascii?Q?M3Dlqr+xMquW7nKqM6xV/dNT?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6328
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 AM5EUR03FT027.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	c9bb9275-2756-463a-c813-08d9145f2ee3
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	FgPQ8C8z5fYhURGf+zf78Z+GdC1TKw//2Y42txN3HMmMADH3K47NJzwhBf4wUsfOzFl7db5X9BXzDYJox8ALqwfKQ9+dIzUYnJ9ryMRngywYtbxP4MhU+aCxCdUPPcZh6dzvPb3Y8qhw7m0D3Bu4H/bcCuE9rdL5vgT4P++WicJUt1VXq5dDjz9Pjr5BeF7HEXmFgyWCkjc5WhcLTATngXpEuzaGs98hFdNHGdzhQxvoJsGLc3uAfn+pQVzv9YbNfR1xbtmt7aLngsV/5nv/FIfdKyd3XSGf67okyWzUhZaAjPClOsRPhnyHU4RnhYNJrIm4N3oEVqxfBuajzK7MTVVGDmcLGYG3J/PiUY+mFxV9C3vVS84I4UKZ2I0mNlSuBiRcOTa9hfsNFTzJ6xBcGMXSt9W91SaVHofUUqDUSzYPaCO2KMo6JBDCKdiPdU+qiGaNh23vvpRy7Sk2jncZgWSpM0dxa1Weulf/YIelyFyI3rAOc9ZU91VP6UsPx9lldxS/BBU2kW4y48wa107j87xRcyxJwkhGDOAmCvQeDa9+znnM+NLcSUBH3Bkoz6yyZoVfxX/Sb7upZtPwaQ1mt5HootyJ4Xrno5JVr/zjvNxypvPUjVlPDYGsiYjoWflqMnVQKIgusxx3FI9uuSUFng==
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(9686003)(55016002)(336012)(33656002)(8936002)(86362001)(7696005)(52536014)(81166007)(2906002)(36860700001)(8676002)(6862004)(6506007)(498600001)(47076005)(5660300002)(356005)(70206006)(70586007)(26005)(83380400001)(82310400003)(53546011)(186003)(4326008);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2021 09:28:59.0387
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 9d0650b3-532a-4e52-5def-08d9145f34dd
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	AM5EUR03FT027.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2865

Hi Razvan

> -----Original Message-----
> From: Minios-devel <minios-devel-bounces@lists.xenproject.org> On Behalf =
Of
> Razvan Virtan
> Sent: Tuesday, March 16, 2021 12:55 AM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,01/35] plat/virtio: Introduce several helpers for
> virtio ring
>
> This patch looks good to me, I have only 2 inline sugestions for
> "virito_ring.c".
>
> diff --git a/plat/drivers/virtio/virtio_ring.c
> b/plat/drivers/virtio/virtio_ring.c
> index 0a5c3f3..bda7549 100644
> --- a/plat/drivers/virtio/virtio_ring.c
> +++ b/plat/drivers/virtio/virtio_ring.c
> @@ -262,6 +262,38 @@  __phys_addr virtqueue_physaddr(struct virtqueue *vq=
)
>       return ukplat_virt_to_phys(vrq->vring_mem);
>  }
>
> +__phys_addr virtqueue_get_avail_addr(struct virtqueue *vq)
> +{
> +     struct virtqueue_vring *vrq =3D NULL;
> +
> +     UK_ASSERT(vq);
> +
> +     vrq =3D to_virtqueue_vring(vq);
> Maybe `return ukplat_virt_to_phys((void *) vrq->vring.avail);` would be
> more straightforward?
> +     return virtqueue_physaddr(vq) +
> +             ((char *)vrq->vring.avail - (char *)vrq->vring.desc);
> +}
> +
> +__phys_addr virtqueue_get_used_addr(struct virtqueue *vq)
> +{
> +     struct virtqueue_vring *vrq =3D NULL;
> +
> +     UK_ASSERT(vq);
> +
> +     vrq =3D to_virtqueue_vring(vq);
> Maybe `return ukplat_virt_to_phys((void *) vrq->vring.used);` would be mo=
re
> straightforward?

I don't quite understand you suggestion here. Seems they are not equal.
ukplat_virt_to_phys((void *) vrq->vring.used) !=3D virtqueue_physaddr(vq) +=
 ((char *)vrq->vring.used - (char *)vrq->vring.desc)


--
Cheers,
Justin (Jia He)


> +     return virtqueue_physaddr(vq) +
> +             ((char *)vrq->vring.used - (char *)vrq->vring.desc);
> +}
> +
> +unsigned int virtqueue_vring_get_num(struct virtqueue *vq)
> +{
> +     struct virtqueue_vring *vrq =3D NULL;
> +
> +     UK_ASSERT(vq);
> +
> +     vrq =3D to_virtqueue_vring(vq);
> +     return vrq->vring.num;
> +}
> +
>
> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>

IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Tue May 11 09:33:25 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 11 May 2021 09:33:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.125704.236614 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgOlY-0001Pb-UR; Tue, 11 May 2021 09:33:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 125704.236614; Tue, 11 May 2021 09:33:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgOlY-0001PU-Qr; Tue, 11 May 2021 09:33:24 +0000
Received: by outflank-mailman (input) for mailman id 125704;
 Tue, 11 May 2021 09:33:24 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=9LXA=KG=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lgOlY-0001Ou-23
 for minios-devel@lists.xen.org; Tue, 11 May 2021 09:33:24 +0000
Received: from EUR03-DB5-obe.outbound.protection.outlook.com (unknown
 [40.107.4.52]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id b070ae4d-f87a-475b-aba2-83e8a33ae886;
 Tue, 11 May 2021 09:33:22 +0000 (UTC)
Received: from AM6P194CA0023.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::36)
 by AM6PR08MB3926.eurprd08.prod.outlook.com (2603:10a6:20b:a7::14) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Tue, 11 May
 2021 09:33:20 +0000
Received: from AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:209:90:cafe::45) by AM6P194CA0023.outlook.office365.com
 (2603:10a6:209:90::36) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend
 Transport; Tue, 11 May 2021 09:33:20 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 AM5EUR03FT064.mail.protection.outlook.com (10.152.17.53) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4108.25 via Frontend Transport; Tue, 11 May 2021 09:33:19 +0000
Received: ("Tessian outbound 52fcc5bd9d3a:v91");
 Tue, 11 May 2021 09:33:19 +0000
Received: from c98db275d4fa.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 8232DCD6-479C-4B9E-97BD-30450D8F519F.1; 
 Tue, 11 May 2021 09:33:13 +0000
Received: from EUR05-VI1-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c98db275d4fa.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Tue, 11 May 2021 09:33:13 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AM5PR0801MB1857.eurprd08.prod.outlook.com (2603:10a6:203:4e::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Tue, 11 May
 2021 09:33:11 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Tue, 11 May 2021
 09:33:10 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: b070ae4d-f87a-475b-aba2-83e8a33ae886
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4KJMd+8k1UJAunkbrNFFpZrqto1Aglf9EVhNo4blOIE=;
 b=y9Vq1weDjrkzU+v1cny49d7YFpnkTuBQjWijP8JcS2qkMjZHj87Zt9xJKN1aKmxei3BGJSK/Npu+VDTG59UBX4mJWLipBQ0WZuCbUrFtym4Y18tRS89BzbvukBSs+e3wQ6VaPh1306wGWzCnM+YfvZFgF0PPYwiykwSwevsZKuk=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=jpXKbidbl8NI/6LIAumJ6JpCFQRhtRByCIS66SkGyI6sCSOPOS5vJs1/7e762mnlf5RTdjMVIBMMd6B/i8VQrfQv22fFkC6eL9mF87EPSS3Q/F3iwfBSfSxGDRJJoPr2cB7CHnTIECimAXUJqDwBjPTNthBGIPAUeQh7hZJV3zgz2F2j65S8HTM22norznFXNXmaKvgDUy6Yvmm2tuUY2m8x41s+w6QRRweLQEvLtpo+rbDXNypN9aXy+Dy85EyRfxqqPgEvdBLcw9YyE0vE9ymRJqCwFitKa/OOTI7OxsRXOPph+9SF6zbaVqSjmq01X20yfbPfK7dYL/Q5JMqMMg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4KJMd+8k1UJAunkbrNFFpZrqto1Aglf9EVhNo4blOIE=;
 b=OTjMNb34ET/zKcj6yZrxKwuXEKT7l1UWwONGCSIaUZ4tnlOuXy2meXj0AxjVEu61n9nEDOognLm8PXEWtQW/glDnlQBprf9bKOMc3CHzzj+0A11HpQeKuZoWv6BX/qlVMzyFF+wNT5flYu3gdenhw1V0mHDX1Oys9Y1hA/z6Bawbq6S5g1X6P1EZcoGvgL/q28hweBYK8hVHi4pzDPaiPGotXJHQYFeB5bl4NWEiIHcaqCJ2nWdQGQbOgUvPTK7EyRAhywcJe9DpFsP5dPdlDSXPD07y2xA/13Ur7Y7czCBpvWFXP7R+jsSl0NI6yBz7cZyITgAgcQx+sSx2M/PXIA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4KJMd+8k1UJAunkbrNFFpZrqto1Aglf9EVhNo4blOIE=;
 b=y9Vq1weDjrkzU+v1cny49d7YFpnkTuBQjWijP8JcS2qkMjZHj87Zt9xJKN1aKmxei3BGJSK/Npu+VDTG59UBX4mJWLipBQ0WZuCbUrFtym4Y18tRS89BzbvukBSs+e3wQ6VaPh1306wGWzCnM+YfvZFgF0PPYwiykwSwevsZKuk=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,04/35] plat/virtio: Add new virtio_mmio device/driver on
 arm64 
Thread-Topic: [RFCv4,04/35] plat/virtio: Add new virtio_mmio device/driver on
 arm64 
Thread-Index: AQHXKJfmNHQOSl9pQEWewFAtn5MscKreP99g
Date: Tue, 11 May 2021 09:33:09 +0000
Message-ID:
 <AM6PR08MB43762896F8F4D57ADEB63536F7539@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-5-justin.he@arm.com>
 <20210403144435.23176-1-razvanvirtan@gmail.com>
In-Reply-To: <20210403144435.23176-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: FAB8740821CEC346A05008F59853ACC3.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.111]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 7c3d2169-18c4-4662-f813-08d9145fd048
x-ms-traffictypediagnostic: AM5PR0801MB1857:|AM6PR08MB3926:
X-Microsoft-Antispam-PRVS:
	<AM6PR08MB39269F213BE76131B49EE105F7539@AM6PR08MB3926.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 ve3NXh1of/fjAwoK0waidmVg0THYNXQHJBy4TG5KXUohMsJKOEOo7GWNWnpoKidnGGq9yiLjUjASp1Qo82ipzUKwx/chri+wqlSFbV/DhS5N+UXQGUNcbY84JbBivlv9C5rJqik9wTBaZ7WIKl4dUkiOrPYyvKYqV3ObOou/cLJlq90CroMCSndXgpw5HVpH8SVL0Em7zm9ZISLEE9eAAkHPqHrY+GZ0fOdR2IR5mPStELUwE7kH2sgr48BjniHZ0TNeodUHyDeOnIx51AzGW4ocomKO9efuCEL1W2XvrxbHsvg0q13O1QHBhrfSH+QcySmknxCj4/RYH/uEJpRDKw8LC2vX2cwV8p/0//H/oB73F8b+rj+AB3hOLdeoxrmWX/2Lb6QzgfWjSqpUfQPjUycT9kwT+tITOMooeX1Khz6YBi747RMNJeJkdc6kil2hvRqfNXxoOa2rj37fUI3pDBcUOtPvUUV4NBmWaPolVVSLxcP5s3wanXRUcjZQV3kzQ21h07i9gJ7/j89rfwBTKMM2LXr1/ZyAbHiAV9HME93/ArpBJyDJ4rVrvR1LjgpLdSh8d3gFpffX3ZwPMwHDYFWnGA85cOkNYt0Knqa/4LM=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39850400004)(376002)(366004)(396003)(136003)(346002)(53546011)(6506007)(8936002)(478600001)(7696005)(8676002)(5660300002)(30864003)(55016002)(6916009)(9686003)(4743002)(4326008)(66446008)(64756008)(86362001)(71200400001)(122000001)(83380400001)(316002)(52536014)(66946007)(26005)(186003)(66556008)(38100700002)(33656002)(66476007)(2906002)(76116006);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?yoNRx0wEZZB0FwF19lLhaCDDVnrtCFvdeawR9RvNU5VhZWrgbWMkU+t3/hxV?=
 =?us-ascii?Q?OCx2bP/Xv73TLYU2tEXdHJLcTaRd13o3tprTpIs5m0UwDCGaIC9jb1kAC3OQ?=
 =?us-ascii?Q?sBfbBVK61wXfWpQl8Lp7EP6cKW3cwTQa3aCwxrdsSaoCQidQmwrMZTZC3S6Q?=
 =?us-ascii?Q?PU0BKRELNg3d4jtvw0Ubr/Pn8rCjDYnDGZxqFNqqh42mTc4nbCRWTJExG/up?=
 =?us-ascii?Q?nWlOE1cZp1UPCvYcZXx42Pnk0tB1DbATH4mxXi6ZuhaE7ZCQouvHYFBI0ndQ?=
 =?us-ascii?Q?pVd8/17vQWMySkNprvv1JFuVQ8YOzqHHmCqSclnjzPkQqOuc8SWDGSJXyYqP?=
 =?us-ascii?Q?5plif97sIlfu2LSQVMo9s8CKbcKM5vjHRZTyOW9aTO+uUpCcjzTIlG4DyP4f?=
 =?us-ascii?Q?Ws2mTNImnXcb4GolRI3g09Np0vR9mCZ+8ZwsVlyCfhqE+NDE40aLShkjpfp5?=
 =?us-ascii?Q?XQ/twFgXZlNfQnlka7S/UwTcFgKC5zBefo6ac5a5d59xZ8sqzqDWCIRaH1OE?=
 =?us-ascii?Q?SZrfSHeGuBbBhYaysUv/6QHuOM9fbSb6gK70uuNDgT7sAhNT8/tPrz+fCc1F?=
 =?us-ascii?Q?d7jvLCmsCdlwgRTcghJqjeXq4/DJb3zCVZlOtUa2XOLjwU/71t9XXROKn3jH?=
 =?us-ascii?Q?D9SkNq4wkuZ0yozhIdRDjtUbJ0vFeCZ7GUpCC+nDMCerBXHYMq3k0/vnK+PX?=
 =?us-ascii?Q?a5U+ZMLGl2CsDD9ac2nJSGDkrSNSfmnt0wshDNbS7fZZVcDVaILEhMQU4Ody?=
 =?us-ascii?Q?9ArLDwlJQRrn0M4Fh9k6tFxQdOWvT/1L43CZNxRcXTjgoMbffVQq59g144rK?=
 =?us-ascii?Q?e47GjmKmGL2V8Guf4IW+dG+mpbPPT+LmmKhbVMp682gO1r2u3n6qHsEidiEp?=
 =?us-ascii?Q?i+bCjK8DwRqmk2l5D+b8yNV0Qns2mzvta6WknCnhbH4Y9vfKHvZXvhj6wysX?=
 =?us-ascii?Q?prKRmEytsSglIgPb6dJ3KkU94fFNSjDMRKL//9QIdTTq5ZqaJiVSm7J2m9O9?=
 =?us-ascii?Q?OzeLmJSBB1Z41JqLZ4KaobmqvlY6Q/iYvMWailln2rsa3+rkBpTTVZSQnMTZ?=
 =?us-ascii?Q?j5pC0hyL2UeKgXtEZ7DITSNJ4HS/27hgY/gpivkZ+scWwAhDM/rBu3lLjhRj?=
 =?us-ascii?Q?V+Pd9Ct1kz9Sj63/VNmC3/JqFWVv7NhfWgXwkkY8C7rj8c38OGhrFzwogxnU?=
 =?us-ascii?Q?tAV37tz3Q7MlxSuz0TYPtIeijX8iHNwtTRo4H0S2oW+aJFl+1EXUu3Frx93C?=
 =?us-ascii?Q?gcfrIJvpoEDpfYV492qAO2LgcgunOxyXmMKsOP9WzmpWNChOQ7IRRERJ943y?=
 =?us-ascii?Q?Oi4rOa/8WdFNynGRoQmYMW2A?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1857
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	5d3a5885-d2f0-4eab-2923-08d9145fca70
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	aqs+Kw/8dk62S2M100vGx7ZZ/O1W+zPHtVCBnhVPNdk7QE0ofjhdGOOYxh88+v3lGUl4MeNPSnKJF4qSkAu0D/vt7zUDIOCmBBQuqFHCzll1FhSMfU3Mh3G7NWbknQdRgSoM5eNlZPH6uHDzcCbn8jlNftccBeFWfrKrzKjDcIR5xkRCO1C6Lj1766QwxB0PV0Ow/bamp8q9/mBuAJK4WIQQrTgBmZ8bBNPjg5z+R/mBzNTbQup1FR0fEG5EknaUlgvCihUu7tBoxYV+5EQgLPpjZLFB2KrB48vMnvEKO8KnsWfZUteepcX3QizWenOG7FnE1Y/7ZpTG2jBDKZPp7UwYi/eID4yHBvS964KTgTU3YCgBxR01SUk7z75pzRKNcDNrhZ0ji9KG6+mQtsBpK7pByHlpSj+9hS42Jt/lZp5pz7L1V2MPfg6J92F3iH3Bj36WrHuCou77wZG2KjdIc2fP/Ct1aGih6E2JFYArx2wM4ys89PawNyzsF0WgixBk5LIz2skOpmWbjfKwj58tZgIiahH7nqPARtgAfeB/kfxcPIpezSOeRRZV0s+5EF+CCOey2svBiTNeltwWZLHr4JXgCMb+sV3AXF/hKsVX9xpk5kja9c85il9dzFa/mHgpKIQ0c2aH1M6SI4oD9M8t/JgUbLHb51pPGnEGAuC4pn0=
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(7696005)(33656002)(6862004)(81166007)(30864003)(26005)(9686003)(55016002)(82310400003)(83380400001)(356005)(36860700001)(4743002)(336012)(6506007)(52536014)(86362001)(8676002)(53546011)(498600001)(47076005)(70586007)(4326008)(5660300002)(8936002)(186003)(70206006)(2906002);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2021 09:33:19.7937
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 7c3d2169-18c4-4662-f813-08d9145fd048
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3926



> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Saturday, April 3, 2021 10:45 PM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,04/35] plat/virtio: Add new virtio_mmio device/driver
> on arm64
>
> Hi, Justin.
> This patch looks good, I've only found some minor typos. I'll let them he=
re,
> as
> inline comments.
>
> diff --git a/plat/drivers/virtio/virtio_mmio.c
> b/plat/drivers/virtio/virtio_mmio.c
> new file mode 100644
> index 0000000..6716153
> --- /dev/null
> +++ b/plat/drivers/virtio/virtio_mmio.c
> @@ -0,0 +1,480 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Jia He <justin.he@arm.com>
> + *
> + * Copyright (c) 2020, Arm Ltd. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in th=
e
> + *    documentation and/or other materials provided with the distributio=
n.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived fr=
om
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "=
AS
> IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTOR=
S
> BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER =
IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS=
E)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED O=
F
> THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
> + */
> +
> +#include <uk/config.h>
> +#include <uk/arch/types.h>
> +#include <errno.h>
> +#include <string.h>
> +#include <uk/alloc.h>
> +#include <uk/print.h>
> +#include <uk/plat/lcpu.h>
> +#include <uk/plat/irq.h>
> +#include <uk/bus.h>
> +#include <uk/bitops.h>
> +
> +#include <platform_bus.h>
> +#include <virtio/virtio_config.h>
> +#include <virtio/virtio_bus.h>
> +#include <virtio/virtqueue.h>
> +#include <virtio/virtio_mmio.h>
> +
> +/* The alignment to use between consumer and producer parts of vring.
> + * Currently hardcoded to the page size. */
> +#define VIRTIO_MMIO_VRING_ALIGN              __PAGE_SIZE
> +
> +static struct uk_alloc *a;
> +struct virtio_mmio_device_id {
> +     uint16_t device_id;
> +     uint32_t vendor;
> +};
> +
> +struct virtio_mmio_device {
> +     struct virtio_dev vdev;
> +     char *name;
> +     struct virtio_mmio_device_id  id;
> +     struct virtio_mmio_driver     *drv;
> +     unsigned long version;
> +     unsigned long irq;
> +     void *base;
> +     struct pf_device *pfdev;
> +};
> +
> +#define to_virtio_mmio_device(_dev) \
> +     __containerof(_dev, struct virtio_mmio_device, vdev)
> +
> +struct virtio_mmio_vq_info {
> +     /* the actual virtqueue */
> +     struct virtqueue *vq;
> +};
> +typedef void vq_callback_t(struct virtqueue *);
> +
> +/* Configuration interface */
> +
> +static __u64 vm_get_features(struct virtio_dev *vdev)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +     __u64 features =3D 0;
> +
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DEVICE_FEATURES_SEL, 1);
> +     features =3D virtio_cread32(vm_dev->base, VIRTIO_MMIO_DEVICE_FEATUR=
ES);
> +     features <<=3D 32;
> +
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DEVICE_FEATURES_SEL, 0);
> +     features |=3D virtio_cread32(vm_dev->base,
> VIRTIO_MMIO_DEVICE_FEATURES);
> +
> +     return features;
> +}
> +
> +static void vm_set_features(struct virtio_dev *vdev,
> +                                      __u64 features)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +
> +     /* Give virtio_ring a chance to accept features. */
> +     virtqueue_feature_negotiate(features);
> +
>
>   "Make sure there are no mixed devices"
>
> +     /* Make sure there is are no mixed devices */
> +     if (vm_dev->version =3D=3D 2 &&
> +             !uk_test_bit(VIRTIO_F_VERSION_1, &vdev->features)) {
> +             uk_pr_err("New virtio-mmio devices (version 2) must provide
> VIRTIO_F_VERSION_1 feature!\n");
> +             return;
> +     }
> +
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES_SEL, 1);
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES,
> +                                             (__u32)(vdev->features >> 3=
2));
> +
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES_SEL, 0);
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES,
> +                                             (__u32)vdev->features);
> +
> +     return;
> +}
> +
> +static int vm_get(struct virtio_dev *vdev, __u16 offset,
> +                void *buf, __u32 len, __u8 type_len __unused)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +     void *base =3D vm_dev->base + VIRTIO_MMIO_CONFIG;
> +     __u8 b;
> +     __u16 w;
> +     __u32 l;
> +
> +     if (vm_dev->version =3D=3D 1) {
> +             __u8 *ptr =3D buf;
> +             unsigned i;
> +
> +             for (i =3D 0; i < len; i++)
> +                     ptr[i] =3D virtio_cread8(base, offset + i);
> +             return len;
> +     }
> +
> +     switch (len) {
> +     case 1:
> +             b =3D virtio_cread8(base, offset);
> +             memcpy(buf, &b, sizeof b);
> +             break;
> +     case 2:
> +             w =3D (virtio_cread16(base, offset));
> +             memcpy(buf, &w, sizeof w);
> +             break;
> +     case 4:
> +             l =3D (virtio_cread32(base, offset));
> +             memcpy(buf, &l, sizeof l);
> +             break;
> +     case 8:
> +             l =3D (virtio_cread32(base, offset));
> +             memcpy(buf, &l, sizeof l);
> +             l =3D (virtio_cread32(base, offset + sizeof l));
> +             memcpy(buf + sizeof l, &l, sizeof l);
> +             break;
> +     default:
> +             uk_pr_err("Not supported length(%d) for io read\n", len);
> +             UK_BUG();
> +     }
> +
> +     return len;
> +}
> +
> +static int vm_set(struct virtio_dev *vdev, __u16 offset,
> +                const void *buf, __u32 len)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +     void *base =3D vm_dev->base + VIRTIO_MMIO_CONFIG;
> +     __u8 b;
> +     __u16 w;
> +     __u32 l;
> +
> +     if (vm_dev->version =3D=3D 1) {
> +             const __u8 *ptr =3D buf;
> +             __u32 i;
> +
> +             for (i =3D 0; i < len; i++)
> +                     virtio_cwrite8(base, offset + i, ptr[i]);
> +             return 0;
> +     }
> +
> +     switch (len) {
> +     case 1:
> +             memcpy(&b, buf, sizeof b);
> +             virtio_cwrite8(base, offset, b);
> +             break;
> +     case 2:
> +             memcpy(&w, buf, sizeof w);
> +             virtio_cwrite16(base, offset, w);
> +             break;
> +     case 4:
> +             memcpy(&l, buf, sizeof l);
> +             virtio_cwrite32(base, offset, l);
> +             break;
> +     case 8:
> +             memcpy(&l, buf, sizeof l);
> +             virtio_cwrite32(base, offset, l);
> +             memcpy(&l, buf + sizeof l, sizeof(l));
> +             virtio_cwrite32(base, offset + sizeof l, l);
> +             break;
> +     default:
> +             uk_pr_err("Not supported length(%d) for io write\n", len);
> +             UK_BUG();
> +     }
> +
> +     return 0;
> +}
> +
> +static __u8 vm_get_status(struct virtio_dev *vdev)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +
> +     return virtio_cread32(vm_dev->base, VIRTIO_MMIO_STATUS) & 0xff;
> +}
> +
> +static void vm_set_status(struct virtio_dev *vdev, __u8 status)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +
> +     /* We should never be setting status to 0. */
> +     UK_BUGON(status =3D=3D 0);
> +
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_STATUS, status);
> +}
> +
> +static void vm_reset(struct virtio_dev *vdev)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +
> +     /* 0 status means a reset. */
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_STATUS, 0);
> +}
> +
> +/* Transport interface */
> +
> +/* the notify function used when creating a virt queue */
> +static int vm_notify(struct virtio_dev *vdev, __u16 queue_id)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +
> +     /* We write the queue's selector into the notification register to
> +      * signal the other end */
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_NOTIFY, queue_id);
> +     return 1;
> +}
> +
> +/* Notify all virtqueues on an interrupt. */
> +static int vm_interrupt(void *opaque)
> +{
> +     struct virtio_mmio_device *vm_dev =3D opaque;
> +     unsigned long status;
> +     unsigned long flags;
> +     int rc =3D 0;
> +     struct virtqueue *vq;
> +
> +     /* Read and acknowledge interrupts */
> +     status =3D virtio_cread32(vm_dev->base, VIRTIO_MMIO_INTERRUPT_STATU=
S);
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_INTERRUPT_ACK, status);
> +
> +     if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) {
> +             uk_pr_warn("Unsupported config change interrupt received on
> virtio-mmio device %p\n",
> +                        vm_dev);
> +     }
> +
> +     if (likely(status & VIRTIO_MMIO_INT_VRING)) {
> +             flags =3D ukplat_lcpu_save_irqf();
> +             UK_TAILQ_FOREACH(vq, &vm_dev->vdev.vqs, next) {
> +                     rc |=3D virtqueue_ring_interrupt(vq);
> +             }
> +             ukplat_lcpu_restore_irqf(flags);
> +     }
> +
> +     return rc;
> +}
> +
> +
> +static struct virtqueue *vm_setup_vq(struct virtio_dev *vdev,
> +                                     __u16 queue_id,
> +                                     __u16 num_desc,
> +                                     virtqueue_callback_t callback,
> +                                     struct uk_alloc *a)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +     struct virtqueue *vq;
> +     unsigned long flags;
> +
> +     /* Create the vring */
> +     vq =3D virtqueue_create(queue_id, num_desc, VIRTIO_MMIO_VRING_ALIGN=
,
> +                           callback, vm_notify, vdev, a);
> +
> +     if (PTRISERR(vq)) {
> +             uk_pr_err("Failed to create the virtqueue: %d\n",
> +                       PTR2ERR(vq));
> +
> +             goto err_exit;
> +     }
> +
> +     /* Select the queue we're interested in */
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_SEL, queue_id);
> +
> +     /* Activate the queue */
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_NUM,
> (__u32)virtqueue_vring_get_num(vq));
> +     if (vm_dev->version =3D=3D 1) {
> +
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_ALIGN,
> __PAGE_SIZE);
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_PFN,
> +                                     virtqueue_physaddr(vq) >> __PAGE_SH=
IFT);
> +     } else {
> +             __u64 addr;
> +             addr =3D virtqueue_physaddr(vq);
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_DESC_LOW,
> (__u32)addr);
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_DESC_HIGH,
> +                                                             (__u32)(add=
r >> 32));
> +
> +             addr =3D virtqueue_get_avail_addr(vq);
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_AVAIL_LOW,
> (__u32)addr);
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_AVAIL_HIGH,
> +                                                             (__u32)(add=
r >> 32));
> +
> +             addr =3D  virtqueue_get_used_addr(vq);
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_USED_LOW,
> (__u32)addr);
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_USED_HIGH,
> +                                                             (__u32)(add=
r >> 32));
> +
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_READY, 1);
> +     }
> +
> +     flags =3D ukplat_lcpu_save_irqf();
> +     UK_TAILQ_INSERT_TAIL(&vm_dev->vdev.vqs, vq, next);
> +     ukplat_lcpu_restore_irqf(flags);
> +
> +err_exit:
> +     return vq;
> +}
> +
> +static int vm_find_vqs(struct virtio_dev *vdev, __u16 num_vqs, __u16
> *qdesc_size)
> +{
> +     struct virtio_mmio_device *vm_dev =3D to_virtio_mmio_device(vdev);
> +     unsigned int irq =3D vm_dev->pfdev->irq;
> +     int i, err;
> +     int vq_cnt =3D 0;
> +
> +     err =3D ukplat_irq_register(irq, vm_interrupt, vm_dev);
> +     if (err)
> +             return err;
> +
> +     for (i =3D 0; i < num_vqs; ++i) {
> +             /* Select the queue we're interested in */
> +             virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_SEL, i);
> +
> +             /* Queue shouldn't already be set up. */
> +             if (virtio_cread32(vm_dev->base, (vm_dev->version =3D=3D 1 =
?
> +                             VIRTIO_MMIO_QUEUE_PFN :
> VIRTIO_MMIO_QUEUE_READY))) {
> +                     uk_pr_err("vm_find_vqs error mmio queue not ready\n=
");
> +                     err =3D -ENOENT;
> +                     goto error_exit;
> +             }
> +
> +             qdesc_size[i] =3D virtio_cread32(vm_dev->base,
> VIRTIO_MMIO_QUEUE_NUM_MAX);
> +             if (qdesc_size[i] =3D=3D 0) {
> +                     err =3D -ENOENT;
> +                     goto error_exit;
> +             }
> +
> +             vq_cnt++;
> +     }
> +
> +     return vq_cnt;
> +error_exit:
> +     uk_pr_err("err in vm_find_vqs :%d\n", err);
> +     return err;
> +}
> +
> +static struct virtio_config_ops virtio_mmio_config_ops =3D {
> +     .config_get     =3D vm_get,
> +     .config_set     =3D vm_set,
> +     .status_get     =3D vm_get_status,
> +     .status_set     =3D vm_set_status,
> +     .device_reset   =3D vm_reset,
> +     .features_get   =3D vm_get_features,
> +     .features_set   =3D vm_set_features,
> +     .vqs_find       =3D vm_find_vqs,
> +     .vq_setup       =3D vm_setup_vq,
> +};
> +
> +static int virtio_mmio_add_dev(struct pf_device *pfdev)
> +{
> +     struct virtio_mmio_device *vm_dev;
> +     unsigned int magic;
> +     int rc;
> +
> +     UK_ASSERT(pfdev !=3D NULL);
> +     uk_pr_info("virtio_mmio_add dev\n");
> +
> +     vm_dev =3D uk_malloc(a, sizeof(*vm_dev));
> +     if (!vm_dev) {
>
>   "Failed to allocate virtio-mmio...." (instead of virtio-pci)
>
> +             uk_pr_err("Failed to allocate virtio-pci device\n");
> +             return -ENOMEM;
> +     }
> +
> +     /* Fetch Pf Device information */
> +     vm_dev->pfdev =3D pfdev;
> +     vm_dev->base =3D (void *)pfdev->base;
> +     vm_dev->vdev.cops =3D &virtio_mmio_config_ops;
> +     vm_dev->name =3D "virtio_mmio";
> +
> +     if (vm_dev->base =3D=3D NULL)
> +             return -EFAULT;
> +
> +     magic =3D virtio_cread32(vm_dev->base, VIRTIO_MMIO_MAGIC_VALUE);
> +     if (magic !=3D ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) {
> +             uk_pr_err("Wrong magic value 0x%x!\n", magic);
> +             return -ENODEV;
> +     }
> +
> +     /* Check device version */
> +     vm_dev->version =3D virtio_cread32(vm_dev->base, VIRTIO_MMIO_VERSIO=
N);
> +     if (vm_dev->version < 1 || vm_dev->version > 2) {
> +             uk_pr_err("Version %ld not supported!\n", vm_dev->version);
> +             return -ENXIO;
> +     }
> +
> +     vm_dev->vdev.id.virtio_device_id =3D virtio_cread32(vm_dev->base,
> VIRTIO_MMIO_DEVICE_ID);
> +     if (vm_dev->vdev.id.virtio_device_id =3D=3D 0) {
> +             /*
> +              * virtio-mmio device with an ID 0 is a (dummy) placeholder
> +              * with no function. End probing now with no error reported=
.
> +              */
> +             uk_pr_err("virtio_device_id is 0\n");
> +
> +             return -ENODEV;
> +     }
> +     vm_dev->id.vendor =3D virtio_cread32(vm_dev->base,
> VIRTIO_MMIO_VENDOR_ID);
> +
> +     virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_GUEST_PAGE_SIZE,
> __PAGE_SIZE);
> +
> +     rc =3D virtio_bus_register_device(&vm_dev->vdev);
> +     if (rc !=3D 0) {
> +             uk_pr_err("Failed to register the virtio device: %d\n", rc)=
;
> +             goto free_pf_dev;
> +     }
> +
> +     uk_pr_info("finish add a virtio mmio dev\n");
> +
> +     return rc;
> +
> +free_pf_dev:
> +     uk_free(a, vm_dev);
> +
> +     return 0;
> +}
> +
> +static int virtio_mmio_drv_init(struct uk_alloc *drv_allocator)
> +{
> +     /* driver initialization */
> +     if (!drv_allocator)
> +             return -EINVAL;
> +
> +     a =3D drv_allocator;
> +
> +     return 0;
> +}
> +
> +static const struct pf_device_id virtio_mmio_ids =3D {
> +             .device_id =3D VIRTIO_MMIO_ID
> +};
> +
> +static struct pf_driver virtio_mmio_drv =3D {
> +     .device_ids =3D &virtio_mmio_ids,
> +     .init =3D virtio_mmio_drv_init,
> +     .add_dev =3D virtio_mmio_add_dev
> +};
> +
> +PF_REGISTER_DRIVER(&virtio_mmio_drv);
>
>
> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Thanks, will update the comments as you suggested

--
Cheers,
Justin (Jia He)


IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Tue May 11 15:34:24 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 11 May 2021 15:34:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.125790.236772 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgUOr-0008Qe-42; Tue, 11 May 2021 15:34:21 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 125790.236772; Tue, 11 May 2021 15:34:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lgUOr-0008QX-0Y; Tue, 11 May 2021 15:34:21 +0000
Received: by outflank-mailman (input) for mailman id 125790;
 Tue, 11 May 2021 15:34:19 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=9LXA=KG=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lgUOp-0008QR-2U
 for minios-devel@lists.xen.org; Tue, 11 May 2021 15:34:19 +0000
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (unknown
 [40.107.6.88]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 6ae5d461-8103-4c27-964b-21c2cfca01f7;
 Tue, 11 May 2021 15:34:16 +0000 (UTC)
Received: from AM6P192CA0051.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::28)
 by VI1PR0801MB1661.eurprd08.prod.outlook.com (2603:10a6:800:56::21) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Tue, 11 May
 2021 15:34:15 +0000
Received: from VE1EUR03FT015.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:209:82:cafe::1e) by AM6P192CA0051.outlook.office365.com
 (2603:10a6:209:82::28) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend
 Transport; Tue, 11 May 2021 15:34:15 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 VE1EUR03FT015.mail.protection.outlook.com (10.152.18.176) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4108.25 via Frontend Transport; Tue, 11 May 2021 15:34:14 +0000
Received: ("Tessian outbound 9a5bb9d11315:v91");
 Tue, 11 May 2021 15:34:14 +0000
Received: from 5c2f1ecfabfc.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 495A1384-F5AA-4B63-821F-4A4CD7DC115D.1; 
 Tue, 11 May 2021 15:34:08 +0000
Received: from EUR04-VI1-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5c2f1ecfabfc.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Tue, 11 May 2021 15:34:08 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AM6PR08MB3750.eurprd08.prod.outlook.com (2603:10a6:20b:81::24)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24; Tue, 11 May
 2021 15:34:06 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Tue, 11 May 2021
 15:34:06 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 6ae5d461-8103-4c27-964b-21c2cfca01f7
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=r7u3knyj/4E/FhKVYjT1av13FHICvJ1dVg179keUfHk=;
 b=7zUDRDtrkw7LpUkJ9tKUdSwzIulq1Pyr82gUtQjNS+D55TgYkK39nSaTSNA0qNt1BW4jkN8G5e0G31ke8l0xVkclkuEewdBbToN0Q5wtfa3P4+Nx7psM8oStOcNnHdPZtqjMidan6DmVqPTmLXkkp2AheSub3ulqP591hxXn49k=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=ejwpn6/dpyJiOqtQmJiJsqwVz/l67PhN3UNXbWm7i+T0cng1faxElJP3lmlqvSTrAvan6sAVwqcHUV4DcRJBkaclDudn6hYtm/2k9Q/GoF1n7kvW7VZB+3S9/JCv7FsKIyTwpKM5PAMbuU6RyuPvCIx9xVl5hqcDojxVIIFnHOubspO17os9NPapr8bbIXxGBmnYbIoYe+B6caBFeIYA8flW73NEDd2BlQtbKjB3DX2TLMTLIC5aZQREZG0y2kYRcVS6HpQMSDFEC420RAgq8ie/0MdcQxCRdsFioV38lNSB2NUZdfpL+FqhtB6fZ8N17WrgOUjVu1JyiBxD5WyKug==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=r7u3knyj/4E/FhKVYjT1av13FHICvJ1dVg179keUfHk=;
 b=a4CabybQd5OXFRAY6jFgFtnFmcwyM5rUlqq4CWY2XDCxOyrGN3YFn880xHf0aQY8IRk+nxbxR85j9c4uGiQ1/amYMfm1eZOUxfsPlBl7CidoDLWusR/3bziOw3+VbZvEiiCdP+Vf+G8+fEghAOi/QcY5nWogjeA4lMldQMDSXC7VE+hpuGTpRjU0t0Bct2i13h7uqJOVmGjEKxCv174zWEvHFmm/mScvf9tyzJv2WrGxXM4mWJa4i5a2DsEn9UPnh6It2rbxI8ET7SzH47ozOtoatFgsvjN2tTb5EbdG8ebFV6oaRSSbCKD1lhZ8UcV24NXsIKr1oFAMUBEQ3aD5cQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=r7u3knyj/4E/FhKVYjT1av13FHICvJ1dVg179keUfHk=;
 b=7zUDRDtrkw7LpUkJ9tKUdSwzIulq1Pyr82gUtQjNS+D55TgYkK39nSaTSNA0qNt1BW4jkN8G5e0G31ke8l0xVkclkuEewdBbToN0Q5wtfa3P4+Nx7psM8oStOcNnHdPZtqjMidan6DmVqPTmLXkkp2AheSub3ulqP591hxXn49k=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,07/35] plat/ofw: Export fdt_find_irq_parent_offset 
Thread-Topic: [RFCv4,07/35] plat/ofw: Export fdt_find_irq_parent_offset 
Thread-Index: AQHXMs2U3jrZqn5pdEKOxMotbMuJx6rekDGg
Date: Tue, 11 May 2021 15:34:06 +0000
Message-ID:
 <AM6PR08MB4376B3AA6AF24CFDF0EEADECF7539@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-8-justin.he@arm.com>
 <20210416143400.6818-1-razvanvirtan@gmail.com>
In-Reply-To: <20210416143400.6818-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 2236A078D115774990AE4CB3884998EE.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [223.166.32.253]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: db4d1bae-f2ff-4755-fd58-08d914923b81
x-ms-traffictypediagnostic: AM6PR08MB3750:|VI1PR0801MB1661:
X-Microsoft-Antispam-PRVS:
	<VI1PR0801MB166179836E90BF7C5C5E132DF7539@VI1PR0801MB1661.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 c2gukcJwIScI7aY6mdEakD1b/mQd5EAA+MqOE4QOZF/VWLtpZw55+SAHfxHPNTI7dj+vi1M43GHCTdqTPgmCNTQxzsveh4vlNjnnFjwDuS71qexHyKAQDiHo9WC6ldWjJ0BjMuq7KJkD98Sn5g0wuL/rJgrvj7GFlWzuWD7vpgwSxrXBL6sPOax1MYdCVpIHrlZXmwTO4Hz7Qdlava7m7WnArTIbMjUPIYXEid5oMQ7b/FhygYBu5HogxxOx0KVA/qfWhIV68Vwx/fYDpo+hSLj3FkPvGQDnQUB6H2DOrFl/QrmwlMv7yIoSqFQTnQS6ttzZpMRjmGKDjMuIiCyk2CEDavzynUHOqx20KPeYrhPvuallRyXUzmOela505rpzOtZN2NMbovVTlSC5vzZ0xn8DUlwgYhBjac9jTb+bhav2hey83kDRQyvZAErq4XH6irqRvKCSRwNIhwYG0iJhkM2fODzoktgYkYv3VZ5pFY/z+RBRP4r2azfZJI70Zwr1vCNulijPML0i3iwONIqBwLKeMIFPVvDjJ3PP1Tgbw67zBCSUDkzOMTf1hA9FuOg3A0Qx6qy8W6zZpy1VeINPVIIAeAsEk86UvYhhT1O+gnk=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39850400004)(366004)(346002)(396003)(376002)(136003)(86362001)(55016002)(9686003)(66556008)(33656002)(122000001)(76116006)(66946007)(4326008)(53546011)(6506007)(8936002)(478600001)(7696005)(186003)(8676002)(316002)(6916009)(26005)(2906002)(4743002)(71200400001)(38100700002)(83380400001)(52536014)(5660300002)(66446008)(66476007)(64756008);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?zuSM3hVw++VbOBlfNArzxrJxK0zA1Gn6dufNq74uU9UPsrwtOO/NkXm9tR26?=
 =?us-ascii?Q?ph40DC1a/ValGuYDVZJqNpbXVeGzl/2ycnV3ml1rM0E1tRNJDi7nWUpZa0fH?=
 =?us-ascii?Q?VlpEmyWjP+4/pRsaDQahQE2Eejtf8Fe/7vbeTCOWgeTHwbRELs9ifAVd2us/?=
 =?us-ascii?Q?MIYfEdsUontgbPZgz3NBShmSeWelyZ+xD5fEgmM8u4LyKr/r4tv8GChC7DYX?=
 =?us-ascii?Q?rd0GJB1biOnVEjlIroOx/wN6FsCfh8BRebiM3BWDdCCc8SSaAyrqfVrrc2mh?=
 =?us-ascii?Q?nVq6iuH7T6s1SAe8CU7zUAeG/TFJ/v2s1f/rH6WO9por69GoSNQBZPOxDmLN?=
 =?us-ascii?Q?kjhzhHcFhPomeSKxBYqiQlNT+0DLiJBzvO87kYIDnNN1YwiSwZ3QlRGOHoqm?=
 =?us-ascii?Q?ClcFTj4p+KSZmpbcE44vhsW2WswXieRpq50jpko4WchX9tWf5h4inJW+UQ3I?=
 =?us-ascii?Q?bKCVqc/xZKSkSuJP5KcBNIObYwnt9FQH48uTNdMHbb/4lfQQE92yla8HFhkM?=
 =?us-ascii?Q?J8iw0vX8J7OD8h/E195hLZO6ovtY0JDKrnUCHEi7dUyNasFl8n8qtrs7eOYp?=
 =?us-ascii?Q?IQfBa7g86sqA+wChOvhltZQdT2GKefWqwTUg6r5FYq0JQIz4xusMQqdt4tbD?=
 =?us-ascii?Q?ZDfc7rKeGKUv2ukI+rPuQKNAuzr46QHYpkuYCwhZFyISTcolqP3lD7eUcGXE?=
 =?us-ascii?Q?MpJZGaBCtQ3u1GrgGEKrbKzVIMK6r7EbpLI4KsJNlXW7+oq0vJxnKEx2+WI1?=
 =?us-ascii?Q?cC829Z9K2/S9QBtpzdBZ3lRFWByevz2og+Wq6bKvFkzpWgnYeuNbNoFDHemB?=
 =?us-ascii?Q?7Z8l147dE3i/BDM4h94MsQjDUxSA0hYZNa+z/+Dgqcpt99iGB9elbvS6X2D4?=
 =?us-ascii?Q?8iY5UI/yBV4NLUfuxg11L/GBq4UkkTe3ao8oKHTowoJWv4pecRQeVTpCC77D?=
 =?us-ascii?Q?nkvZtMFf/CQhqlFrQT5jQej6PS9gZeSvj6tKoMMc+e/tWsyEIMr5TIzfOQeo?=
 =?us-ascii?Q?rtHKTEn/Pw8nOU/e9Di9UGSEj6RqzVzJubyHOTxEv1WgKoAQkWmeJQbanc/p?=
 =?us-ascii?Q?5gubRSxgDWQR7D3bO1uGyZCYPPfeZZRxuaOGj+lGHKZNjB6daogBiL5Zudxf?=
 =?us-ascii?Q?zhmSuLdCAqhnd8WjigAFhqkfoWO82rwHn/679LJz/5R+doI9S7l676EWAsry?=
 =?us-ascii?Q?h+ZwXXT2ERvzpshLX6jYA2WpskRUvMYpmlLXvXfSzztd/vNvdSAnNfHJMzTp?=
 =?us-ascii?Q?aztdWmvdSnSKpH3q8iTdKeRd1UwjufwhgNS99/8iSvVVtILOXCqXtY0ZAfbr?=
 =?us-ascii?Q?VCOrpgMbJAkQY04JHHzg6R0/?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3750
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 VE1EUR03FT015.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	172c4760-e112-42be-2694-08d9149236f0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	zGTeZ1GmC7mjxpdikktiRxhulRU8scS+3gDheqvt2lVPaG23jABUIo7nXcEM3Sp+VJxgju+V8QEGP8tUurmtO61MlBaxN+YGr/FFeACConhneiJhFo2jJ42+53MYUZK/2CQaZ33iXQPV2rgT59lHNFRZY5OeB8peTHA4IM1JXTHw+d1I+CtW4ooKcLUtJpjo/M7IAW7q/fhF8oYBI6PZyHdkChpDPfwosbrLLUelrIzKqeBcz05wEmD2Xy076vvWrIm+EL0G7T0fgEFRci+21Yar91eCYNoFqI7mqCYcztzD6QKSSB22XHXTHyuH2pLOY+xZ7wNZsMwKGDA3QP/lPN+2vu05X0iB5PjQ+pQ/WcrfmkYvrq30w0MD0XYju6uXD9YvPvNDrNNtAU0lco284PC7VjSokGUkIjlF0Jw6zVPUNJtmKZIoB3vBiw/O5kDKa8IxIvsNmvtJcoS7llGcOHg+4B7ZA61lQ7+XclCNCZP1IdynTzvSepa/NAdVErr/SPzYePNSVdD0UOsFo37LPde0J6+rO8GLuAipE8zPbs1tJtFraAqsNt5o9aoKDTKa1yZovdTLnt72BsDxzadCzXJ3My/Gcp570mlebInRX/L01CYTxmt2ppg5RXIFt7RaV/68oBf+k3k6uAItE1oGUQ==
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(39850400004)(346002)(376002)(136003)(396003)(36840700001)(46966006)(81166007)(336012)(356005)(82740400003)(33656002)(4743002)(478600001)(186003)(70586007)(70206006)(4326008)(5660300002)(82310400003)(6506007)(55016002)(52536014)(9686003)(53546011)(83380400001)(7696005)(8936002)(26005)(47076005)(36860700001)(2906002)(8676002)(316002)(86362001)(6862004);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2021 15:34:14.4521
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: db4d1bae-f2ff-4755-fd58-08d914923b81
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	VE1EUR03FT015.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1661

Hi Razvan

> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Friday, April 16, 2021 10:34 PM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,07/35] plat/ofw: Export fdt_find_irq_parent_offset
>
> Hi, Justin.
> I think the description for fdt_find_irq_parent_offset provided in the
> header file is wrong, since it describes `fdt_node_offset_by_phandle()`
> from `libfdt.h` instead of `fdt_find_irq_parent_offset()`.
>
> /**
>
> The second argument should be something like:
> @offset: offset of the node whose irq parent to find
>
>  * fdt_find_irq_parent_offset - find the irq parent offset
>  * @fdt: pointer to the device tree blob
>  * @phandle: phandle value
>  *
>
> I think the detailed description below should be removed or replaced with
> one
> that describes this function.
Indeed, sorry for the mistake.


--
Cheers,
Justin (Jia He)


>
>  * fdt_node_offset_by_phandle() returns the offset of the node
>  * which has the given phandle value.  If there is more than one node
>  * in the tree with the given phandle (an invalid tree), results are
>  * undefined.
>  *
>  * returns:
>  *    structure block offset of the located node (>=3D 0), on success
>  *    -FDT_ERR_NOTFOUND, no node with that phandle exists
>  *    -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)
>  *    -FDT_ERR_BADMAGIC,
>  *    -FDT_ERR_BADVERSION,
>  *    -FDT_ERR_BADSTATE,
>  *    -FDT_ERR_BADSTRUCTURE, standard meanings
>  */
> int fdt_find_irq_parent_offset(const void *fdt, int offset);
>
>
> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Wed May 12 05:32:55 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 12 May 2021 05:32:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.126129.237420 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lghUK-0000ca-C4; Wed, 12 May 2021 05:32:52 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 126129.237420; Wed, 12 May 2021 05:32:52 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lghUK-0000cT-92; Wed, 12 May 2021 05:32:52 +0000
Received: by outflank-mailman (input) for mailman id 126129;
 Wed, 12 May 2021 05:32:51 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=lvOr=KH=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lghUJ-0000cN-1B
 for minios-devel@lists.xen.org; Wed, 12 May 2021 05:32:51 +0000
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (unknown
 [40.107.20.40]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id fdf44f1f-c320-4079-948b-2ef46ef992d9;
 Wed, 12 May 2021 05:32:47 +0000 (UTC)
Received: from AM6P192CA0080.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::21)
 by AM0PR08MB3026.eurprd08.prod.outlook.com (2603:10a6:208:65::21) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Wed, 12 May
 2021 05:32:45 +0000
Received: from VE1EUR03FT003.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:209:8d:cafe::a5) by AM6P192CA0080.outlook.office365.com
 (2603:10a6:209:8d::21) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend
 Transport; Wed, 12 May 2021 05:32:44 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 VE1EUR03FT003.mail.protection.outlook.com (10.152.18.108) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4129.25 via Frontend Transport; Wed, 12 May 2021 05:32:44 +0000
Received: ("Tessian outbound 6c4b4bc1cefb:v91");
 Wed, 12 May 2021 05:32:43 +0000
Received: from f4060a37c074.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 30D8FD5D-3176-4D7F-963A-8B3E2CDB225C.1; 
 Wed, 12 May 2021 05:32:38 +0000
Received: from EUR05-DB8-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f4060a37c074.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Wed, 12 May 2021 05:32:38 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AM6PR08MB5191.eurprd08.prod.outlook.com (2603:10a6:20b:e6::29)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Wed, 12 May
 2021 05:32:37 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Wed, 12 May 2021
 05:32:36 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: fdf44f1f-c320-4079-948b-2ef46ef992d9
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=cg7l0GTvPvLjm8fp+l08En0Hdv9hl+F9JETwP2S3lz0=;
 b=Hl2QjyNktsHzuxpsURUm7h/cBY3sBsA9bjOrcxHLXgrL+aZifl2jESxrhJElg1LRzsn2go02CVQm4XoPRRkQrmD111ZUTpuXFhjxIMR37I71w51Q5F9bUbtro306YEncuzufn8wkB8DGYiWIPHNUw45V6au7HCFlOjkaoAK8NZk=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=LJLkQH36SEo59kKSHOSA/Y3Nf3fONUHOg2AcObcuRy8lYDOZd241ggez4Nonw/5W3M9aUerDXOum7g5QhnELda3xz6e8wlpcYQH09WQjjVtHYQVhlG24kWUeL2XeJhYfuKnTWNSRShmux9iHftFeVduG5vj6/jbizPxFbjju8r3AYPQpddkZ7640NWFpCZAOwrP2120lSSX2WZ0oWuiYXKmTKMAyaxmCqbXr3q+FYlc0/ax7WQvsMBeKC50/FfOBradjavoxe3PWBGSchQrO3CSgehInNjoLuytV2H5yNgEDtqYTJ9RW8ss35nuPjKM+L0E2dFTCLEdLOMkHR3I6AA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=cg7l0GTvPvLjm8fp+l08En0Hdv9hl+F9JETwP2S3lz0=;
 b=AXTvEH9BLiKSqsGE3fo8HgDHLXESsJFm5oCqOKDuOqMo4r954GdohcvY66HrU60OfOax8SN33lbdH6rO5Whju199Dgejns6Zl66ucFgDSlM+JlAoxnRYYlt2Lu3VXMF1FgWElOE+opRhBN7U9LuiIuD8Drm1wwLJL1R4d2cnLQXjiLwVImJX8vK35lcpbn+Kj6qF0Fnq3q0JkFzaoWBLNHfK/oWnxYY8068IaGC1B7njBqU8WoW5BJDVIUmQs2ph4MUuLBIlBzyCvXkum1lNZUsxYA/JYJ1szRLqEtLFRxn2kqCq5KhcGX7p3l+gLfdqIHpHWVs84xrsaGi0XkzpHQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=cg7l0GTvPvLjm8fp+l08En0Hdv9hl+F9JETwP2S3lz0=;
 b=Hl2QjyNktsHzuxpsURUm7h/cBY3sBsA9bjOrcxHLXgrL+aZifl2jESxrhJElg1LRzsn2go02CVQm4XoPRRkQrmD111ZUTpuXFhjxIMR37I71w51Q5F9bUbtro306YEncuzufn8wkB8DGYiWIPHNUw45V6au7HCFlOjkaoAK8NZk=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,12/35] plat/platform_bus: Add probe/match interface for
 platform devices 
Thread-Topic: [RFCv4,12/35] plat/platform_bus: Add probe/match interface for
 platform devices 
Thread-Index: AQHXHOfCh2zXWxzNV0ywnNiOqM1Ds6rfmVxw
Date: Wed, 12 May 2021 05:32:36 +0000
Message-ID:
 <AM6PR08MB43761A58F3113A9DA2D4B4C7F7529@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-13-justin.he@arm.com>
 <20210319174607.21726-1-razvanvirtan@gmail.com>
In-Reply-To: <20210319174607.21726-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 3789C3DC53B1714F8438BFF16809F4AC.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.113]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 9a5658e6-f899-4834-b056-08d915075e6f
x-ms-traffictypediagnostic: AM6PR08MB5191:|AM0PR08MB3026:
X-Microsoft-Antispam-PRVS:
	<AM0PR08MB30262196577CCB8DDA969793F7529@AM0PR08MB3026.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:7219;OLM:8882;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 6hWSRe3pXFX2d63rnNtbClWbIsJ+LYGS0E2PCFSULAxDTowd9OpETl42XvCH5C3PBgk8AVCnIP9ywy8st7qLQHpgAX1BBmjE+w22VJlCoNYNvMhZCuMoIrfXER2RwB3g9nLuPF5KFA49cpxXrc6RTmElyyoHelFgu9GF8spG9HZpVEM11NEdO1dYXeeeY2vnulrEoeos0to2R3iLW7TW01S7GBGUwc6/PJoUydeTYuKkcHKcsV+VDCf5moVNp9Ea5IXe+aaculWLMXc6d70SUI1q8TA2NoCjOOwyfw/9X/92dnu/oqqHPbRUcxgJ+PwarQFA+kZqe1oDwr6tFsHbrJ32xWxEEC0duHyPOEV7WxFa5jMY+J7h61v0v63HDzvZcxfIuiESCxYoE/lgZ0AXkchCNeatCjyK5ajeC1mDd/p8s1Rc4V4+Zdcl3qTL4XqkdmftmZZpm9/bzRaiiw3fthfAOUuFGhaE9+XawucPOQGOu3nmBtwMcZS+eDFLmWUTVm1DOkpABC/o1cUSsu53cWTIsuybrsTwwxWaSKRAgYp3MV1wT5aITz6lIFqLrfqm6kIv8A5Xb09GUijbadoNSF42PFJbIHVaXiuvW4a40JQ=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39850400004)(396003)(346002)(376002)(136003)(4326008)(5660300002)(38100700002)(66476007)(76116006)(66946007)(8936002)(64756008)(66446008)(6506007)(6916009)(9686003)(122000001)(66556008)(52536014)(8676002)(86362001)(55016002)(478600001)(316002)(71200400001)(53546011)(4743002)(26005)(7696005)(83380400001)(2906002)(186003)(33656002);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?k9AC1M/JD8Qxt3e0eiJI6cDvDRw58WHrb9HDKj0ZsQmCDGvXJ7U/3GPXLUrH?=
 =?us-ascii?Q?0bOQiralZ1AfBF9y/fW6qLFG56NyTCDewFsYSJQP5NS6dIpHxShFIBE2bxm8?=
 =?us-ascii?Q?gy8uTO3aVc7EzM/GsZscp0OuTv3+pez0CxhcCnsm4eetRKHKaDtKOT0c1+Th?=
 =?us-ascii?Q?05gmd/gfqRDpwq5E1VxfJXcyjfj09llgsKSCLS4dC6OVtFF5krbufFWcY46y?=
 =?us-ascii?Q?6TFF4uoAy9nNRwBvEwY6ElFYwkXBfiNFGGmwygEODEFB+jaX1o9S0aG9Wduc?=
 =?us-ascii?Q?t1QimQyswS7l4b1AS9uIs1I5hnSlzgAyMNN2AkiYJc6fRI99ZYRsNDEtjDpE?=
 =?us-ascii?Q?jYmDsc9pDDf54LkiPHbfFrLeefRST/CLwmsJhACHV/z7hHE3dli+SKGWY61Z?=
 =?us-ascii?Q?8QuT4yftnpPHRKqukGKE+HYFQMXDzDTmVMCbKbeqM+/uK9dv+gDo8zEjnlkf?=
 =?us-ascii?Q?anzE2KyD8ZpZnEnTNk8/yTMCA0quHUa919MeBvJtfAz4EKdDNJu5V0h//ESO?=
 =?us-ascii?Q?tge+Kz3C/rBpgmnAmNJTPLHub2a5HCpoYSaSyCvTdh0/J5hTYlZZ7vcnXoBy?=
 =?us-ascii?Q?eTLIzZ0J2Ats53xmAQ6bvcZ9GoWXD1LkCI7PGf2jL0TaEP11W72M30ZbikQi?=
 =?us-ascii?Q?qL2w14bG3IuiBVYuO9QQbEwdJWB9BypfWsiC2hIAhjtbselHkJ/EIoIUD3QY?=
 =?us-ascii?Q?KIX2bOzZxcVn94SuEjhCDJGERl9/245h7z/+x95UnKw0EGpqG325ffyQ53tB?=
 =?us-ascii?Q?r+ppHoVvoQpC2ZSFS+pn+iSvDaFEZwwsoDaMCW99q0hvr/A624qJc2sphozq?=
 =?us-ascii?Q?fjn/W6jKneDiFqVI1kkhn1RAVn50M8oWGumWFeCgiBKLEi0W3yggL1RUQzkU?=
 =?us-ascii?Q?BmdkTIep+Xu1mIjzViW7MPJQ74X2x30sxmJ4HFZNHO1w/9QMmt5FViRJ6YgG?=
 =?us-ascii?Q?Ik4f8M/wFvDXCzf96mdacx2nTS0x117lKzTDglRRlZ0WJxRGkdL9nWYQ1+19?=
 =?us-ascii?Q?ZcwVtzaFxPk2i0iRbIlPIHbRFBTOXDtpyA9lQg1sqZNhSkT+cj6qc2rtGlVH?=
 =?us-ascii?Q?ihj+OiNZA/PjIBjvhM62q+d+NyPgbdZCQMFMbyANWNC5YozxOh5hd7p7AbX2?=
 =?us-ascii?Q?C+pMc75wWBpWXsdcC6wRBe9PQ20HBZq8fcU4XCBlB380gFVvzZtA9jfwriDX?=
 =?us-ascii?Q?zc861vdCo8awEaKUNieZUpiRkcBRguT5iM7CaR8YqswvirH2txWHXgwG32w8?=
 =?us-ascii?Q?kuiZctdq60pG3vj0YhsBHoLPJjjTjqkklEzIyTlegigUd/jgwZArypWhKhVQ?=
 =?us-ascii?Q?iPnJ0ZmCCQOQKgmGipGcY6r3?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5191
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 VE1EUR03FT003.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	692a54e1-0f27-49af-5c1a-08d915075a06
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	HOL/dd6lf1iJ4zqmEuoOiiKOovCSpPpizPeJTtGeHhKVlp1BcAdl5XPmE/icU3Usw/25JP0Yl5pkyE128Ay2uFNHLWZOXLiLKAHVwbRE83zGidBGqSlD617h/xUUygIzHL599MhGenNuFG7BxtTXmaFzDmJblXZR233M3MyYRD9uVgM93eN2hNv4TXJkm2ARx+hbp1eHicUicbh8e7CjdIf71at5j1ypdr2wVr7iAgLptHzBFJFmHf5vv6WlCjB2RRFAzUwRiaU6CwEiMJzKm+E/ATlB/KB7CTK3kSIOpFbApBuW9RBzGwWkFqixbmvBhrOvn1co7KbcKe8pu8S7Flsi3Mae1S+e7Tk89VhFBSjQQjnaWb947L+Xu2OY/5kOxcEC6xILpkV9+UL7XP4IIcPtI+7XwSE7QNV3zraeF0nsVA0V4dXvrUpOn6133ZO+a81/3hV3yws2VvsEuUrCA5itMPAxUe9AyHfj2TZ14jmZtrMiXxM7/+aP8RDhRa9gax+q/XZ4RSXxObZYXCpGySFATM7OVd/Kptz21Usvdh5noUKwWQ2iNkw5EI9PGohOXxQnYCt025AZUpAPt8+x2sj92l8CCz9OlRDZHbkFuowc5slRIiDNUSQkdzh8e32ypBSZZ3WXuO35eKfK7maeGLU4EjbRe/TIWxTcOcyg2wQ=
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(346002)(376002)(136003)(39850400004)(396003)(46966006)(36840700001)(356005)(9686003)(83380400001)(186003)(4326008)(7696005)(55016002)(478600001)(5660300002)(26005)(82740400003)(36860700001)(33656002)(316002)(53546011)(2906002)(4743002)(336012)(70586007)(8676002)(6862004)(82310400003)(86362001)(8936002)(70206006)(81166007)(6506007)(52536014)(47076005);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 05:32:44.1258
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 9a5658e6-f899-4834-b056-08d915075e6f
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	VE1EUR03FT003.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3026

Hi Razvan

> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Saturday, March 20, 2021 1:46 AM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,12/35] plat/platform_bus: Add probe/match interface f=
or
> platform devices
>
> I've found some minor typos and I have some questions regarding the
> pf_find_driver()
> function from "platform_bus.c". I'll let them here, as inline comments.
>
> diff --git a/plat/common/platform_bus.c b/plat/common/platform_bus.c
> index 1410e71..fecb389 100644
> --- a/plat/common/platform_bus.c
> +++ b/plat/common/platform_bus.c
> @@ -52,8 +52,10 @@  struct pf_bus_handler {
>  };
>  static struct pf_bus_handler pfh;
>
> -static const char * const pf_device_list[] =3D {
>
> Typo: "*pf_device_compatible_list[]"
>
> +static const char *pf_device_compatilbe_list[] =3D {
>       "virtio,mmio",
> +     "pci-host-ecam-generic",
> +     NULL
>  };
>
>  static inline int pf_device_id_match(const struct pf_device_id *id0,
> @@ -67,14 +69,22 @@  static inline int pf_device_id_match(const struct
> pf_device_id *id0,
>       return rc;
>  }
>
> -static inline struct pf_driver *pf_find_driver(struct pf_device_id *id)
> +static inline struct pf_driver *pf_find_driver(const char *compatible)
>  {
>       struct pf_driver *drv;
> +     struct pf_device_id id;
>
>       UK_TAILQ_FOREACH(drv, &pfh.drv_list, next) {
> -             if (pf_device_id_match(id, drv->device_ids)) {
> -                     uk_pr_debug("pf driver found devid=3D%d\n", drv-
> >device_ids->device_id);
> -                     return drv; /* driver found */
> +             if (!drv->match)
> +                     continue;
> +
> +             id.device_id =3D (uint16_t)drv->match(compatible);
>
> In both the virtio_mmio and pci_ecam implementations, driver match()
> function returns
> -1 when the "compatible" parameter isn't found in the driver's match tabl=
e.
> Therefore, I think the condition in this statement should be "if
> (id.device_id > 0)".

Yes, thanks. More than that, I'd like to change it as
(id.device_id >=3D PLATFORM_DEVICE_ID_START)

>
> +             if (id.device_id) {
>
> What would happen if a platform driver would support more than one device=
?
> For example, the implementation of "virtio_mmio_match_table[]" from
> "virtio_mmio.c"
> would allow, theoretically, more than one supported devices. If that woul=
d
> happen,
> I think "drv->device_ids" should become an array of ids and we should cal=
l
> "pf_device_id_match()"
> on all of it's elements.
> Would it be possible to need a platform driver like that in the future? (=
if
> it would
> be possible, I think we should adapt the implementation)
>

Yes, I will change device_ids to ids array

> +                     if (pf_device_id_match(&id, drv->device_ids)) {
> +                             uk_pr_debug("pf driver found  devid(0x%x)\n=
",
> id.device_id);
> +
> +                             return drv;
> +                     }
>               }
>       }
>
> @@ -84,104 +94,96 @@  static inline struct pf_driver *pf_find_driver(stru=
ct
> pf_device_id *id)
>  }
>
>  static inline int pf_driver_add_device(struct pf_driver *drv,
> -                                     struct pf_device_id *devid,
> -                                     __u64 dev_base,
> -                                     int dev_irq)
> +                                     struct pf_device *dev)
>  {
> -     struct pf_device *dev;
>       int ret;
>
>       UK_ASSERT(drv !=3D NULL);
>       UK_ASSERT(drv->add_dev !=3D NULL);
> +     UK_ASSERT(dev !=3D NULL);
>
> -     dev =3D (struct pf_device *) uk_calloc(pfh.a, 1, sizeof(*dev));
> -     if (!dev) {
> -             uk_pr_err("Platform : Failed to initialize: Out of memory!\=
n");
> -             return -ENOMEM;
> -     }
> -
> -     memcpy(&dev->id, devid, sizeof(dev->id));
> -     uk_pr_debug("pf_driver_add_device dev->id=3D%d\n", dev->id.device_i=
d);
> -
> -     dev->base =3D dev_base;
> -     dev->irq =3D dev_irq;
> +     uk_pr_debug("pf_driver_add_device devid=3D%d\n", dev->id.device_id)=
;
>
>       ret =3D drv->add_dev(dev);
>       if (ret < 0) {
>               uk_pr_err("Platform Failed to initialize device driver\n");
> -             uk_free(pfh.a, dev);
>       }
>
>       return ret;
>  }
>
> +static inline int pf_driver_probe_device(struct pf_driver *drv,
> +                                     struct pf_device *dev)
> +{
> +     int ret;
> +
> +     UK_ASSERT(drv !=3D NULL && dev !=3D NULL);
> +     UK_ASSERT(drv->probe !=3D NULL);
> +
> +     uk_pr_info("pf_driver_probe_device devid=3D%d\n", dev->id.device_id=
);
> +
> +     ret =3D drv->probe(dev);
> +     if (ret < 0) {
> +             uk_pr_err("Platform Failed to probe device driver\n");
> +
> +             return ret;
> +     }
> +
> +     return 0;
> +}
> +
>  static int pf_probe(void)
>  {
> -     struct pf_device_id devid;
>       struct pf_driver *drv;
> -     int i;
> -     int end_offset =3D -1;
> +     int idx =3D 0;
>       int ret =3D -ENODEV;
> -     const fdt32_t *prop;
> -     int type, hwirq, prop_len;
> -     __u64 reg_base;
> -     __phys_addr dev_base;
> -     int dev_irq;
> +     struct pf_device *dev;
> +     int fdt_pf =3D -1;
>
>       uk_pr_info("Probe PF\n");
>
> -     /* We only support virtio_mmio as a platform device here.
> -      * A loop here is needed for finding drivers if more devices
> -      */
> -     devid.device_id =3D VIRTIO_MMIO_ID;
> +     /* Search all the platform bus devices provided by fdt */
> +     do {
>
> Typo: "pf_device_compatible_list"

Okay

>
> +             fdt_pf =3D
> fdt_node_offset_idx_by_compatible_list(_libkvmplat_cfg.dtb,
> +                                             fdt_pf, pf_device_compatilb=
e_list,
> &idx);
> +             if (fdt_pf < 0) {
> +                     uk_pr_info("End of searching platform devices\n");
> +                     break;
> +             }
>
> -     drv =3D pf_find_driver(&devid);
> -     if (!drv) {
> -             uk_pr_info("<no driver>\n");
> -             return -ENODEV;
> -     }
> +             /* Alloc dev */
> +             dev =3D (struct pf_device *) uk_calloc(pfh.a, 1, sizeof(*de=
v));
> +             if (!dev) {
> +                     uk_pr_err("Platform : Failed to initialize: Out of
> memory!\n");
> +                     return -ENOMEM;
> +             }
>
> -     uk_pr_info("driver %p\n", drv);
> -
> -     /* qemu creates virtio devices in reverse order */
> -     for (i =3D 0; i < UK_MAX_VIRTIO_MMIO_DEVICE; i++) {
> -             end_offset =3D fdt_node_offset_by_compatible_list(fdt_start=
,
> -                                                     end_offset,
> -                                                     pf_device_list);
> -             if (end_offset =3D=3D -FDT_ERR_NOTFOUND) {
> -                     uk_pr_info("device not found in fdt\n");
> -                     goto error_exit;
> -             } else {
> -                     prop =3D fdt_getprop(fdt_start, end_offset, "interr=
upts",
> &prop_len);
> -                     if (!prop) {
> -                             uk_pr_err("irq of device not found in fdt\n=
");
> -                             goto error_exit;
> -                     }
> +             dev->fdt_offset =3D fdt_pf;
>
> -                     type =3D fdt32_to_cpu(prop[0]);
> -                     hwirq =3D fdt32_to_cpu(prop[1]);
> +             /* Find drv with compatible-id match table */
>
> Typo: "pf_device_compatible_list"
>
> +             drv =3D pf_find_driver(pf_device_compatilbe_list[idx]);
> +             if (!drv) {
> +                     uk_free(pfh.a, dev);
> +                     continue;
> +             }
>
> -                     prop =3D fdt_getprop(fdt_start, end_offset, "reg",
> &prop_len);
> -                     if (!prop) {
> -                             uk_pr_err("reg of device not found in fdt\n=
");
> -                             goto error_exit;
> -                     }
> +             dev->id =3D *(struct pf_device_id *)drv->device_ids;
> +             uk_pr_info("driver %p\n", drv);
>
> -                     /* only care about base addr, ignore the size */
> -                     reg_base =3D fdt32_to_cpu(prop[0]);
> -                     reg_base =3D reg_base << 32 | fdt32_to_cpu(prop[1])=
;
> +             ret =3D pf_driver_probe_device(drv, dev);
> +             if (ret < 0) {
> +                     uk_free(pfh.a, dev);
> +                     continue;
>               }
>
> -             dev_base =3D reg_base;
> -             dev_irq =3D gic_irq_translate(type, hwirq);
> -
> -             ret =3D pf_driver_add_device(drv, &devid, dev_base, dev_irq=
);
> -     }
> +             ret =3D pf_driver_add_device(drv, dev);
> +             if (ret < 0) {
> +                     uk_pr_err("Platform Failed to initialize device dri=
ver,
> ret(%d)\n",ret);
> +                     uk_free(pfh.a, dev);
> +             }
> +     } while (1);
>
>       return ret;
> -
> -error_exit:
> -     return -ENODEV;
>  }
>
>
> @@ -232,4 +234,4 @@  static struct pf_bus_handler pfh =3D {
>       .b.init =3D pf_init,
>       .b.probe =3D pf_probe
>  };
> -UK_BUS_REGISTER(&pfh.b);
> +UK_BUS_REGISTER_PRIORITY(&pfh.b, 1);
>
> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Wed May 12 05:59:30 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 12 May 2021 05:59:30 +0000
Received: from list by lists.xenproject.org with outflank-mailman.126134.237437 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lghu5-0003Xc-K0; Wed, 12 May 2021 05:59:29 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 126134.237437; Wed, 12 May 2021 05:59:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lghu5-0003XV-Gn; Wed, 12 May 2021 05:59:29 +0000
Received: by outflank-mailman (input) for mailman id 126134;
 Wed, 12 May 2021 05:59:28 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=lvOr=KH=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lghu4-0003XO-Dh
 for minios-devel@lists.xen.org; Wed, 12 May 2021 05:59:28 +0000
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (unknown
 [40.107.2.59]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 14d0edc2-d15e-466e-98b8-a040deb61b0c;
 Wed, 12 May 2021 05:59:26 +0000 (UTC)
Received: from AM0PR06CA0101.eurprd06.prod.outlook.com (2603:10a6:208:fa::42)
 by AM6PR08MB3990.eurprd08.prod.outlook.com (2603:10a6:20b:a3::31)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Wed, 12 May
 2021 05:59:22 +0000
Received: from AM5EUR03FT043.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:208:fa:cafe::2d) by AM0PR06CA0101.outlook.office365.com
 (2603:10a6:208:fa::42) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend
 Transport; Wed, 12 May 2021 05:59:22 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 AM5EUR03FT043.mail.protection.outlook.com (10.152.17.43) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4129.25 via Frontend Transport; Wed, 12 May 2021 05:59:21 +0000
Received: ("Tessian outbound 13cdc29c30b8:v91");
 Wed, 12 May 2021 05:59:21 +0000
Received: from ae6598c1bcba.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 071587F8-E66D-4D35-A174-637438560131.1; 
 Wed, 12 May 2021 05:59:15 +0000
Received: from EUR05-DB8-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ae6598c1bcba.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Wed, 12 May 2021 05:59:15 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AS8PR08MB6920.eurprd08.prod.outlook.com (2603:10a6:20b:394::18)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Wed, 12 May
 2021 05:59:14 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Wed, 12 May 2021
 05:59:14 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 14d0edc2-d15e-466e-98b8-a040deb61b0c
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=BGuNLEazmy3MG66mGv0gTyRR0ko0hcGhbDORW4XRfO4=;
 b=oFOH39DGmC6icFrWHnG8pYjt5wbUatz5ONqYqHzR0MMGoNOQSGVMMmb9+DxH3TuHSiOzbuqwVqkzsZQYgLxPcZIVk1Vy+/fL5Q+x4zM35DeABNXEmYjRDoa8fjjOuJPVtz9pVIPJuEaUBSg9XdTKB9lPan1FVg+Dsbzs8cbUPuA=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=nObzVs7UOHirMB6LCKslRr8Cf+KJj47mrG5eaipDwcLQ0/M+8yqvNp2mhEf7NgD5jc2m+d2NbcKWXkgFPhaWVuL2wTBkCnzzs8tI14xPJESuZwh/bYBxwS8vgeph1XbCuid+rrBEjTrbO8DP6K8eYHlKdPUZ6TM1TT8m77MCN9NAFb3FM7Jzd8ZHlVkJ+LZKoa5N7nSZ/anoi8f0ELAoRiNdyUMxfv5RoT9AXe2SYECVoa7ADMJUtAqb8OM4ZQwyKLQAve99qXCHF0h+l5iKo3AcTp5rFoUjIOYXo2z3gRYX1scTDGwXbe6XEWZCMNxaox38KuB/6O/hqRzIouH8Gw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=BGuNLEazmy3MG66mGv0gTyRR0ko0hcGhbDORW4XRfO4=;
 b=khulkTu8vw8iNYhO9udeJHLE1Ihimr6f34Hqg/0Sx2eJSaC84mRD/Yzh+5H+InpH5Rto0LSHhzCKOvH7YgeSmTWQN9dyv8qYoc0PbubgJstuhvLC8UDlF9pVIlSG5Ww4wblabuWN+if+TSg5wpuzTnL/J0Dc6aL9TQFuK2eFW3Zo2NMmdcWz+Yl7MUwNwbFnQVhxkBfwOWFpaodQkOeH3OfLsMy+MMnMg66edpyZonljXjnNmhBbzruLjVuRxUEkpP+lH7vC0jjRv1CChwvIdqGxuOPc6dtCRaA9O9PqVC1Sa5ry8hr+o1L1+qGGWe+g7JmWQHQivVnOVtav6JZ3Cw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=BGuNLEazmy3MG66mGv0gTyRR0ko0hcGhbDORW4XRfO4=;
 b=oFOH39DGmC6icFrWHnG8pYjt5wbUatz5ONqYqHzR0MMGoNOQSGVMMmb9+DxH3TuHSiOzbuqwVqkzsZQYgLxPcZIVk1Vy+/fL5Q+x4zM35DeABNXEmYjRDoa8fjjOuJPVtz9pVIPJuEaUBSg9XdTKB9lPan1FVg+Dsbzs8cbUPuA=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,12/35] plat/platform_bus: Add probe/match interface for
 platform devices 
Thread-Topic: [RFCv4,12/35] plat/platform_bus: Add probe/match interface for
 platform devices 
Thread-Index: AQHXHOfCh2zXWxzNV0ywnNiOqM1Ds6rfmVxwgAASu4A=
Date: Wed, 12 May 2021 05:59:13 +0000
Message-ID:
 <AM6PR08MB4376531E6116CD86455A27B5F7529@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-13-justin.he@arm.com>
 <20210319174607.21726-1-razvanvirtan@gmail.com>
 <AM6PR08MB43761A58F3113A9DA2D4B4C7F7529@AM6PR08MB4376.eurprd08.prod.outlook.com>
In-Reply-To:
 <AM6PR08MB43761A58F3113A9DA2D4B4C7F7529@AM6PR08MB4376.eurprd08.prod.outlook.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 9E87A9E3639C5941840BD7068FA667EF.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.113]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 44c556d9-1e70-48c1-9e58-08d9150b1690
x-ms-traffictypediagnostic: AS8PR08MB6920:|AM6PR08MB3990:
X-Microsoft-Antispam-PRVS:
	<AM6PR08MB399035954838537162530DD5F7529@AM6PR08MB3990.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:7691;OLM:8882;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 L9f4nGI2sQYoOg8uSgSp4cWXUyahpvH298qPboklZiKK5Ic12R2ASg06JMeov84zIb4gFWQdP/jTPaWQDUoDAhZeAW7VN4xGBP81KmNBT0uf4IPZw+EPmyR5bKfZLy6WDyZD9coiHg+4eIMsIAPjTTtfCRhbr+1ASdHdsn5+qcSgHXlbohoeKuPSPpWDXVclT2E7Msck3zt3KTdQeyFxeaJUvf5vuUPPt/8f1GykLNJGPN04v/KrmiNQSrhvjeW4XkL45kVVlYe31kbcKjM5woEEb7FWtNHj6VrXUaHPvR2oqLV8FmWDuI6toMto+wml6W1T84QF+WCebA3GJy8ndtMxV7l9bgWc1oDKpcJI9vYacmGvgFxZ6MODv65tLYn3O+LDwppA1Z83J8nOgmXLw92z++zj5RPNdLzX4BwVN+YhP7gDnZbZl0esggfFx7l7Tncoxi4JCrL49k94+ewvS3U83MrUkYSCNdGcpqrkqP9T4F0K3yvgzhfIZDw/M3KGaaWk68dQy9W6joj4A1buD2q0W+2EkDOf35sa6GQhLsfAMIgV5dNV0lGtNdOLMdx/RtpYP/bmrCe0xbFrFOtt998sJpXY64El2pIer/Zi/YE=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(396003)(376002)(346002)(366004)(39850400004)(71200400001)(7696005)(316002)(8676002)(2940100002)(478600001)(4743002)(52536014)(86362001)(8936002)(26005)(5660300002)(186003)(55016002)(6506007)(83380400001)(66556008)(66446008)(66476007)(64756008)(38100700002)(4326008)(66946007)(53546011)(6916009)(76116006)(122000001)(33656002)(9686003)(2906002);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?3uPfgNqCHw89TyZGazPt7/1LpZQnM40ZDsX9nTwUqZEEezR5lP0eG9NF2mTq?=
 =?us-ascii?Q?xA6m2r/3MlAkPjRbVbyq9OqIkhx/3QK5pgFqP3hMf4SKW106wp1I26aYZOuz?=
 =?us-ascii?Q?g+F9SY+FWxtszotqDL3YkeMZueUQH8e3pC4KNG0Iddc7jjeDsimNkpfP4Hlu?=
 =?us-ascii?Q?sy+tYWzmtlWXHQV6MOqHGqxFxxAUYFKse+Z6QLTJVkUuDHjCWnqM9+3ULegn?=
 =?us-ascii?Q?EZg7ysm9ppLj2LVsXf1aR8iZ9LCIhuhCbSx18z86fGbo9TdhERM4icyKDU6l?=
 =?us-ascii?Q?OgvUoKyoMd67ez7tNZmLebEcPP6THtuzmf2QN2pxO4FbDRA32RI7yGPj7lQr?=
 =?us-ascii?Q?E2xyqAef+uqmCmOICpgKKaHmrOahgyw088LzNJYKcf/wYdsv42fH+cDzVRpH?=
 =?us-ascii?Q?5Sf2ITVyW/eNXrU0TrlszqKQsbBukcn51hMiaB2ycHm8trbvTiRU4Glc3NFa?=
 =?us-ascii?Q?QRgaMkjWbvfS/8xy2Xy5pN87nANjqEMKFdURo0HQ8bOt3ImtsiH7WVBUNUzM?=
 =?us-ascii?Q?mQwrTNL45OMYUG8M4mMJa4E3ZW6aP6HMHdiSEDZYa7/kDnjUlbuf+scHEmB3?=
 =?us-ascii?Q?5t8ccaSagQywHBfDDyHi/AdrtPew/BWQ2N+VWDBcB9vaYIutft7O0qGWvDNs?=
 =?us-ascii?Q?cmiptt6iA6WUDZ5O/YOLwF5HZ1HgHMDKxRUf0hBXGfNTR24Infb1LaQxgT4r?=
 =?us-ascii?Q?sHbAq/DK7VRh4TlK7F080MMxOnJIQZCUebWb91w19d0TM3K4UC48D9QhUD1Z?=
 =?us-ascii?Q?aDA3gCFi0bgmqVzgwPGIJLiSHwNw9NKpnjAh5qzfVQm3HPCrW+lLrmtA/nhz?=
 =?us-ascii?Q?jAKBXDJQQ7Y+1EOnV4gYEG35yGiSqbTiMNP1q8/b+94c5n4FTA63AOsCyAwl?=
 =?us-ascii?Q?5SRDiQqql2BlJPxTtNbF9Wqm6xavCjakNWuyxUB8XDKWy0gjJJWUzUssAE3R?=
 =?us-ascii?Q?hMe5AFzy/8vf2+1Xv0Gzmlrjbg08IO77c1+EXPUi+1mVDYL2SD+E8C7aVAZZ?=
 =?us-ascii?Q?cknmX0lZEqIsb4bVHiAd7EAtd83j5au5kgI9hDlgzH7IFw6f38mevVXianWW?=
 =?us-ascii?Q?ZMaGmiXD15jjbOSZeC6Iiz1hfEod9WOSK3i07L+3nnlDbMCJXW3cCuwgvdB+?=
 =?us-ascii?Q?FZ7z2IJo76rjl8ySUdIbc5NiOcVjG9RSp/jntPq45V6adSySYiHKzR8T/muP?=
 =?us-ascii?Q?t6/GXGai/A/OI4I7IF7Atgf575hXOq6/MnRUQvZrV+06/Xt3qedISmLe5xro?=
 =?us-ascii?Q?KOkgyfsla3c/uPO3DGJloqTl5JV1XHA62K+ZWCxFOnXwd3SMcC8nx5BXio/D?=
 =?us-ascii?Q?r0fVQU80Gl0MKslgTtcTawaD?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6920
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 AM5EUR03FT043.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	b4c3368a-44e0-43e1-5a1c-08d9150b1209
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	xG/FutL5qCQM+xfa23+E+3XMGvVc8SYp2Y7XyNPOIVMN1kB/7s6/u6e78+ULrSdCKkUxRoUY63dODX82G91osupZ5afrH9O4shbldHAT0z2gQr+J3l/aHppaICEdfwDuOcGUAAgMTP2zozEUmH86JgnuFhS4oc3OFhxc6dGHuiuceq8GZts1bv3tjkTavuneM/lJWsnRxK22+XfRvcurVTlJzAjduyq8y9FnIJSF5kxoaPK/kD0yQpvWy4iVx9abzb74pL4tC+6GibkGSpW+VM0rNjrGNkD5CA/czSh85ZRm6ZSa45W4LFNXwBnyb82fpv7jBl6hmx3W/PGJ7hibZ0jcBC+wJa8Mt+ZwvOCN6k3zYBC/RRBuVruwLCjUlvWJJ4b/Jgd5wDpI104q8Q/8ikrICdryya2r/fAKcTGr1SS3LSd8EXGVMdEmw9PFyEIHxcx9lBqNzLXvyd4H1ILYj7zRX4EfU4ArOeA6TB3WvSb3DhWvQxGTHTpm4oLSFeA4PoDVKdepQfIY5IDxjPyjwnQdUiE+CfMCGs9LonAin7r03sXYz/2OR5ABAU9JOdL+LZKAJZGtWHrF9Xy78C1Z+UcRJc5coWMqEkxwiKqCpF+Kzvk9zh/CRV4n8qmzCCRdy3FbcB37j9YR7obJ/ZcWCaqk23CWOl+0rb1iF+KkamY=
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(39850400004)(376002)(346002)(136003)(396003)(46966006)(36840700001)(316002)(6506007)(83380400001)(53546011)(52536014)(33656002)(6862004)(82310400003)(4743002)(356005)(86362001)(82740400003)(2940100002)(4326008)(478600001)(336012)(2906002)(186003)(26005)(36860700001)(5660300002)(8676002)(7696005)(9686003)(70586007)(8936002)(70206006)(55016002)(81166007)(47076005);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 05:59:21.6266
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 44c556d9-1e70-48c1-9e58-08d9150b1690
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	AM5EUR03FT043.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3990

Hi Razvan

> -----Original Message-----
> From: Justin He
> Sent: Wednesday, May 12, 2021 1:33 PM
> To: Razvan Virtan <virtanrazvan@gmail.com>
> Cc: minios-devel@lists.xen.org
> Subject: RE: [RFCv4,12/35] plat/platform_bus: Add probe/match interface f=
or
> platform devices
>
> Hi Razvan
>
> > -----Original Message-----
> > From: Razvan Virtan <virtanrazvan@gmail.com>
> > Sent: Saturday, March 20, 2021 1:46 AM
> > To: Justin He <Justin.He@arm.com>
> > Cc: minios-devel@lists.xen.org
> > Subject: Re: [RFCv4,12/35] plat/platform_bus: Add probe/match interface
> for
> > platform devices
> >
> > I've found some minor typos and I have some questions regarding the
> > pf_find_driver()
> > function from "platform_bus.c". I'll let them here, as inline comments.
> >
> > diff --git a/plat/common/platform_bus.c b/plat/common/platform_bus.c
> > index 1410e71..fecb389 100644
> > --- a/plat/common/platform_bus.c
> > +++ b/plat/common/platform_bus.c
> > @@ -52,8 +52,10 @@  struct pf_bus_handler {
> >  };
> >  static struct pf_bus_handler pfh;
> >
> > -static const char * const pf_device_list[] =3D {
> >
> > Typo: "*pf_device_compatible_list[]"
> >
> > +static const char *pf_device_compatilbe_list[] =3D {
> >     "virtio,mmio",
> > +   "pci-host-ecam-generic",
> > +   NULL
> >  };
> >
> >  static inline int pf_device_id_match(const struct pf_device_id *id0,
> > @@ -67,14 +69,22 @@  static inline int pf_device_id_match(const struct
> > pf_device_id *id0,
> >     return rc;
> >  }
> >
> > -static inline struct pf_driver *pf_find_driver(struct pf_device_id *id=
)
> > +static inline struct pf_driver *pf_find_driver(const char *compatible)
> >  {
> >     struct pf_driver *drv;
> > +   struct pf_device_id id;
> >
> >     UK_TAILQ_FOREACH(drv, &pfh.drv_list, next) {
> > -           if (pf_device_id_match(id, drv->device_ids)) {
> > -                   uk_pr_debug("pf driver found devid=3D%d\n", drv-
> > >device_ids->device_id);
> > -                   return drv; /* driver found */
> > +           if (!drv->match)
> > +                   continue;
> > +
> > +           id.device_id =3D (uint16_t)drv->match(compatible);
> >
> > In both the virtio_mmio and pci_ecam implementations, driver match()
> > function returns
> > -1 when the "compatible" parameter isn't found in the driver's match
> table.
> > Therefore, I think the condition in this statement should be "if
> > (id.device_id > 0)".
>
> Yes, thanks. More than that, I'd like to change it as
> (id.device_id >=3D PLATFORM_DEVICE_ID_START)
>
> >
> > +           if (id.device_id) {
> >
> > What would happen if a platform driver would support more than one devi=
ce?
> > For example, the implementation of "virtio_mmio_match_table[]" from
> > "virtio_mmio.c"
> > would allow, theoretically, more than one supported devices. If that
> would
> > happen,
> > I think "drv->device_ids" should become an array of ids and we should
> call
> > "pf_device_id_match()"
> > on all of it's elements.
> > Would it be possible to need a platform driver like that in the future?
> (if
> > it would
> > be possible, I think we should adapt the implementation)
> >
>
> Yes, I will change device_ids to ids array
After I think it more, I prefer not changing this.
Because we have already supported more than one platform device.
Different platform device has different pf_device_id.device_id.

For example, if qemu created 2 devices (1 virtio-mmio and 1 pci-host-ecam-g=
eneric),
they can be matched to different drivers because the device_ids of them are=
 different.

One platform device type can only has one device_ids


--
Cheers,
Justin (Jia He)


>
> > +                   if (pf_device_id_match(&id, drv->device_ids)) {
> > +                           uk_pr_debug("pf driver found  devid(0x%x)\n=
",
> > id.device_id);
> > +
> > +                           return drv;
> > +                   }
> >             }
> >     }
> >
> > @@ -84,104 +94,96 @@  static inline struct pf_driver
> *pf_find_driver(struct
> > pf_device_id *id)
> >  }
> >
> >  static inline int pf_driver_add_device(struct pf_driver *drv,
> > -                                   struct pf_device_id *devid,
> > -                                   __u64 dev_base,
> > -                                   int dev_irq)
> > +                                   struct pf_device *dev)
> >  {
> > -   struct pf_device *dev;
> >     int ret;
> >
> >     UK_ASSERT(drv !=3D NULL);
> >     UK_ASSERT(drv->add_dev !=3D NULL);
> > +   UK_ASSERT(dev !=3D NULL);
> >
> > -   dev =3D (struct pf_device *) uk_calloc(pfh.a, 1, sizeof(*dev));
> > -   if (!dev) {
> > -           uk_pr_err("Platform : Failed to initialize: Out of memory!\=
n");
> > -           return -ENOMEM;
> > -   }
> > -
> > -   memcpy(&dev->id, devid, sizeof(dev->id));
> > -   uk_pr_debug("pf_driver_add_device dev->id=3D%d\n", dev->id.device_i=
d);
> > -
> > -   dev->base =3D dev_base;
> > -   dev->irq =3D dev_irq;
> > +   uk_pr_debug("pf_driver_add_device devid=3D%d\n", dev->id.device_id)=
;
> >
> >     ret =3D drv->add_dev(dev);
> >     if (ret < 0) {
> >             uk_pr_err("Platform Failed to initialize device driver\n");
> > -           uk_free(pfh.a, dev);
> >     }
> >
> >     return ret;
> >  }
> >
> > +static inline int pf_driver_probe_device(struct pf_driver *drv,
> > +                                   struct pf_device *dev)
> > +{
> > +   int ret;
> > +
> > +   UK_ASSERT(drv !=3D NULL && dev !=3D NULL);
> > +   UK_ASSERT(drv->probe !=3D NULL);
> > +
> > +   uk_pr_info("pf_driver_probe_device devid=3D%d\n", dev->id.device_id=
);
> > +
> > +   ret =3D drv->probe(dev);
> > +   if (ret < 0) {
> > +           uk_pr_err("Platform Failed to probe device driver\n");
> > +
> > +           return ret;
> > +   }
> > +
> > +   return 0;
> > +}
> > +
> >  static int pf_probe(void)
> >  {
> > -   struct pf_device_id devid;
> >     struct pf_driver *drv;
> > -   int i;
> > -   int end_offset =3D -1;
> > +   int idx =3D 0;
> >     int ret =3D -ENODEV;
> > -   const fdt32_t *prop;
> > -   int type, hwirq, prop_len;
> > -   __u64 reg_base;
> > -   __phys_addr dev_base;
> > -   int dev_irq;
> > +   struct pf_device *dev;
> > +   int fdt_pf =3D -1;
> >
> >     uk_pr_info("Probe PF\n");
> >
> > -   /* We only support virtio_mmio as a platform device here.
> > -    * A loop here is needed for finding drivers if more devices
> > -    */
> > -   devid.device_id =3D VIRTIO_MMIO_ID;
> > +   /* Search all the platform bus devices provided by fdt */
> > +   do {
> >
> > Typo: "pf_device_compatible_list"
>
> Okay
>
> >
> > +           fdt_pf =3D
> > fdt_node_offset_idx_by_compatible_list(_libkvmplat_cfg.dtb,
> > +                                           fdt_pf, pf_device_compatilb=
e_list,
> > &idx);
> > +           if (fdt_pf < 0) {
> > +                   uk_pr_info("End of searching platform devices\n");
> > +                   break;
> > +           }
> >
> > -   drv =3D pf_find_driver(&devid);
> > -   if (!drv) {
> > -           uk_pr_info("<no driver>\n");
> > -           return -ENODEV;
> > -   }
> > +           /* Alloc dev */
> > +           dev =3D (struct pf_device *) uk_calloc(pfh.a, 1, sizeof(*de=
v));
> > +           if (!dev) {
> > +                   uk_pr_err("Platform : Failed to initialize: Out of
> > memory!\n");
> > +                   return -ENOMEM;
> > +           }
> >
> > -   uk_pr_info("driver %p\n", drv);
> > -
> > -   /* qemu creates virtio devices in reverse order */
> > -   for (i =3D 0; i < UK_MAX_VIRTIO_MMIO_DEVICE; i++) {
> > -           end_offset =3D fdt_node_offset_by_compatible_list(fdt_start=
,
> > -                                                   end_offset,
> > -                                                   pf_device_list);
> > -           if (end_offset =3D=3D -FDT_ERR_NOTFOUND) {
> > -                   uk_pr_info("device not found in fdt\n");
> > -                   goto error_exit;
> > -           } else {
> > -                   prop =3D fdt_getprop(fdt_start, end_offset, "interr=
upts",
> > &prop_len);
> > -                   if (!prop) {
> > -                           uk_pr_err("irq of device not found in fdt\n=
");
> > -                           goto error_exit;
> > -                   }
> > +           dev->fdt_offset =3D fdt_pf;
> >
> > -                   type =3D fdt32_to_cpu(prop[0]);
> > -                   hwirq =3D fdt32_to_cpu(prop[1]);
> > +           /* Find drv with compatible-id match table */
> >
> > Typo: "pf_device_compatible_list"
> >
> > +           drv =3D pf_find_driver(pf_device_compatilbe_list[idx]);
> > +           if (!drv) {
> > +                   uk_free(pfh.a, dev);
> > +                   continue;
> > +           }
> >
> > -                   prop =3D fdt_getprop(fdt_start, end_offset, "reg",
> > &prop_len);
> > -                   if (!prop) {
> > -                           uk_pr_err("reg of device not found in fdt\n=
");
> > -                           goto error_exit;
> > -                   }
> > +           dev->id =3D *(struct pf_device_id *)drv->device_ids;
> > +           uk_pr_info("driver %p\n", drv);
> >
> > -                   /* only care about base addr, ignore the size */
> > -                   reg_base =3D fdt32_to_cpu(prop[0]);
> > -                   reg_base =3D reg_base << 32 | fdt32_to_cpu(prop[1])=
;
> > +           ret =3D pf_driver_probe_device(drv, dev);
> > +           if (ret < 0) {
> > +                   uk_free(pfh.a, dev);
> > +                   continue;
> >             }
> >
> > -           dev_base =3D reg_base;
> > -           dev_irq =3D gic_irq_translate(type, hwirq);
> > -
> > -           ret =3D pf_driver_add_device(drv, &devid, dev_base, dev_irq=
);
> > -   }
> > +           ret =3D pf_driver_add_device(drv, dev);
> > +           if (ret < 0) {
> > +                   uk_pr_err("Platform Failed to initialize device dri=
ver,
> > ret(%d)\n",ret);
> > +                   uk_free(pfh.a, dev);
> > +           }
> > +   } while (1);
> >
> >     return ret;
> > -
> > -error_exit:
> > -   return -ENODEV;
> >  }
> >
> >
> > @@ -232,4 +234,4 @@  static struct pf_bus_handler pfh =3D {
> >     .b.init =3D pf_init,
> >     .b.probe =3D pf_probe
> >  };
> > -UK_BUS_REGISTER(&pfh.b);
> > +UK_BUS_REGISTER_PRIORITY(&pfh.b, 1);
> >
> > Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Thu May 13 08:29:06 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 13 May 2021 08:29:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.126769.238211 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lh6iO-0001CA-0P; Thu, 13 May 2021 08:29:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 126769.238211; Thu, 13 May 2021 08:29:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lh6iN-0001C3-TR; Thu, 13 May 2021 08:29:03 +0000
Received: by outflank-mailman (input) for mailman id 126769;
 Thu, 13 May 2021 08:29:02 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=dbfP=KI=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lh6iM-0001B2-JT
 for minios-devel@lists.xenproject.org; Thu, 13 May 2021 08:29:02 +0000
Received: from foss.arm.com (unknown [217.140.110.172])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTP
 id afebed6d-449b-4edb-bac4-54190fc2d2f7;
 Thu, 13 May 2021 08:29:01 +0000 (UTC)
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
 by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C02F8101E;
 Thu, 13 May 2021 01:29:00 -0700 (PDT)
Received: from localhost.localdomain (entos-thunderx2-02.shanghai.arm.com
 [10.169.212.215])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E237C3F719;
 Thu, 13 May 2021 01:28:58 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: afebed6d-449b-4edb-bac4-54190fc2d2f7
From: Jia He <justin.he@arm.com>
To: minios-devel@lists.xenproject.org
Cc: Simon Kuenzer <simon.kuenzer@neclab.eu>,
	Sharan.Santhanam@neclab.eu,
	Felipe Huici <felipe.huici@neclab.eu>,
	Jia He <justin.he@arm.com>
Subject: [PATCH] lib/vfscore: Correct the macro name of UK_LIBC_SYSCALLS
Date: Thu, 13 May 2021 16:28:33 +0800
Message-Id: <20210513082833.102502-1-justin.he@arm.com>
X-Mailer: git-send-email 2.17.1

Correct the name from UK_LIBC_SYSCALL to UK_LIBC_SYSCALLS

Otherwise the linking will report:
libs/newlib/musl-imported/src/termios/tcsetattr.c:35:
undefined reference to `ioctl'
/bin/ld:
apps/sqlite/build/sqlite_kvm-x86_64.o: in
function `tcgetattr':
libs/newlib/musl-imported/src/termios/tcgetattr.c:30:
undefined reference to `ioctl'

Reported-by: Alexander Jung <a.jung@lancs.ac.uk>
Signed-off-by: Jia He <justin.he@arm.com>
---
 lib/vfscore/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vfscore/main.c b/lib/vfscore/main.c
index 11bfa93..0ecad74 100644
--- a/lib/vfscore/main.c
+++ b/lib/vfscore/main.c
@@ -673,7 +673,7 @@ out_errno:
 	return -error;
 }
 
-#if UK_LIBC_SYSCALL
+#if UK_LIBC_SYSCALLS
 int ioctl(int fd, unsigned long int request, ...)
 {
 	va_list ap;
-- 
2.17.1



From minios-devel-bounces@lists.xenproject.org Thu May 13 09:38:48 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 13 May 2021 09:38:48 +0000
Received: from list by lists.xenproject.org with outflank-mailman.126792.238245 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lh7nq-00007X-Lu; Thu, 13 May 2021 09:38:46 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 126792.238245; Thu, 13 May 2021 09:38:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lh7nq-00007P-IR; Thu, 13 May 2021 09:38:46 +0000
Received: by outflank-mailman (input) for mailman id 126792;
 Thu, 13 May 2021 09:38:45 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=dbfP=KI=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lh7np-00007G-H5
 for minios-devel@lists.xenproject.org; Thu, 13 May 2021 09:38:45 +0000
Received: from foss.arm.com (unknown [217.140.110.172])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTP
 id 0976e541-aa48-4c2c-b33c-bde4a3716525;
 Thu, 13 May 2021 09:38:43 +0000 (UTC)
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
 by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C217EED1;
 Thu, 13 May 2021 02:38:42 -0700 (PDT)
Received: from localhost.localdomain (entos-thunderx2-02.shanghai.arm.com
 [10.169.212.215])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EC2E23F719;
 Thu, 13 May 2021 02:38:40 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 0976e541-aa48-4c2c-b33c-bde4a3716525
From: Jia He <justin.he@arm.com>
To: minios-devel@lists.xenproject.org
Cc: Simon Kuenzer <simon.kuenzer@neclab.eu>,
	Sharan.Santhanam@neclab.eu,
	Felipe Huici <felipe.huici@neclab.eu>,
	Jia He <justin.he@arm.com>
Subject: [PATCH] plat/arm64: Fix extregs allocation on Arm
Date: Thu, 13 May 2021 17:38:34 +0800
Message-Id: <20210513093834.118292-1-justin.he@arm.com>
X-Mailer: git-send-email 2.17.1

Implement the extregs (currently only fpsimd registers) allocation
related helpers. Otherwise, Unikraft can be built on Arm kvm plat
due to the missing of several helpers.

Signed-off-by: Jia He <justin.he@arm.com>
---
 plat/common/include/arm/arm64/cpu.h | 31 ++++++++++-------------------
 1 file changed, 11 insertions(+), 20 deletions(-)

diff --git a/plat/common/include/arm/arm64/cpu.h b/plat/common/include/arm/arm64/cpu.h
index a3fb730..804a34b 100644
--- a/plat/common/include/arm/arm64/cpu.h
+++ b/plat/common/include/arm/arm64/cpu.h
@@ -175,24 +175,19 @@ static inline void restore_extregs(struct sw_ctx *ctx)
 	isb();
 }
 
-static inline struct sw_ctx *arch_alloc_sw_ctx(struct uk_alloc *allocator)
+static inline void arch_init_extregs(struct sw_ctx *ctx __unused)
 {
-	struct sw_ctx *ctx;
-
-	ctx = (struct sw_ctx *)uk_malloc(allocator,
-			sizeof(struct sw_ctx) + sizeof(struct fpsimd_state));
 	if (ctx)
-		ctx->extregs = (uintptr_t)((void *)ctx + sizeof(struct sw_ctx));
+		ctx->extregs = (uintptr_t)ctx->_extregs;
 
 	uk_pr_debug("Allocating %lu + %lu bytes for sw ctx at %p, extregs at %p\n",
 			sizeof(struct sw_ctx), sizeof(struct fpsimd_state),
 			ctx, (void *)ctx->extregs);
-
-	return ctx;
 }
 
-static inline void arch_init_extregs(struct sw_ctx *ctx __unused)
+static inline __sz arch_extregs_size(void)
 {
+	return sizeof(struct fpsimd_state);
 }
 
 #else /* !CONFIG_FPSIMD */
@@ -204,21 +199,17 @@ static inline void restore_extregs(struct sw_ctx *ctx __unused)
 {
 }
 
-static inline struct sw_ctx *arch_alloc_sw_ctx(struct uk_alloc *allocator)
+static inline void arch_init_extregs(struct sw_ctx *ctx)
 {
-	struct sw_ctx *ctx;
-
-	ctx = (struct sw_ctx *)uk_malloc(allocator, sizeof(struct sw_ctx));
-	uk_pr_debug("Allocating %lu bytes for sw ctx at %p\n",
-		sizeof(struct sw_ctx), ctx);
-
-	return ctx;
+	if (ctx)
+		ctx->extregs = (uintptr_t)ctx->_extregs;
 }
 
-static inline void arch_init_extregs(struct sw_ctx *ctx)
+static inline __sz arch_extregs_size(void)
 {
-	ctx->extregs = (uintptr_t)ctx + sizeof(struct sw_ctx);
+	return 0;
 }
-
 #endif /* CONFIG_FPSIMD */
+
+
 #endif /* __PLAT_COMMON_ARM64_CPU_H__ */
-- 
2.17.1



From minios-devel-bounces@lists.xenproject.org Thu May 13 14:33:31 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 13 May 2021 14:33:31 +0000
Received: from list by lists.xenproject.org with outflank-mailman.126990.238643 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhCP3-0000In-6U; Thu, 13 May 2021 14:33:29 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 126990.238643; Thu, 13 May 2021 14:33:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhCP3-0000Ig-3a; Thu, 13 May 2021 14:33:29 +0000
Received: by outflank-mailman (input) for mailman id 126990;
 Thu, 13 May 2021 14:33:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=YF4f=KI=lancaster.ac.uk=a.jung@srs-us1.protection.inumbo.net>)
 id 1lhCP1-0000IN-00
 for minios-devel@lists.xenproject.org; Thu, 13 May 2021 14:33:27 +0000
Received: from GBR01-CWL-obe.outbound.protection.outlook.com (unknown
 [40.107.11.130]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id c97d5ed4-301b-416d-a2cb-6e977329c868;
 Thu, 13 May 2021 14:33:23 +0000 (UTC)
Received: from LNXP265MB0923.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:82::20)
 by LO3P265MB2393.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:10f::7) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Thu, 13 May
 2021 14:33:22 +0000
Received: from LNXP265MB0923.GBRP265.PROD.OUTLOOK.COM
 ([fe80::b905:1106:84f7:b4a4]) by LNXP265MB0923.GBRP265.PROD.OUTLOOK.COM
 ([fe80::b905:1106:84f7:b4a4%7]) with mapi id 15.20.4129.027; Thu, 13 May 2021
 14:33:22 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: c97d5ed4-301b-416d-a2cb-6e977329c868
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=mSmd3nFel7QzKX8UUcc1cUBhnFQLA3Wd919aF4jLTX7fuqFGvADeRLUaEej9iDVaJWtjLBlcc5ryOWKQR6qOm8qMVOfBterGWPE5X/GGmvdKjYH1N4zkFB3WG0+hFjr+9dkh5eosJREHoxi7JH/OXBou9dUt923vN0NC3gAR503xSpNi0WJhnsNQ9Pd3Au3jPE99Y5Srd8CfWc64AlnB0ppqU/P/cg/ag2tfBngSqJ2qYgOqeaz9nForJrvWGwEYFsVjqorFX3zfwbBT7YVbHMgcu8NlbCKGt7asjSAPr3q+AY0S/N7Ry+4dUiIT3FcBhb5rv4EpSaRPmORpHtOBjQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=0o4Y21kwONzbFm9qDFlRhgXzAzk405uDU+NmRb/1vMc=;
 b=Fdv4mRozOn1uvYgI9Y+4hEH88VPWOxbSLFobFg2L+k3FBYHJVNGVQgAJaSyHPPBh/jrwdp+lvHgtyVEet8RRZDQ6Tn6jwoyJDTg07w1t1Zlpb4+39ibJ9+GH1LfJun5chrOppZhfCpdw3AEZ0zw//cWM8SUkvhyNQzwG552VFNqOJ7M4P6ZuQM1RiFoUxZxXlLoXIM4io1gYTLMS4c70BPfC6wF24WGrc2Nj4af8lyyPCQmyftjJHSAK9HpQnL/iydcn97LIwBF9rm9Ig906EpbN4dm6bAldhUVSk2Bty4MRdlx3WJqFoReReOeQZ2MbRp7PCZjsJjwkhvGy0CDEWw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=lancaster.ac.uk; dmarc=pass action=none
 header.from=lancaster.ac.uk; dkim=pass header.d=lancaster.ac.uk; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=livelancsac.onmicrosoft.com; s=selector2-livelancsac-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=0o4Y21kwONzbFm9qDFlRhgXzAzk405uDU+NmRb/1vMc=;
 b=fvouJCop+wdpnQWVBzxf3Adx8oZ8BCON9JcLUTqpVDwMq6M+7VRZm00PrT3qU9hqMUCc5DRJkv4ffSfVf41miL7RRfUpXPLZjA1W/w9BAaUGisrfz/j5Mjk/c6CsEkCWvc0QXUHedVutytWu8luCfh3DJ/Lw4QlrnkYErmAKeEQ=
From: "Jung, Alexander (Student)" <a.jung@lancaster.ac.uk>
To: Jia He <justin.he@arm.com>
CC: "minios-devel@lists.xenproject.org" <minios-devel@lists.xenproject.org>,
	Simon Kuenzer <simon.kuenzer@neclab.eu>, "Sharan.Santhanam@neclab.eu"
	<Sharan.Santhanam@neclab.eu>, Felipe Huici <felipe.huici@neclab.eu>,
	"sergiu.moga@protonmail.com" <sergiu.moga@protonmail.com>
Subject: Re: [External] [PATCH] lib/vfscore: Correct the macro name of
 UK_LIBC_SYSCALLS
Thread-Topic: [External] [PATCH] lib/vfscore: Correct the macro name of
 UK_LIBC_SYSCALLS
Thread-Index: AQHXR9IcqfDXr+hozE+50Oc+ZcM796rhejIA
Date: Thu, 13 May 2021 14:33:22 +0000
Message-ID: <2D3C16B2-EE72-4D9A-831C-F4AB793252AD@lancs.ac.uk>
References: <20210513082833.102502-1-justin.he@arm.com>
In-Reply-To: <20210513082833.102502-1-justin.he@arm.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3654.60.0.2.21)
authentication-results: arm.com; dkim=none (message not signed)
 header.d=none;arm.com; dmarc=none action=none header.from=lancaster.ac.uk;
x-originating-ip: [31.205.116.251]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: dcb3e8e2-a7c5-4fc2-a438-08d9161c0f60
x-ms-traffictypediagnostic: LO3P265MB2393:
x-microsoft-antispam-prvs:
 <LO3P265MB2393E88E1DCB118765414CCBCE519@LO3P265MB2393.GBRP265.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info:
 G4r2xas32I7HOyvMmpmX0rpWmaP4NbRBD7cnQw/+XnOJ3DqHSu4OroOfHZFIEfJgpVBTKw1att2JRC+YHUMpGBvBtdcWsneGJezaiFXTBa+7Xoz8nWH2FcVR73Ji3R2F/VblwAcDQbRQ87ggCi5x5cg54oAS2mkCQg+Jadl7d+TXfUVRu+d88pFmZe514CYyZS0TkZwIlg80Vi0R0VMQHDT+0j/qoBR4F41pQ8fslxTeiTVzWa2j9nqo2XiOMftSgY1sn3VHxQ9VC8k+k3vx4ctMfuKv6V+SPIL2A8biPAE6Mc718JdAawoWo+wT4Hekm4MQIWAEwVmGig3L7seA8g7BeRAzIgGZu8VT8knsrsudeQtiD1mvRtqJoeTDbd2CK2Vj3/FG6dnXW8J36eigYVafUS1RqKY8dgjG41eyqrOZhB7+fdcdDb8h1ZsDXbBmmc1/U76xcpWnQIOnvzfwFyvPh+w+fP1tGJ7ftzddxtR6epud9GZpDp+xu8NOjxOejK+kp3WSPpnPyvzjcqrgGwGk1Sc4bMjvN66mwhp8skiZDzkPSELG6VbdvHhFtBBhGQge5hvt706YozZvuBkn7z/A0+nS6YJXYbM8hIT5FpfPTZXR9iPZkQA290TeOAvybkbwuWXogavHGBSE7i8/dN2YbfXGZS0o0mCU7F1U5A0=
x-forefront-antispam-report:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LNXP265MB0923.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(4636009)(366004)(39830400003)(136003)(376002)(346002)(396003)(38100700002)(36756003)(4326008)(478600001)(2906002)(122000001)(86362001)(66476007)(966005)(8676002)(6916009)(71200400001)(66446008)(26005)(64756008)(186003)(5660300002)(76116006)(33656002)(66556008)(66946007)(6512007)(9686003)(786003)(83380400001)(6486002)(8936002)(316002)(6506007)(54906003);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata:
 =?utf-8?B?Tk9NcUZqYU5qTmcvYnNhRi8xWi9uaW5XQU16cEZiSVp4RVVMbWNVRVozSkZZ?=
 =?utf-8?B?UkdybDVRdkR3bnRmN1JtSVdVc3lpbHcvNTZSYVRYWWZOVnVnVmJRRU5SMmFy?=
 =?utf-8?B?ZW9SMTFGRnBIL3lXazJXSGpCak5VZ09uWUpyM1JwTHhyS1l6SFBhU0J6am5C?=
 =?utf-8?B?dGxmckZlamF4dTgyRVU3Zkw4TFM1bENua3c0NERsU2lHdUFWNzEvS1lwamZ2?=
 =?utf-8?B?NkptN3BMVzZkRkJSU0I4aXQ3M2NhZGQrb21mZ296a2o0czJDQVpoK1A0ei92?=
 =?utf-8?B?ZGFlRzNnNFJaOXA4UjN4T1pBTGFwOHFSYXpZOG1PU0ZPTWhWajEwbFI4MVV5?=
 =?utf-8?B?RzBaRjRDQThnV1FLZE1DcmxXdDAycW1sWG9CNEdyZ3l5N2g4UVZGYTc1NnV2?=
 =?utf-8?B?MVVjM21PSFNZVk5PVDBlY0RnYUkrdnE1Mlc4UDFLM0dFS0N4SFlWK21qVHMr?=
 =?utf-8?B?NEIvcXowUlVxNzNlOUI1RWVkaFJiZUtTN2lLSjJ4R1V0bUh2TG8zZWJ1WkR1?=
 =?utf-8?B?TDVGT25lYisyRlpTNmRGZnZVQlNuYlVBM3VOY1QwcVAreHk5SHBIaEg0MjZp?=
 =?utf-8?B?Wk1kbnhJZ09neWtGOFpEN2VldWpuUHBib3J1bXlyc2R1VUlrM21VWDUxU1pU?=
 =?utf-8?B?MmU5OEh5aWJOcDIwSTRSSWhHTTVERDdEQjVMVE40T1lGbllwSXZjay8zd0JL?=
 =?utf-8?B?azVvck1weDBrN1RhYnNLZGZ4bzBKWlpPOTJJamJhbmxYY2ZZQ0RjTkhLVS9J?=
 =?utf-8?B?U2xnd0wrbld2TUg4b2ZRdE1WMjZmQjhZdlZRV21FakU5aDhpckpPSk9CdXBl?=
 =?utf-8?B?R3hTSXlyMW1acS9CWUpWSDh0Sy8zalAzNjBla0x0TzN3TTJvTUxKN2RTZ2p1?=
 =?utf-8?B?TDhSZ2F6WkthOW5oTTlzVEYrZlF4TldxSmxUNFJGZm9xZTlmMy96NkVGd1lu?=
 =?utf-8?B?TzhYSXZrYTZsVXB0WGN5OXoyMlcxcFdhaFRDb2NUamdqU3duWGF4S09tYTRk?=
 =?utf-8?B?WXBRaFAzYzFoRllHeFQ0ekJPQzkrUjhBM3RYTDg2RXBMbkdIL01OT0U0SHJy?=
 =?utf-8?B?SWFtOUZuM0lPQ2tSYlIzMmFQSlY1K1VTdzErYU95Y3U4d3F4VkozaVpzeUJr?=
 =?utf-8?B?dlRaVEhhTzBoRW1SNDJ4dWRNdjZ6NFBManhYRlpQRGg4NXMwZjZaTmM0bkE5?=
 =?utf-8?B?dXJtMUV2N1JxMmpjei9WWTlVOEhERHhndmdoSkx0bWdldXdGUi9lTEhtVFJQ?=
 =?utf-8?B?cTNVc0RVSEtXT2NzV1ZOd3hVQWVOb0M2ajkrWHpEbWlsS3RyYnJPcC95aFFL?=
 =?utf-8?B?eGxCakJyNDlGL09xVXVVS0liUlNUaDFySmJBYlhyTjNSL2pJU3VlM0xsZGRo?=
 =?utf-8?B?ZU8vMURmQzZxUC9yMngrdUpJdXJzcitvTWg1KzF0c0UrQWFIbjJleDZEbWRp?=
 =?utf-8?B?bDhkQWt2QjVMK2tOUG9LWUZwRFlTVTRDN3pUeERwa2p5QXM1eldybVRrakoz?=
 =?utf-8?B?dkhkZkJSWnZodlJ4K1h0WUpKWmtvdU9yRW5BSzdQajFxdWpiWGpMVlFlMTRk?=
 =?utf-8?B?ZjB0VXZHa1NXaUtMTzBaNWpUM1llTk1NYzZXSHFpd0ZDSzJkT1ZLVmdpdkFz?=
 =?utf-8?B?KzhlYWx6RlpaS3VEZVVHYmVpdmM5TUl5cnNzb1RMM24wL0Q0Y29lYy9vTmVT?=
 =?utf-8?B?cElDK2x4enZBZU5vdFQxd3JLTnR0RTZMc08vRUJiVTBtdTMvNVJZRnJkMVBo?=
 =?utf-8?Q?2VKYCzZyjzRCuAG/dfYBP/WE6l8s9ERh4epnrQD?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <BA08138C18A7324595C5D4A043BC7BDF@GBRP265.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: lancaster.ac.uk
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: LNXP265MB0923.GBRP265.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: dcb3e8e2-a7c5-4fc2-a438-08d9161c0f60
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2021 14:33:22.2193
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9c9bcd11-977a-4e9c-a9a0-bc734090164a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: HeFK8mp7oo+3+MXCNJNLL5C929PAwK4p75y4aj4vFg39OMQ4GOtC7zI2uCuMnKHBpLHR7Y0V2o0aDf/xL37wTg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO3P265MB2393

SGkgSnVzdGluLA0KDQpUaGFua3MgZm9yIHRoaXMgZml4ISA6RCAgVHVybnMgb3V0IHRoaXMg4oCc
c3BlbGxpbmcgbWlzdGFrZeKAnSBvY2N1cnMgaW4gc2V2ZXJhbCBvdGhlciBwbGFjZXMgdG9vLiAg
Rm9yIHRoaXMgcmVhc29uIHdl4oCZdmUgY3JlYXRlZCBhIFBSIG9uIEdpdGh1YlswXSB3aXRoIGdl
bmVyYWwgZml4IGFuZCBpbmNsdWRlZCB5b3VyIHBhdGNoIGluIHRoZSBzYW1lIHNlcmllcy4gIA0K
DQpBbHNvLCBJIGNvdWxkbuKAmXQgc2VlIHlvdXIgZW1haWwgdHVybiB1cCBvbiBwYXRjaHdvcmsg
Zm9yIHNvbWUgcmVhc29uIOKAlCBub3Qgc3VyZSB3aHkgaXQgd2FzbuKAmXQgY2F1Z2h0LiAgQW55
d2F5LCB3aXRoIHRoZSBtaWdyYXRpb24gdG8gR2l0aHViIGN1cnJlbnRseSBvbi1nb2luZywgY2Fu
IHlvdSBwbGVhc2Ugc3VibWl0IG5ldyBmZWF0dXJlcy9maXhlcyBhcyBQUnMgdG8gdGhlIFVuaWty
YWZ0IHJlcG8/IDopDQoNClRoYW5rcyBhbmQgYWxsIHRoZSBiZXN0LA0KDQpBbGV4YW5kZXIgSnVu
ZywNCg0KUGguRCBTdHVkZW50LA0KTmV0d29ya2luZyAmIFN5c3RlbXMgUmVzZWFyY2ggR3JvdXAs
IA0KTGFuY2FzdGVyIFVuaXZlcnNpdHkNCm5ldC5zY2MubGFuY3MuYWMudWsNCg0KRjRENSBDNkI2
IDkxMzkgNDk0MiA5NDA3ICA3RjU0IEVEMzAgMUE4QSAxNzYzIDFCNjINCg0KWzBdOiBodHRwczov
L2dpdGh1Yi5jb20vdW5pa3JhZnQvdW5pa3JhZnQvcHVsbC8yMDQNCg0KPiBPbiAxMy4gTWF5IDIw
MjEsIGF0IDA5OjI4LCBKaWEgSGUgPGp1c3Rpbi5oZUBhcm0uY29tPiB3cm90ZToNCj4gDQo+IFRo
aXMgZW1haWwgb3JpZ2luYXRlZCBvdXRzaWRlIHRoZSBVbml2ZXJzaXR5LiBDaGVjayBiZWZvcmUg
Y2xpY2tpbmcgbGlua3Mgb3IgYXR0YWNobWVudHMuDQo+IA0KPiBDb3JyZWN0IHRoZSBuYW1lIGZy
b20gVUtfTElCQ19TWVNDQUxMIHRvIFVLX0xJQkNfU1lTQ0FMTFMNCj4gDQo+IE90aGVyd2lzZSB0
aGUgbGlua2luZyB3aWxsIHJlcG9ydDoNCj4gbGlicy9uZXdsaWIvbXVzbC1pbXBvcnRlZC9zcmMv
dGVybWlvcy90Y3NldGF0dHIuYzozNToNCj4gdW5kZWZpbmVkIHJlZmVyZW5jZSB0byBgaW9jdGwn
DQo+IC9iaW4vbGQ6DQo+IGFwcHMvc3FsaXRlL2J1aWxkL3NxbGl0ZV9rdm0teDg2XzY0Lm86IGlu
DQo+IGZ1bmN0aW9uIGB0Y2dldGF0dHInOg0KPiBsaWJzL25ld2xpYi9tdXNsLWltcG9ydGVkL3Ny
Yy90ZXJtaW9zL3RjZ2V0YXR0ci5jOjMwOg0KPiB1bmRlZmluZWQgcmVmZXJlbmNlIHRvIGBpb2N0
bCcNCj4gDQo+IFJlcG9ydGVkLWJ5OiBBbGV4YW5kZXIgSnVuZyA8YS5qdW5nQGxhbmNzLmFjLnVr
Pg0KPiBTaWduZWQtb2ZmLWJ5OiBKaWEgSGUgPGp1c3Rpbi5oZUBhcm0uY29tPg0KPiAtLS0NCj4g
bGliL3Zmc2NvcmUvbWFpbi5jIHwgMiArLQ0KPiAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24o
KyksIDEgZGVsZXRpb24oLSkNCj4gDQo+IGRpZmYgLS1naXQgYS9saWIvdmZzY29yZS9tYWluLmMg
Yi9saWIvdmZzY29yZS9tYWluLmMNCj4gaW5kZXggMTFiZmE5My4uMGVjYWQ3NCAxMDA2NDQNCj4g
LS0tIGEvbGliL3Zmc2NvcmUvbWFpbi5jDQo+ICsrKyBiL2xpYi92ZnNjb3JlL21haW4uYw0KPiBA
QCAtNjczLDcgKzY3Myw3IEBAIG91dF9lcnJubzoNCj4gICAgICAgIHJldHVybiAtZXJyb3I7DQo+
IH0NCj4gDQo+IC0jaWYgVUtfTElCQ19TWVNDQUxMDQo+ICsjaWYgVUtfTElCQ19TWVNDQUxMUw0K
PiBpbnQgaW9jdGwoaW50IGZkLCB1bnNpZ25lZCBsb25nIGludCByZXF1ZXN0LCAuLi4pDQo+IHsN
Cj4gICAgICAgIHZhX2xpc3QgYXA7DQo+IC0tDQo+IDIuMTcuMQ0KPiANCj4gDQoNCg==


From minios-devel-bounces@lists.xenproject.org Fri May 14 02:43:03 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 02:43:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127156.238911 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhNn2-0007Y9-PW; Fri, 14 May 2021 02:43:00 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127156.238911; Fri, 14 May 2021 02:43:00 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhNn2-0007Y2-M2; Fri, 14 May 2021 02:43:00 +0000
Received: by outflank-mailman (input) for mailman id 127156;
 Fri, 14 May 2021 02:42:59 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=h5sE=KJ=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lhNn1-0007WX-JL
 for minios-devel@lists.xen.org; Fri, 14 May 2021 02:42:59 +0000
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (unknown
 [40.107.21.48]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id e62854e7-6137-4195-b5af-4db54d079cc6;
 Fri, 14 May 2021 02:42:56 +0000 (UTC)
Received: from AM5PR0402CA0014.eurprd04.prod.outlook.com
 (2603:10a6:203:90::24) by AM6PR08MB3383.eurprd08.prod.outlook.com
 (2603:10a6:20b:50::29) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Fri, 14 May
 2021 02:42:54 +0000
Received: from AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:203:90:cafe::82) by AM5PR0402CA0014.outlook.office365.com
 (2603:10a6:203:90::24) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend
 Transport; Fri, 14 May 2021 02:42:54 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 AM5EUR03FT038.mail.protection.outlook.com (10.152.17.118) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4129.25 via Frontend Transport; Fri, 14 May 2021 02:42:54 +0000
Received: ("Tessian outbound 8ca198b738d3:v91");
 Fri, 14 May 2021 02:42:54 +0000
Received: from a2bf00b2984f.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 2A9FB819-81D9-4EF9-A386-26A88C248EB4.1; 
 Fri, 14 May 2021 02:42:48 +0000
Received: from EUR04-DB3-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a2bf00b2984f.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Fri, 14 May 2021 02:42:48 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AM6PR08MB3703.eurprd08.prod.outlook.com (2603:10a6:20b:83::17)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Fri, 14 May
 2021 02:42:47 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Fri, 14 May 2021
 02:42:47 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: e62854e7-6137-4195-b5af-4db54d079cc6
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=LHo9arxQGFSEJ0UaZwRv81Tajo5T/yCLeY06+Ft4X9Y=;
 b=hewopD9gHAXcXIW78PwsBztHP1y1/tsiIb4oQ+URxYjFat5DtDulZ07XDFeNZdzMOY3FV3qpq2XC8Zwa4zO0eUf1VD9owUIdEfGrXC6rkA+FGOiSpo7AW9pWNSQUPI4iMLGGVjh8LyFoaCqctvs5Keh5D3P88XjvROFF97tFFRA=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=nIL+l2bnvRFW3WS/hCSTxy38ndh2dLEGwddMALzFtIFIgwIh+YYHTni9ngvG3sOMQ/2rNOir5ObCIUEHmgohgt0c8dJTptMc042BkttZrMJd9eDaXyPkl7u+OUVgmYZn+CONMreNsD/+dpyIFAHrB4w/JoEDtEq2PSiwsgDN2qSy1NXGqNOeR8prgHpBC+YNat4JAZ28NrZvyXj+/s4nCI9BN0X+7+QEyEPJTS9raF97+CnfknK+ZuRme516waehEEdpiq0GVQ8Yh7xInehzH7t7IFbLiCnsJaTuwJySUynEizDSVxXAnAV4hEc3j7ebuNFEIva3SVFsLiWkgGIF6g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=LHo9arxQGFSEJ0UaZwRv81Tajo5T/yCLeY06+Ft4X9Y=;
 b=DaOq939dwEcqOVwWk8/bi+RxAUbSV6XT/KDFXI1iJ8UorC0HYzI8XOjYS+RdsBRcfpLQ3g8yvlqyVxAg3mYT+G5Jtd1CCb4RP1Q9Ts8/Da39f2dO/CMtDDQI1bVbCfiH81Gwpke7bE3keVC3j5wmuS0tCvPq4rjr8cWsANUO2LGljJgZXvjEFZZmbvQIIMYJ8Y1aUv3DswVGLVhdFXNuoamTOHGWbC0TUw3dX/rexKaHTCQf4bCqtzNRG7GzSZgDbKGZM4Buu/x8X3eMUrethuoWFiUKSUiLQb2RwPvbT8JKCYUvPwly2+33GFvFCFux0P0Xyc7fKIvSgCV5+82+PQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=LHo9arxQGFSEJ0UaZwRv81Tajo5T/yCLeY06+Ft4X9Y=;
 b=hewopD9gHAXcXIW78PwsBztHP1y1/tsiIb4oQ+URxYjFat5DtDulZ07XDFeNZdzMOY3FV3qpq2XC8Zwa4zO0eUf1VD9owUIdEfGrXC6rkA+FGOiSpo7AW9pWNSQUPI4iMLGGVjh8LyFoaCqctvs5Keh5D3P88XjvROFF97tFFRA=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,14/35] plat/ofw: Support completed ranges mapping 
Thread-Topic: [RFCv4,14/35] plat/ofw: Support completed ranges mapping 
Thread-Index: AQHXN4NnDIQNVZjR3UCiYBDLfpdIo6riZobQ
Date: Fri, 14 May 2021 02:42:46 +0000
Message-ID:
 <AM6PR08MB4376EFD3A7DDFC6112F1D4C3F7509@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-15-justin.he@arm.com>
 <20210422142535.26769-1-razvanvirtan@gmail.com>
In-Reply-To: <20210422142535.26769-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: E5749E1B828BC5499AE9F1396BACEDBA.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.113]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 15c2081f-8595-4b20-332a-08d91681f970
x-ms-traffictypediagnostic: AM6PR08MB3703:|AM6PR08MB3383:
X-Microsoft-Antispam-PRVS:
	<AM6PR08MB3383A2A8DFF4FC45A56AACEDF7509@AM6PR08MB3383.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:3631;OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 5nr7yCKuQhPfm1RXvvVMdeQFomWpukQij+O47xNMAizJ1p+1i6Ol896NG6OyrM6nPd2VZPZIC+XojSf8cngauU1kZfSI55GlW3i9bX/iLRSg5XTmEhMqmt+vuBPxDCe5xIfHaPyARgA7wWDhGOT0Xs4d1lsej6fLNg7xSAk/okfwXL1dgB5gjGz4+f9FnF7uX8iGfPxnHqzv/I4fHQC1lhbh3ktXzR5zpryOk/AgSLJHlWCOSccsKWl6elbRspdPa3eKJ9539jb0ZjpkiOnpWfeYTiKW/odRGY6BN0t4DfN7Cp6E+yhcybf1FIwxXKxw+y2Mb9mKNtQvzGMLf1Sg9IA7bTBql/7iF2ebdxUKy62hblbbxHbDrEzQ56PAHkYIqPmVm5a4z7PqBcS7XdPV1S3tTI3FIGa95xYaews5k/MV9BL6KwoZJjvIQY2mhV6+NfO3lo7NfEVssvpmpnL6fjnz/4TIzBlJiGuVsOrql8Xz/3eLQ5BgUvKXzRJwspKOMxO0tgngEVLlrmnDgK1ai8aIXDZvpOZPVp4ljUKxH2K8kwYfC3GcbRcxtOZlgRKyk5NZopOgTUMTn+wk1cT4X3hX0SGJM1LzbW4Ospp5td8=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39850400004)(136003)(366004)(376002)(346002)(396003)(33656002)(5660300002)(26005)(4326008)(4743002)(122000001)(66946007)(38100700002)(55016002)(8936002)(8676002)(4744005)(66556008)(66476007)(9686003)(66446008)(6916009)(83380400001)(86362001)(53546011)(316002)(478600001)(76116006)(52536014)(6506007)(71200400001)(2906002)(7696005)(186003)(64756008);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 iPTP3NOc19dLDBWxnbFv5puE6+2w7SBkQ4rZtNGbuOai8JCysyAw5V7RDsGezh0XiSmjfcA1RQJxXvtW7NW6FwlU9Lkc8N821drctpnClsb1Wft80OMn5TdrQe1z/CrY092REkyTv5YCGg36GUJaWPN4K7qYNl75mO8rW5v9tgKzSG+bgURHxxXKKuhMnXJ3CP70SYoeY3wqKbeNn/emP7t+ZrN7WLJHVR0akFv6GWDrSQj6pEIsO1eIUK6Yc2EgxsdPAuIU78y3gCwRJKHl4XCbXAS7/FlNas/M8wcgPQP4Az4PDTMq7AckrNcoq/bsL2aCQnJqQ1rLplb9399RA+IGsa7PlBIjHRbIGPX9aG8SrBdjYJKUvaFAXkWsDvSLgw25iyg7o3yYsQFQTUqJb2j9/tv6CqaNJNfedX9bC3oiZUKnt01IlgpxjjpdHcdeK8l8Y7FBhb2F+5JhL+lLCp4mSZAR0kSL1sDBasWTfZ14lzKFzuTNm0bcbHbcNytLFvO8CyEcuPsa1Y6fXLrdCY8ZZlNNAeu8eY3cl3FxeNtrIwUahNkj+AlTIf8Uegp3etPAh2WQykQ5hIWkiqUqZxtenEBTA6/H4bic5bWHQ1xhPmc16nZxp0C1NVXa5khbl45RJ0Pg+Qk6JoA5MMgajppr5IYKAYmGYk0huf8sUfMuTdX+fmV14ugwLaw0SMRWyH/8Zo7vifvo/QAo/QLRrNzleB/G0MNtr+4kIiK7DGk=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3703
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	70381fb6-0b23-4a69-dcf6-08d91681f542
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	bdSvAI24sidzaTLXp3AE9O8rWVhwgNnZdPcK+bNPNkhIBYvWPr1jvxi/5ZajRYJMQfyDvNHRigeCtSIDBudRGkwExSOEJpOaDUfVUI8af9JI2fQ4i5hu3p8PhfFbOBqAGUH9fJjFVd359j3v8Gca/H2Dddz/i56QWLseceCyN3FMByTi7Dwm9s1v6EPTHFk9Fle0BNV7zzFTb/bWF1UKjcAyb9E5vbDuzNxhDsN9BwZ6qNZdT1eSHHquqLMRXsMofyF33W7SKRyyTOHpD5yQxEwItKwkVJ/eOipjaxJLhBGXjmCDoFswAlhf5iF45KAgiQDfixNy2tX67OiBy+O7nRPR9K+AlnwGOLpyJ6jQ8w9Ok3e87qD7SI4hhxFRNU3lh6WJm2lkg1TgwwZHz6Px23PYl20goOZ9BzEr8j24zsI/Ctl9sFLCIUKtOO/vuZigPn3ICgCMAc74gWI1bJ3V3tdv6j+XNWtULVfAzCnS9F3U7Y0sICDgeIt/uG3IwQsfPGlM3CquNAcyO95HkCbTTJ+epj1jSrKcX1nbKAHdNoKb/rF6DEJ/q2Zg0/bYyHK7/NJt7PE4nOrojaXyZOHf6AoTjJtL0rylZIxTfEzLda3NApU/cSo/qjl4EBoDhgpa2wOszPLaiUdSJVYLO/+ZEA==
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(136003)(396003)(376002)(346002)(39850400004)(36840700001)(46966006)(8936002)(55016002)(86362001)(336012)(53546011)(6506007)(8676002)(7696005)(81166007)(9686003)(33656002)(83380400001)(186003)(4744005)(2906002)(4326008)(6862004)(26005)(82310400003)(4743002)(70586007)(70206006)(52536014)(82740400003)(316002)(36860700001)(47076005)(356005)(478600001)(5660300002);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2021 02:42:54.0528
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 15c2081f-8595-4b20-332a-08d91681f970
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3383



> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Thursday, April 22, 2021 10:26 PM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,14/35] plat/ofw: Support completed ranges mapping
>
> Hi, Justin.
> This patch looks good to me. Since we support more than 1:1 mapping now, =
I
> think
> this comment (from "a/plat/drivers/ofw/fdt.c", line 267) can be removed:
>
> "/* Handle ranges property, currently only 1:1 mapping is supported */"
>
Okay, indeed

--
Cheers,
Justin (Jia He)


> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Fri May 14 04:55:37 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 04:55:37 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127223.239047 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhPrM-0001Yd-3W; Fri, 14 May 2021 04:55:36 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127223.239047; Fri, 14 May 2021 04:55:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhPrM-0001YW-0G; Fri, 14 May 2021 04:55:36 +0000
Received: by outflank-mailman (input) for mailman id 127223;
 Fri, 14 May 2021 04:55:34 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=h5sE=KJ=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lhPrK-0001YQ-FJ
 for minios-devel@lists.xen.org; Fri, 14 May 2021 04:55:34 +0000
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (unknown
 [40.107.20.86]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 70fb428e-4194-41e8-aeae-fa04b5b9a5eb;
 Fri, 14 May 2021 04:55:31 +0000 (UTC)
Received: from AM6P195CA0039.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:87::16)
 by AM0PR08MB3057.eurprd08.prod.outlook.com (2603:10a6:208:57::11) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Fri, 14 May
 2021 04:55:30 +0000
Received: from AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:209:87:cafe::d7) by AM6P195CA0039.outlook.office365.com
 (2603:10a6:209:87::16) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.50 via Frontend
 Transport; Fri, 14 May 2021 04:55:30 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 AM5EUR03FT039.mail.protection.outlook.com (10.152.17.185) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4129.25 via Frontend Transport; Fri, 14 May 2021 04:55:29 +0000
Received: ("Tessian outbound 8ca198b738d3:v91");
 Fri, 14 May 2021 04:55:28 +0000
Received: from 1203184aaeeb.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 CA7D9AAE-98E3-40B8-8EDA-0AE0EACB162B.1; 
 Fri, 14 May 2021 04:55:23 +0000
Received: from EUR03-AM5-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1203184aaeeb.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Fri, 14 May 2021 04:55:23 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AM6PR08MB3062.eurprd08.prod.outlook.com (2603:10a6:209:45::19)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Fri, 14 May
 2021 04:55:22 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.031; Fri, 14 May 2021
 04:55:21 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 70fb428e-4194-41e8-aeae-fa04b5b9a5eb
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=PYCY+bz94YAqDaFPqyTPS+E+kbdQYb1Y0y6N/WOPXHk=;
 b=11yMeqwC7cw6BmWd8wDuKL02yl8DPJraPKYvGmvbI2X+9zzf22t+tDKww46PbEW0vkxasUWu41j9Lv4jJkVGUEWoq+ZcYPQ/Ooi0nRNIZkehiWSH/gKARLlZmgDvSiDfy2sF/0Q5z4LDnAqGOkH4PlHHIyICoG6Vgg9SmwPt1XA=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=jeWgOXx948kGJ+eLR7GUXsU0gjIapY5k+xDxq5uyuQZeLAvCuybH1M3Qz8KIYHBD01vM2nhk7AQg+1+9+iE9pjDiVRIO30TMOrG3I/yNloH4EWWRFrqt1FxHbNGKkXd8KAxb8qDkrHMyM2eu28MLkVBUOYlCkbgjPbMgxPpxgVLfL3kJo6gez4poftCb8sxL3pS6LuH9XKiPnau7TlB7PS5Qx6E4Gy2xst/Fa42ALq2yQ+fDNtrpaqbDef4VNNDxuQ5m+9+rBO0QVrLOooOhoklm9rSj/a2RA3qAt3yTJKAVWOgnSxYQLR5iyA1AJ5yRGC0XxO4lTi5RJdChJ9RvuA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=PYCY+bz94YAqDaFPqyTPS+E+kbdQYb1Y0y6N/WOPXHk=;
 b=Ump0/kNudHoxh0NSZ9cygSIilRcYWZ2VtLZGXqYcBvcoRAaYitfknzqrh7tXiqAkkdxVMo5imNBfHL9Vgizf0jNbctkjU5jpkjdpUPjRkqJeCJDkHs9wqg4LPE79H2uxuz2OnJxxGLBDe1xH5ck4X4sVN1MeMj1anyxO1vPI2WRxBCZvZ1K3eILRMV8GFg/JcGBOX84Qh2zkSjm58gZn0ig7CYBYxO8dSakrR6LF5y86+yvJ6Hx6jK4Bwi9VwMw8b+hb3P1yo5kEA6GZzn6cIvwmgjyjSfg35mkio4y7yHpCJXHrrRckzeiraQMSFpho2+uzVjC/UF0AuKhvc2X49Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=PYCY+bz94YAqDaFPqyTPS+E+kbdQYb1Y0y6N/WOPXHk=;
 b=11yMeqwC7cw6BmWd8wDuKL02yl8DPJraPKYvGmvbI2X+9zzf22t+tDKww46PbEW0vkxasUWu41j9Lv4jJkVGUEWoq+ZcYPQ/Ooi0nRNIZkehiWSH/gKARLlZmgDvSiDfy2sF/0Q5z4LDnAqGOkH4PlHHIyICoG6Vgg9SmwPt1XA=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,15/35] lib/fdt: Fix fdt_address_cell and fdt_size_cell
Thread-Topic: [RFCv4,15/35] lib/fdt: Fix fdt_address_cell and fdt_size_cell
Thread-Index: AQHXJV2DI0d14f70wUKNSBmZfSx9TKrikqjg
Date: Fri, 14 May 2021 04:55:21 +0000
Message-ID:
 <AM6PR08MB4376D5BB7A2D38F51F628FC4F7509@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-16-justin.he@arm.com>
 <20210330120904.21033-1-razvanvirtan@gmail.com>
In-Reply-To: <20210330120904.21033-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 4EBA4C2F8A362B4897754E194E8DA257.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.113]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 505dc365-7b77-4611-00d4-08d916947ef9
x-ms-traffictypediagnostic: AM6PR08MB3062:|AM0PR08MB3057:
X-Microsoft-Antispam-PRVS:
	<AM0PR08MB3057471CA9EC913064582C2FF7509@AM0PR08MB3057.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:7691;OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 o6s9F37HhAWhKUb7bvdBjNedKUHWx9phqG5Ru3NeR45rEpiEZkIBESVNE9e3IEIa9tnHSgNWRPN8qF/b+iuNweO29OP+wYPq5EtRZB/Pu3yVn4yhCYwr2YTygwwycCf7i1A2N8IrjzhkC1i0Y5YDX6AI4dadqIApuPZsF6509rLx0D8U5mAA5qxM48j8cgYUuBwnbsjmx9vKzCz9gV4djUpsO1W7ZoACLdUmvu+eesg06RfT56+P7c2qCQ4kpIbumyf4cQzwd4C1s0mDs3lMUdvVIXyuWduafUR8/wtHzB6IhQITGi5Mv0EsntdWlo0BVX/QL1dFUEql85HT6p/91buCqMrqdyDcSyvDAiCdcPFrTmuaCBTc3YYPQXsRl2/UqBWuKy88K4nYa7ajn9cywSFakuLM315ozQaxZBjKKd05detu2Z2Iv3huam/VWjjB5np0AEkm8nfYFL8bcZGkGlh0jWLYVa3gEHFWCeCpqlZIS2jghf/WwP6J1OddnyQJzEO5HOHWrmz2FuTHQJWphVqgxXZtCqOL72225hCgGaVa9HQQCkSj9OTm+yblH3D5D3PzALESpyDFbxFC8vi7BABHQWToG2Xv9G+EdV5/kcw=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(346002)(396003)(376002)(39850400004)(366004)(6916009)(83380400001)(478600001)(66476007)(6506007)(66446008)(8676002)(38100700002)(26005)(9686003)(71200400001)(86362001)(4326008)(64756008)(5660300002)(66946007)(53546011)(76116006)(33656002)(55016002)(52536014)(316002)(2906002)(7696005)(186003)(122000001)(8936002)(66556008);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?08ecNZYmNHSJe/rJ/kjNVx3pGr5JB87xdv6NaKywPUIdapnrf8oPh4zl43ux?=
 =?us-ascii?Q?u9Tvggp6GRtI4FkubNY/20x3LaLmF6768bN++KnfkgvHIrubihX4+lzgvzPl?=
 =?us-ascii?Q?iwGLXYToYlOh18Om0hOSU7uL2NSIlQB8YfAkdQZFH399G9Ea7jhcihDXEI3k?=
 =?us-ascii?Q?Aj3YuUoIrYgFpxBUBezfKjAz7pRKhnufX5yUI5udYGHdcyyMumIeXKbYbYsS?=
 =?us-ascii?Q?9f2niBH4JkL/WGuESNsGlsx47lQtlCII3X/uWC/gQEIgjULce4ZgFPQQKs2n?=
 =?us-ascii?Q?IY4uTMn5CAOMg+qyp4CSDF8KmwMgTBn1SuG33klB2Zy6W2QGP5GR2E4pWG5s?=
 =?us-ascii?Q?q1hy8mpoIWQSSruKmZP02LiRtz4QdVslbB90zpeSXlolH8X3cqepemHiUQy2?=
 =?us-ascii?Q?ZndJQ+J2iyIjdfooOL6qzt8LEiCgkWb8SYBroq2DA1DcSIQ7sppH3qKuZVIj?=
 =?us-ascii?Q?IW1kIYvlYhmkSfArzHWplo4/02b0yDIdAfHZVgExhdDPSk3WbPPbWX4+T/3y?=
 =?us-ascii?Q?kjfs5fQNxqNv4oXi1LOGQNhB5zO/iUbRWPNj/3WqP5Fh4oBcwhhEap+Z4tRe?=
 =?us-ascii?Q?F3QaGY57uqv7veZbVo2ucIwpU4OQTS8C5rCQq0VCkD4G06PBULVqEHwmbqQO?=
 =?us-ascii?Q?VhA7G1+ohSOr6GYCitUoAreCXNqQFiRsb5Vmg/cEv8Y62muTpaBPhOBaQQrU?=
 =?us-ascii?Q?LakvcRpxXJmVFEbRANDj+jXuB/9mkA7GFSfuZMmnxYPb7gITT/gJeBBXQQ2a?=
 =?us-ascii?Q?pEAJZQLjU/t8XEapiexGXEdOqp3HoPdPRwpFqrUMUwuIRmURrOtXjW3mSg1c?=
 =?us-ascii?Q?FNfXIvNqlkOnFuI2fQnPJOXu9GWN0tqA3drrgtUBrcOXyDFMvebHoiZpbNQg?=
 =?us-ascii?Q?WeJqWI78NNVcU2fRZZWCzXiBvrPNZ3SeByfoANWlUO0Tb378GIRYMQDNTw1C?=
 =?us-ascii?Q?EY8aDw71w4xVjwnjd99vSTkCdRO3i25PFSVZ5uIlkTqED1UWLoKu8PbY1Zfz?=
 =?us-ascii?Q?CR5dvKc2v+NNTxmzkc1KNQG/zIZvlM+aM/8ZTWlMZ0eF9Ve5r0Fb8E9ASzmv?=
 =?us-ascii?Q?GmxHOXnGmmu5vpX9K6KhQXaiVL9YeT4mv8uOIlwdWn9QamCRcgn8u/MjZuL2?=
 =?us-ascii?Q?IdQb/MrApwrwhyDtIHvwaRtRE9hJYN5taZojCuvScSxmxOTUjKiGhPCIswiW?=
 =?us-ascii?Q?oFDrTlVbf9TwmZqNTOjJjvbP122ff42HCAh/Z0PERyCUw9oR0bIfgK1m7Dq4?=
 =?us-ascii?Q?N1hAr/QsgTcrj5SmHvJ1jHLHdybZiHVEYtDR1B2ZXugtDqb4kPA0G5EYUDFr?=
 =?us-ascii?Q?KvQmbl0MGkiVWklTdi3pfSuD?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3062
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	3cd3e89c-17b7-4610-d672-08d916947abd
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	CgWPlQ0TqZ3ba6EsR3ebxXc398HBmlE3KrpP68ZqsTA983GCKwXVVh1o+9zJeNWDdykNsryVKtyqvEPeWUr2tGEtDMEOfW9zwgCYh3S0ytuulaZXwo1K46AXgcYR+pzkiezWs/aCXqhMgPQnU/+v7q+WI8dqU1wLV1+NgWvzND2LePB/Lpupkd0lAfIisLHmK5Abv5VRJoy3lkqJE7fT8mIjlaKuFRVO2udrGk/7Lh6sfjLaGG74l26VjeXCAw/GLB4YMe6YRNGGKouAuOTDcYp4kzsg5kL+BK+IBKbsgOhXwf9269UlF5TR5NdlSfbFrdcTXKpmyWP9F77SIp6ImDssG09WBEDEVdH78P94g4Dgp8INH0i7puJWy6pwIE74cBCq5ZT7zgOpeFC47sqnh319A6lNadGxXBJKHbxTncCd5ux97g7w+6ko9t3T5MSE8Vyu5h5ohoUPRWpj4SzFsihdPWWogdmQHe2bgilJEjEVAWIqi5By8YQvJvSRJlFDAm7FZ8mRQmFHhRVHaxK9N8swTuoiRskSXn1eg9rY46shPHtheC7G1dCaOnwLVTzT/cTNJ52CP8SqipE81OqRGcY0FgXT8cEhGXpG+i5Ame7mRxGeAT3Ex7WT3DN3smAjb3KARnLX2YhIBXZYkTIccg==
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(396003)(136003)(39850400004)(346002)(376002)(46966006)(36840700001)(9686003)(83380400001)(356005)(55016002)(33656002)(4326008)(6862004)(70206006)(478600001)(2906002)(53546011)(8936002)(186003)(47076005)(8676002)(6506007)(316002)(336012)(81166007)(26005)(36860700001)(82740400003)(82310400003)(5660300002)(86362001)(70586007)(52536014)(7696005);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2021 04:55:29.0355
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 505dc365-7b77-4611-00d4-08d916947ef9
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3057

Hi Razvan

> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Tuesday, March 30, 2021 8:09 PM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,15/35] lib/fdt: Fix fdt_address_cell and fdt_size_cel=
l
>
> In the "fdt_address_cell()" description from "libfdt.h", it is specified
> that
> this function should return "-FDT_ERR_BADNCELLS, if the node has a badly
> formatted
> or invalid  #address-cells property" (similarly for "fdt_size_cells()").
>

Okay, will add the error case before returning the value.
--
Cheers,
Justin (Jia He)



> Therefore, shouldn't we keep the following checks:
>
> ```if (len !=3D sizeof(*prop))
>       return -FDT_ERR_BADNCELLS;```
>
> and
>
> ```int val =3D fdt32_to_cpu(*prop);
>       if ((val <=3D 0) || (val > FDT_MAX_NCELLS))
>               return -FDT_ERR_BADNCELLS;```
>
> before returning the actual value (or update the description in "libfdt.h=
")?
>
> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Fri May 14 06:23:16 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 06:23:16 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127228.239062 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhRE7-0001p4-K1; Fri, 14 May 2021 06:23:11 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127228.239062; Fri, 14 May 2021 06:23:11 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhRE7-0001ox-Gg; Fri, 14 May 2021 06:23:11 +0000
Received: by outflank-mailman (input) for mailman id 127228;
 Fri, 14 May 2021 06:23:10 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=h5sE=KJ=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lhRE6-0001oe-7A
 for minios-devel@lists.xen.org; Fri, 14 May 2021 06:23:10 +0000
Received: from FRA01-MR2-obe.outbound.protection.outlook.com (unknown
 [40.107.9.78]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 611a4544-d044-4174-ba89-623bf9f37a42;
 Fri, 14 May 2021 06:23:08 +0000 (UTC)
Received: from AS8PR05CA0014.eurprd05.prod.outlook.com (2603:10a6:20b:311::19)
 by PR2PR08MB4697.eurprd08.prod.outlook.com (2603:10a6:101:18::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Fri, 14 May
 2021 06:23:02 +0000
Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:20b:311:cafe::fc) by AS8PR05CA0014.outlook.office365.com
 (2603:10a6:20b:311::19) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend
 Transport; Fri, 14 May 2021 06:23:02 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4129.25 via Frontend Transport; Fri, 14 May 2021 06:23:02 +0000
Received: ("Tessian outbound 52fcc5bd9d3a:v91");
 Fri, 14 May 2021 06:23:01 +0000
Received: from cc0da40e342e.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 499EDBCC-4EE5-4DD7-953D-4A877484F5DD.1; 
 Fri, 14 May 2021 06:22:55 +0000
Received: from EUR02-HE1-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cc0da40e342e.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Fri, 14 May 2021 06:22:55 +0000
Received: from AM0PR08MB4370.eurprd08.prod.outlook.com (2603:10a6:208:148::20)
 by AM8PR08MB5555.eurprd08.prod.outlook.com (2603:10a6:20b:1d9::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Fri, 14 May
 2021 06:22:54 +0000
Received: from AM0PR08MB4370.eurprd08.prod.outlook.com
 ([fe80::65aa:9f2:ae8b:8e50]) by AM0PR08MB4370.eurprd08.prod.outlook.com
 ([fe80::65aa:9f2:ae8b:8e50%7]) with mapi id 15.20.4129.026; Fri, 14 May 2021
 06:22:54 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 611a4544-d044-4174-ba89-623bf9f37a42
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=NL5Rr9O7tv3UIoTEjrEY6AZOeqKl6FexkuwiPJsnZhE=;
 b=EMQsOT3u1KyfbF1px71T9w6Fa/quBTo+kTgSLZNQXyhFw4jFlQJ57pZsoUBXaCerswD6SYivSpWpQ0mBjbXg+hXfkoMU0pLN+8Qg6/E3aRjrOQdicxfJBg4wXyRydTYhbh7zN377bU4M5I6wNplmhsnirigCn0GaEAri1aZh+nY=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=D+x+PMt7mbugnEHl5ucbpgzap2/TWIsW0EU17xK035Yt2NrsnlOwyiFfUPMqdAZJZYOd4DjYeknlhbeY+gLlZeW2MOH/0WgbC68ATSe/Xx1Rd/XCcwUU8eo99oHWSptgLOL4B3tN+06z/NtxdN2NCNdTDGUCiSuO5tnatSa9+mzoTErd/metYZ+PNdoa9asEL+Jsb4hURCKmAglCwSGAwCRS4bKmRVPC8cQFGg+hVpgjYLHU70vFfGw/kikTkzLWyIbaCVXTeDjr+0Jv0fwyyHCZNSvaRCE4ykQ/ZmljtB3Nqf/AOWz+WmH8PzzHZzdke/slMSAUYops3Fua2GMVfA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=NL5Rr9O7tv3UIoTEjrEY6AZOeqKl6FexkuwiPJsnZhE=;
 b=VoBPlnO0N9M5sCxwzIb/sQH6pUoXnOQGjp48K6CFm5jGdXAzkCPZJ777RCdqhUF1Y7Fq9i6ib4JJ8RHjovhs1i4FQAuYJ9LUTpMxJSjaBnba0nCfAzEiA7R9TzxjyKoUwYCz2VnJ5B6H6E8XoXzsvv6IkZ2HIaoHcm5LhFoD3V5nx1U6OZigpGKAFUai62uZgag9C8iB5t5aN6rC6jfL30na9D7Qb1SfepfYPnfwxQt4cngAa34P6NKWRpghFkTsWgYCk3LMb5Rs6tYTWa7WkKhEAFUh5wE3hMNHcloOT9G+02+uygK7/OK7rCk4ySriLGGjv6vv15f9xi4U1b/aEw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=NL5Rr9O7tv3UIoTEjrEY6AZOeqKl6FexkuwiPJsnZhE=;
 b=EMQsOT3u1KyfbF1px71T9w6Fa/quBTo+kTgSLZNQXyhFw4jFlQJ57pZsoUBXaCerswD6SYivSpWpQ0mBjbXg+hXfkoMU0pLN+8Qg6/E3aRjrOQdicxfJBg4wXyRydTYhbh7zN377bU4M5I6wNplmhsnirigCn0GaEAri1aZh+nY=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64
Thread-Topic: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64
Thread-Index: AQHXIYEtLGKtjDHWKUad6KkAewbSNKrixpPw
Date: Fri, 14 May 2021 06:22:53 +0000
Message-ID:
 <AM0PR08MB437008613E9C732AC83FEEC5F7509@AM0PR08MB4370.eurprd08.prod.outlook.com>
References: <20201223073857.118076-27-justin.he@arm.com>
 <20210325141411.21561-1-razvanvirtan@gmail.com>
In-Reply-To: <20210325141411.21561-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 5D5C9FF0843DCB44A1050C093E20AE14.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.111]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 67047059-150c-435f-e600-08d916a0ba05
x-ms-traffictypediagnostic: AM8PR08MB5555:|PR2PR08MB4697:
X-Microsoft-Antispam-PRVS:
	<PR2PR08MB46974145174F3FD5529EC086F7509@PR2PR08MB4697.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 EjFZ8FXwmxpeg+8Semkat8yH93DoJ3cWHjBjvCzbzgbu/h5sSMaJvxicFWK0a7PN+dBp3n2F/2AIXRr8xvo8FSHZI2JSqoowiLZDKkiUt+JjpNn2BmYbPIb0U6fWArFj5jIOmzhzkI7OfCUUW4d//HNkKQogLjxTPqMasN3JI6YuBeY6a0kVCLGNOgiH/v7wZmGbhj+JkJ3moInICPwdlgPKbsBxZ1E92KJ7lshfJZ3n6JV2CJMQvU/dHdBvLfBXjM8fkNb8BcYl4wBfEoEHydCqwJQ4QmHu4rb0fgqJVVoOXEBXGoUKJSGOsS88t9nP5LgETPcy8Cod/GTbIDr0DfaDR6R0Z6pU/s5GWoDbrztkoaZW6oYsLGAXtdLFYN0EUxnZ8ic6jdvfdL/ea8kns9CqfFVeVdvJ0+jiUqFKtP/aYuo9y8Coyg9Gjh+iqZ+FX6FFEIVQUX3JXfJvbwMDrhVkz4M12uUXRwvAFDjJ1iIMf4WX7YFNQYEzu6UPM8Gf4jnFlOmZtmSOwpnkW/sbo0Ajk4UASKupnYpXtQBTEC6+bauh5G45Z285lElyxIPS0hBAO3opMCzWiidwSEiZgtl1D2uW/if5IkiMpx1wbhA=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR08MB4370.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(39860400002)(366004)(376002)(136003)(396003)(478600001)(7696005)(52536014)(33656002)(86362001)(64756008)(5660300002)(4326008)(76116006)(6506007)(66946007)(66556008)(8676002)(53546011)(316002)(6916009)(71200400001)(8936002)(66476007)(122000001)(83380400001)(38100700002)(186003)(2906002)(55016002)(26005)(9686003)(66446008);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?mE9Bu0S0LL0mAanE89ORzqwx8bbmQLKfWAD5v9yPO7OfJ/Ipfv5lSOiByqFZ?=
 =?us-ascii?Q?18aCWfuwfbYiR5Dh3udS70X06YGCadwkDxjUSXz1FNQhbxpNL1g8QdW44Iax?=
 =?us-ascii?Q?Qsu3n4Vjk+lA/KbrOWIjQ/G2EenSu2IiVqxA5JegI1u0i7ec24CuFkrNmR3b?=
 =?us-ascii?Q?ugh2DKqPlUmtgd9wq0h+6gJu8YPwgS4z06YxEdeR7YcihrGrIxsKKjlbPu4M?=
 =?us-ascii?Q?4FIKx4H92nX3s/5E9RPNQAEyKOmAXYvjJmmrSPalhX6D0O72OsWGqYQqMTRo?=
 =?us-ascii?Q?j31YKfcGXmvBDeiiHJMKYeowjx9Udqs9cYROJZiRDSX4TrOTFi7XgJLtXw9D?=
 =?us-ascii?Q?eBO/IdvyHwA6zmzMOO3Np8jLeU6ocW62xIYXzwaeN/AyfSlaCMXZiHtFJLq/?=
 =?us-ascii?Q?XJkb3gPL4j/8VeAB54vxmfW1kzE/FNzaMNtSEpWxXHMm2fiRvENLfPCEVkdN?=
 =?us-ascii?Q?/g0gk4p6ND2se48ZBrt9FhHN7qqjsJ+8b6Y5hcdN4saLeYThpWz+gw7gb2Oj?=
 =?us-ascii?Q?HWDbK6e/x0F0md8R3ucpqoY5zFEU9Lo3dhQJ19FODUzfF9woV1gvdpm1gC71?=
 =?us-ascii?Q?5JUwcX5p3qdicG3H4ri9tzg9mfrWJrFBMGZBrrR9u6NRdHjB6IzvDhTh97gJ?=
 =?us-ascii?Q?ye/3Xv998PRqM16T4HmRfF6isoqypQSxfVrnYN61N5agW8bFTSCBZfFzvKPk?=
 =?us-ascii?Q?JZzOHEDYg/37Ga9xfJSKCQLJiHM4MeKI6GT+L92RVbGtMsRlZf9GXRbflJf+?=
 =?us-ascii?Q?xI8dYbC2sD1bAmqln+siLaU+LMd1y0+fwe+hFV91JNRlhXb0HmAXu60uVEvG?=
 =?us-ascii?Q?xgZ9CvwHYoRXI+B4RbGY1E/LyDHuviz7gPrkvH8PXkhvdZTKndVi+SkhDF+2?=
 =?us-ascii?Q?KMDE/auPr+oiNluJ+sgBt3+/ptWVdFX8SJ1ATKsAmES7OoyWdsz+RO6OsnS0?=
 =?us-ascii?Q?bO+dgmNM8/4hy3Q/3R1tcVoBbbXNPbJJphW2q6Vp/tE2FudqCeoZm/HwhziO?=
 =?us-ascii?Q?T2Sn/miel9w29KQtiyJXA0UuBc2vYg7wQb1UX5uqJbyHB/Ksh2qG5ZxciJFa?=
 =?us-ascii?Q?qb4Z1VXxWFlCIgNykm2dwwx5lMP4XuRhTJxLqYz7ckxGO2S4S3s/AkWw82O5?=
 =?us-ascii?Q?Juvy8pW1IfndXDAT6707WWTOObpYkhmwPN10T4q+4WHYCCv+RS8GuygVZrgb?=
 =?us-ascii?Q?FJhFVuykPVdeCHG8vYovvKMPk7RovQQCcFNjZ7vUyjLcDUU8APITuJv1OtoV?=
 =?us-ascii?Q?bnnIjRoWXLRTmly0EN3KUahs0eRusZ0tKRl6KkO1sRFtXyct4I4CcLZcXdQA?=
 =?us-ascii?Q?unj0A+ZASBO+mSDvk7wTWGHE?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5555
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	995f29f1-acc7-4791-8ac6-08d916a0b530
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	ld/RBz+3vr/DL0KIMTr5n78+PzsIR0ZgwOPWlOrdeuLr3FCyGjo+9QZz00MvADlGj+xEx1g4kOvOPhqJ5gJ+J59Xnw2ZB0a1SjbVATUNn3RTF32HAJBAyBFRyUsxhAyZCDhvhdI8qcsqjc4yrKbSnX7q9eaYn87Z2IoJxXOeAtWOGr5uUecrswQhBdKYBgBJ5kl3eE+7f4gDaCtaCRNcnoAkFFk1rzJH2/yHWvNhi6+pOB7EgtOtOCGnCfqcJED0HesmGlBI5lcVuNCtN7zvLd55ihtWuYYZi6Ooo0ptz7KNbiElVINuN2J3UTJxjdO5cVI35BAlafi/lb1c2CjXeDF7cV54M0ANKagcbLCZRtekRhEFB4PVzZ4IUOFOXFnTtTufyGJYlgYdl4gLVbvHAUaWXBsS4cZXukH8cz1aAHpoya5CdSbZ1HQVBK4PlogaqVnFliR7H394zXjrzsWAEPLl+ig5v+MEeG6e9G+eaZKomv+mF+daFwhUBoBJTRO76QOvL5EeKndMycL7ItcMh0Q5nOIgeHL2v1wOxN2h7STmmJ6ilr4Jri8hLBUmd90jToGrMnqoVtqNWFTuuhXD9fgHjghNqx5L4wmAlEG9dKl0QTxOmWxL95gen1/tUr32vN+DDN9vBfm0cu9dzYBleyjCsv7Hk7UMDfl+24P+Uqo=
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(376002)(396003)(136003)(39860400002)(346002)(36840700001)(46966006)(5660300002)(8936002)(86362001)(2906002)(478600001)(336012)(52536014)(186003)(6506007)(70586007)(53546011)(6862004)(8676002)(7696005)(36860700001)(26005)(47076005)(83380400001)(82310400003)(316002)(356005)(33656002)(81166007)(70206006)(55016002)(9686003)(4326008)(82740400003);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2021 06:23:02.0663
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 67047059-150c-435f-e600-08d916a0ba05
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4697

Hi Razvan

> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Thursday, March 25, 2021 10:14 PM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64
>
> Hi, Justin.
> What is the purpose of the inline assembly part from the read barrier
> __iormb()?
> I understand that the "memory" clobber acts as a compiler memory barrier,
> but I
> couldn't get the role of the actual assembly code.
> Also, don't we need a "memory" clobber for __iowmb() too?
>
> +#define __iormb(v)                                                   \
> +({                                                                   \
> +     unsigned long tmp;                                              \
> +     dmb(oshld);                                                     \
> +                                                                     \
> +     asm volatile("eor       %0, %1, %1\n"                           \
> +                  "cbnz      %0, ."                                  \
> +                  : "=3Dr" (tmp) : "r" ((unsigned long)(v))            \
> +                  : "memory");                                       \
> +})
> +
> +#define __iowmb()            dmb(oshst)
>
Here, it created a dummy control dependency. Given that there is
no devices on Arm now using udelay() btw 2 mmio writes.
This seems to be not necessary.
I will drop this patch


--
Cheers,
Justin (Jia He)


IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Fri May 14 07:13:57 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 07:13:57 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127241.239097 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhS1C-0007Nt-R5; Fri, 14 May 2021 07:13:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127241.239097; Fri, 14 May 2021 07:13:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhS1C-0007Nm-O9; Fri, 14 May 2021 07:13:54 +0000
Received: by outflank-mailman (input) for mailman id 127241;
 Fri, 14 May 2021 07:13:53 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=h5sE=KJ=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1lhS1B-0007Ng-4G
 for minios-devel@lists.xen.org; Fri, 14 May 2021 07:13:53 +0000
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (unknown
 [40.107.20.55]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 1a5969de-9711-4a20-a28e-3e7290890dd8;
 Fri, 14 May 2021 07:13:49 +0000 (UTC)
Received: from AM7PR03CA0028.eurprd03.prod.outlook.com (2603:10a6:20b:130::38)
 by VI1PR08MB3760.eurprd08.prod.outlook.com (2603:10a6:803:c1::27)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Fri, 14 May
 2021 07:13:48 +0000
Received: from AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:20b:130:cafe::f3) by AM7PR03CA0028.outlook.office365.com
 (2603:10a6:20b:130::38) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend
 Transport; Fri, 14 May 2021 07:13:48 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 AM5EUR03FT019.mail.protection.outlook.com (10.152.16.104) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4129.25 via Frontend Transport; Fri, 14 May 2021 07:13:47 +0000
Received: ("Tessian outbound 13cdc29c30b8:v91");
 Fri, 14 May 2021 07:13:47 +0000
Received: from afbcd63d2692.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 B073FF52-1930-4A00-A78C-A1785595BBC7.1; 
 Fri, 14 May 2021 07:13:41 +0000
Received: from EUR02-AM5-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id afbcd63d2692.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Fri, 14 May 2021 07:13:41 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AS8PR08MB6598.eurprd08.prod.outlook.com (2603:10a6:20b:336::7)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Fri, 14 May
 2021 07:13:40 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4108.036; Fri, 14 May 2021
 07:13:40 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 1a5969de-9711-4a20-a28e-3e7290890dd8
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=NL5Rr9O7tv3UIoTEjrEY6AZOeqKl6FexkuwiPJsnZhE=;
 b=sCudDXbsABFCy6bHoN2gwWH2DNn93OuV5s+ScycBEY/OxRutEW/BwU9fVprhWpGOvj45k3puKcBXkxa+rhQENk5qVx2eegy0GAYRqZCKA7zfDk2SYKIgsyKEirVJ/dPArxrUgZ3QhbfBzs7n8OdglwukrIF+If1PoAezSMG5XcQ=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=akVsiaMZd4RhsTwSIBFMzbQ1DbLxKmeuZ+GuE5oXOLRtcduoiHHIPKItX031b32X+rLNPu31Tjr7Sr2RLuZXXNyCPYp1Ir3Md5M9WGr7WAmvxegRxrxsSLq9wyNuzRXfoyUSQZPXszEmn8tlHYkhF3Afgxd6Bje76UP9ig4Z9zYvdu2zxiSouhh6S4GciaRFOLn6YTP6VDdL4AQI+sGJZgsHVN6oFTImzsju9MQ9Gvbw/lm9fq86363EmjxVDI36/i2+xM+7pB+38A7E5TQ0ikNEy0K1xy6jSLKsstPtk5HAOjDf4i8DyMwoW6jijDgVP0TSSLzTlF7PjzUy7EOiAQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=NL5Rr9O7tv3UIoTEjrEY6AZOeqKl6FexkuwiPJsnZhE=;
 b=cs9NRRSUBP7E+7vjS3wmWQVstlG6z+c3dM2qxdPYHgz/rpS876spQQjHOpLH9nt9vINYVsJtIxoPo4o23C4GxedpaJSqWGLKbWejWKaKCfarG6Lo9dZOMvCRwiPIUTUFDmE/I5zQ5c0iZrYpPLezrfBWQZZOcPbOcXcltqqeWWgzfCJM5J4kBBCWTrsLTLpq056W5zq211oDl6WJtUbLZlnp6f8wfV3MAgIAkuadnN69pXF3Tk+Wx1YCbj4301e2XztQXob7cH5MJbpyDWN/v9npbY7+cwawInoMEONuQjA9s/Mnou0FMDhryuKsE2JRnIZdrPZ3PqreNNZi8xFNiw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=NL5Rr9O7tv3UIoTEjrEY6AZOeqKl6FexkuwiPJsnZhE=;
 b=sCudDXbsABFCy6bHoN2gwWH2DNn93OuV5s+ScycBEY/OxRutEW/BwU9fVprhWpGOvj45k3puKcBXkxa+rhQENk5qVx2eegy0GAYRqZCKA7zfDk2SYKIgsyKEirVJ/dPArxrUgZ3QhbfBzs7n8OdglwukrIF+If1PoAezSMG5XcQ=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64
Thread-Topic: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64
Thread-Index: AQHXIYEtLGKtjDHWKUad6KkAewbSNKrixpPw
Date: Fri, 14 May 2021 07:13:40 +0000
Message-ID:
 <AM6PR08MB43761D7D1000E4EE64423D12F7509@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-27-justin.he@arm.com>
 <20210325141411.21561-1-razvanvirtan@gmail.com>
In-Reply-To: <20210325141411.21561-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 5D5C9FF0843DCB44A1050C093E20AE14.1
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.111]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 1839d9a1-c885-40ad-00ee-08d916a7d163
x-ms-traffictypediagnostic: AS8PR08MB6598:|VI1PR08MB3760:
X-Microsoft-Antispam-PRVS:
	<VI1PR08MB376009352EF6C6EB80A77B4CF7509@VI1PR08MB3760.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 tdhBpLgXE9mNno8ONG0odOvk59zr08gQfoVD3N2jmqwGIfVV93zpRYioRClf445C0uKzqg6dIvu3JIRKb72fCyBsu8Jc6dIMF2AgYFrUM3k/9glo1DF6ube33wrtZHrN7Ew1t8rmuvHoSEiVNQidsT6UEDF/Jzqc4sx1MzWvjn1V310ucP4hpH7TDhw9t4iUGln8e2+jTMSh2l7xvqtjVm97tVgsSzr/QRe/sAG87o8gRGcc6ihXyg4bd9svl4Dd8Qaq6F4Et0NmYOnhXIjVIs/Sp/IyIGrgvGfkB/hHd7drwOBIm38N43ERO9X5BWWBSTuEZZVuA6ujhO/EyN5WxiF2dSYFopOuw5W3Gc9tWiHORc0w+qp+r09hVEJzPfSxVNo6zmVSNTEwg4XNS/z5YdSQNj0YI0GPFbQzKHrTAQ0ap4psV8nqrH+a+d1BLaLd9ZeDD+XBR7g1+YyIcaA4Gb8sDmglc7Woz3ILHbyTf+V7Ql5MmeXRGQN1YmGRZUvqELbYcHhX+QTjGcxUn//iMkuWEKUamoL68PH11FA8D3S5riC3A1IwAxF/zZ2AAiMyGeC4G8foiMtaPs8VvDhgNQbepP/ImxEtNNdau+N9wtU=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(366004)(39860400002)(396003)(376002)(346002)(478600001)(86362001)(9686003)(186003)(64756008)(66556008)(66946007)(66476007)(66446008)(26005)(76116006)(5660300002)(52536014)(53546011)(33656002)(7696005)(71200400001)(122000001)(38100700002)(6916009)(4326008)(8676002)(2906002)(8936002)(6506007)(55016002)(83380400001)(316002);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?i1wsxPb8h3Sb1zp9kvcJW3KZDf6U5O+MA5/khNcvqHhiGlz68yN9f8dtFp7v?=
 =?us-ascii?Q?J6TGD6M6UEAwXGxCwwB4GfAs4wcA2xxOwdladdnupxANdajgwmt7JawEIif9?=
 =?us-ascii?Q?wn4pNuYtYOLJ8q2WdbEXgY1c5dzdD9iW/73GpUUFvXHOzNFOlV//xzmvKwd+?=
 =?us-ascii?Q?ePnGG6BLCicN8VDlDzvWzrGKshitNgzNecqKL5n3FleW48nwkw61BTdYsozq?=
 =?us-ascii?Q?gZpo1N5oBnqRMeBJJethU+7A0KqVbfflDZw96TvPBEOKZp+smMzfG0rrMzbt?=
 =?us-ascii?Q?F4oRRF/YWPDDqblNlLaGV1QeVnt83jG/R1J4IOgpdvxbh7dwHNCWOT1Lr63K?=
 =?us-ascii?Q?TaXbfE3BxxCRptwOntV5K7Vaq8TJTWC7jeZTsfeTURrQxyPWU8Sx0BLTSB8i?=
 =?us-ascii?Q?6TX9ux92QSqTMP7ytXsqxr6uhLBtnAUrtNvEWq2cwcM3lf30SIraibqvkQHg?=
 =?us-ascii?Q?sfKlbq9aXG48Q9ggZ/twO11cnZGYlFpDI43gzpTC6UddFM9jTgvBKOhXIqiJ?=
 =?us-ascii?Q?8gD3ORfVgGr+uo2x6IUl5WkrA3DhG6s7RAoEexjg6r/0K5UVpSPHYHPXQcOH?=
 =?us-ascii?Q?txuqMaDL4OrLxyEvOBwmpOLF5Zj6COhCYHP3VX9ktBVktA0TYVuCz5CLZSTy?=
 =?us-ascii?Q?qnP6ft/zD3CyMdr6zcYC9HY8Msi0xOepn+q3OANFkMoeIPOsxKWQyhtMUrn8?=
 =?us-ascii?Q?UeOa7vzaGHmtXxX7Kut+ULAYEUHW9FRBPt6A6dsmiynrzs2kNqonl71aZBc0?=
 =?us-ascii?Q?tTi/3EGnhkLlvnrlV59BGv9YzzngsvK2p9GoIL4I7EY0A7CAu3fhJWBrVr51?=
 =?us-ascii?Q?NOtuKOc8A3lL2H1MgPbmPcE2DJNfWAkQjS2jkMoXgbV1ElvsfaS33dC18RVw?=
 =?us-ascii?Q?bK+yo/bI9Of7Da04SLcBAgcDjGTov2WCcrSAluHgOlNHWotBSLbDyt/t5RIk?=
 =?us-ascii?Q?UbjlUxqqLq+FSsiCceUwz5IKHDagxaupE0UYyiTgRdZGXzs4X6F+TWiaQE84?=
 =?us-ascii?Q?09wEA0EfssAKT21naAXbwGpcOUGS06uRD0EgxSJANZlKBgKczKOjwMZGZisv?=
 =?us-ascii?Q?5ttqk1YOztIbSe3nFr3GPpgkSrpaaJ0uuKF21pfew909MkBW0fBPURgfvBHF?=
 =?us-ascii?Q?+ulQCEJszwaaiGxsIpKe69pSNpJLgm4qjQ8Bj2rkZ0KRDQfpmGcwi4tpmcAh?=
 =?us-ascii?Q?G9bN2WTau2HD2WHa2lsOzTlPrI9dt7nLv/thdXqUH4j23fsf+MQgsMBLsLun?=
 =?us-ascii?Q?xBM7IINWlYNmMPpfaJIivrSWFYp57o+k4guBxuUYengHf4x6L3KcmxGva7sd?=
 =?us-ascii?Q?Le3cEoizBAtOx4bhozLLgupV?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6598
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	ed693d16-0810-48b2-3c70-08d916a7cd0d
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	jX+r9mItfOde+g7G0vSZtbK0HZwD4WI0GuMBCuTOAZg6R91mFYbLAIp++rASgVEka85e0tCyMEZvSA3KVrL224bYW1+ceNpULQozY9XWU9iXUYCGDiORZmaw0F2ukD2ICPTPUo1DjGoFu3U/JjaHpfNIG5dGuYArl/SdgLW/ahXlRNVDu82vYTJOOsQuzcqJQmgmRcvp2aCcgtLLcQ6Vfyh/YL7ROh9GzhDYxU4fOWzI2MhhoiYFMu3Q80NYqSqJECokRiQnoasZ/2wmqrBWsNA//Szc29H5DGcfZUVAqObAWpf92e6L/37d5rY2KHLRZS2w/62lBXeFe/MMPNwcTmePNqon+60qY5OOUqQFzv1GH1wGudDKBzX2pxYXHM4TYcRNvtk2g+Po3kN8jTh3NVRYtVd2gNhJ5eDdBLgy9fx36X3LvPuqsLwRdoWCGu/rT1XC8qw029+gIahoHJ6mR9i0i3GRRm1+/wGSC7psPgX6o5rKerldd9PlazizxuJKSR3n3g0fsHSyjAGbdRCE76g8NhAJiIfFDJQfJhYXDSQvshUYIGsdFi+riQhQC38Hmq/KxULsG7bN7+xCKLkyH5iPP9OcI00W6TuqUFBz86i6vVBl5IHNFDsihBIIf+nydcDj9yHSkajntfpKOTK48j9VfsFZA3UiyVMjbpPaEF8=
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(136003)(346002)(396003)(39860400002)(376002)(36840700001)(46966006)(82740400003)(47076005)(356005)(83380400001)(36860700001)(33656002)(86362001)(8936002)(6506007)(82310400003)(53546011)(8676002)(81166007)(26005)(7696005)(186003)(2906002)(9686003)(55016002)(336012)(52536014)(478600001)(70206006)(316002)(70586007)(6862004)(5660300002)(4326008);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2021 07:13:47.7362
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 1839d9a1-c885-40ad-00ee-08d916a7d163
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3760

Hi Razvan

> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Thursday, March 25, 2021 10:14 PM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64
>
> Hi, Justin.
> What is the purpose of the inline assembly part from the read barrier
> __iormb()?
> I understand that the "memory" clobber acts as a compiler memory barrier,
> but I
> couldn't get the role of the actual assembly code.
> Also, don't we need a "memory" clobber for __iowmb() too?
>
> +#define __iormb(v)                                                   \
> +({                                                                   \
> +     unsigned long tmp;                                              \
> +     dmb(oshld);                                                     \
> +                                                                     \
> +     asm volatile("eor       %0, %1, %1\n"                           \
> +                  "cbnz      %0, ."                                  \
> +                  : "=3Dr" (tmp) : "r" ((unsigned long)(v))            \
> +                  : "memory");                                       \
> +})
> +
> +#define __iowmb()            dmb(oshst)
>
Here, it created a dummy control dependency. Given that there is
no devices on Arm now using udelay() btw 2 mmio writes.
This seems to be not necessary.
I will drop this patch


--
Cheers,
Justin (Jia He)


IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Fri May 14 07:39:32 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 07:39:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127242.239101 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhSPx-0000pA-ON; Fri, 14 May 2021 07:39:29 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127242.239101; Fri, 14 May 2021 07:39:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhSPx-0000p3-LS; Fri, 14 May 2021 07:39:29 +0000
Received: by outflank-mailman (input) for mailman id 127242;
 Fri, 14 May 2021 07:39:28 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=I74N=KJ=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lhSPw-0000ox-2F
 for minios-devel@lists.xen.org; Fri, 14 May 2021 07:39:28 +0000
Received: from mail-ej1-x636.google.com (unknown [2a00:1450:4864:20::636])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ae5ecbdc-ad1c-40e5-b5a5-e2fa6ec262a3;
 Fri, 14 May 2021 07:39:27 +0000 (UTC)
Received: by mail-ej1-x636.google.com with SMTP id c20so7974295ejm.3
 for <minios-devel@lists.xen.org>; Fri, 14 May 2021 00:39:27 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:947a:ddb7:2f4:df4])
 by smtp.gmail.com with ESMTPSA id k22sm3129569eja.33.2021.05.14.00.39.25
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 14 May 2021 00:39:26 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: ae5ecbdc-ad1c-40e5-b5a5-e2fa6ec262a3
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=FCirzeBrq8rEGHK/MG+HrBs0Io5LjkTcsB6qf6gJjfKYUmCgUjebNhJZbcYMpRq+yc
         Tmct1x74GM+WLYImDK9arX9jfLmNiwROo7FLc4/F4X5YFjAlymWQ7f4cdAGNXg1pUq1n
         TevO9UiC+0XIKGtLguLP55Y7qagLyS+wo8yAwUYftA9VXwLS3YooEFkOfX05Yd1QMsh0
         iH2V6tkjNE+GZRqXcA5Md+NZVEbkqV4zAkSYE51Qf8gLnm3gW55KNbh5EVhehfO3d5bA
         SZNrdOiRSz7vDPblZ1Dr6M6P9BdpiPwc9FI5572XK+HfiO8HdibSsiVn7MuM1muYE1Cu
         vZtA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=cNV5dk9Bua7NDaBpsc6EZfDSlgbpapAtkNScqp9tpdQCoMBTOwakdmRJbbVjxorgap
         IDZg7Ps7CzqbaGopN27HtgJAHLwNNttLfPK0G0BuRLyTo/oI2ViO6yUHr/P6Z7H53YfF
         FeWQToDtG4E/UfCYKtIP86hkpJfPIlsg9qSBrlXVWUABa1BCuD4X+xUDdLEYxZRSl7v5
         6Hww+IDUpubphN5lN6mtJT4i/Hb9kFYFNTw3FfVTvOVogz+pvWhQdvteZYQHBGqXGvW4
         Jivl0fX8Q9wcqI4VdOlAerlW6BfoDPTY5TzXSvA389JPKAbo/nYWh224fLZXi33S2GWg
         oaVQ==
X-Gm-Message-State: AOAM5306nxpp7HxS9EzA5R80eX5rBiUij6db0qFXjwYeY3Rsq56tn8XN
	TZMEq1hvFBWISVYBdvNZB3o=
X-Google-Smtp-Source: ABdhPJyuBEp1tQna0srJ+BStDXH2KXpkPobfApCMK/DroL3BMu9dl8nCWae5JXq0JHXjjrfleNKdsQ==
X-Received: by 2002:a17:906:4d13:: with SMTP id r19mr1967114eju.496.1620977966505;
        Fri, 14 May 2021 00:39:26 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,19/35] plat/pci_bus: arm64: Implement add/probe interfaces on arm64 
Date: Fri, 14 May 2021 10:39:24 +0300
Message-Id: <20210514073924.13864-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-20-justin.he@arm.com>
References: <20201223073857.118076-20-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Fri May 14 14:08:41 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 14:08:41 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127385.239405 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUY-0000eB-Ep; Fri, 14 May 2021 14:08:38 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127385.239405; Fri, 14 May 2021 14:08:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUY-0000e4-By; Fri, 14 May 2021 14:08:38 +0000
Received: by outflank-mailman (input) for mailman id 127385;
 Fri, 14 May 2021 14:08:36 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=sj0E=KJ=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lhYUV-0000du-UU
 for minios-devel@lists.xen.org; Fri, 14 May 2021 14:08:36 +0000
Received: from mailer2.neclab.eu (unknown [195.37.70.41])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 496733fe-b050-445a-ace4-50c587259db1;
 Fri, 14 May 2021 14:08:33 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer2.neclab.eu (Postfix) with ESMTP id 78D9AF2008;
 Fri, 14 May 2021 16:08:32 +0200 (CEST)
Received: from mailer2.neclab.eu ([127.0.0.1])
 by localhost (atlas-b.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id XEADKeSa4JO5; Fri, 14 May 2021 16:08:32 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer2.neclab.eu (Postfix) with ESMTPS id 17C0DF2006;
 Fri, 14 May 2021 16:08:28 +0200 (CEST)
Received: from [10.7.2.37] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 14 May
 2021 16:08:27 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 496733fe-b050-445a-ace4-50c587259db1
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-b.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer2-20210408; t=1621001312;
	bh=sDfhJG1WJZnmzqdcgfXz2pJvesEFLnT57N2qNawcr20=;
	h=Subject:To:CC:References:From:Date:In-Reply-To:From;
	b=Jy8v0dK5Eo66E5f4T6gliZagT0JUNXBHLNXyHm5RX4NKPck7hHYho/lCeKGsUJYmT
	 aGul0iMR2RTkJE5n5QmcIzT5JSYsmRrOtnzyRyy1Burd2tAJkJczGOFuNhDqXX9PJj
	 BC5pu5m+LwbbNYHNGi1gAFcVlQji42w9ssjRT/Assz4SXeQi3xvhr9bOm+iGlfVXvw
	 Y6a6a8FKO0Jclx/mGOsfRA/HU2TrKN7EjnUkKIPOpOru1d7u/O3cp+YljtRZnTwmTS
	 Ns+yOQOfw6gNL0GAHZK8QY7cGiD26nWpZ2WjvLeQjUx7GqWtOEehustYMzoUM8OlfR
	 mdPJVF+wDfgMQ==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [UNIKRAFT PATCH v5 00/10] Introduce Xen Netfront driver
To: Costin Lupu <costin.lupu@cs.pub.ro>, <minios-devel@lists.xen.org>
CC: <sharan.santhanam@neclab.eu>
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
Message-ID: <bad1bf2d-3e9f-e938-b9d5-4ed5d766c7b0@neclab.eu>
Date: Fri, 14 May 2021 16:08:26 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
 Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: titania.office.hd (192.168.24.89) To puck.office.hd
 (192.168.24.91)

Hi Costin,

thanks a lot for your work. I will take it upstream. While doing this, I 
am going to remove the following line from the license header of your 
newly created files from patch no. 2 and 3 because it is in conflict 
with the BSD-3 license:
  "THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY."

Can you consent to this change?

Thanks,

Simon

On 17.11.20 09:38, Costin Lupu wrote:
> The current changes are required for supporting netfront devices. They should
> be used together with the lwip patch series because they depend on each other.
> 
> These changes follow the same approach used for the design and implementation
> of the virtio-net driver.
> 
> The first version of these patches was sent in 2018. Maybe the current year is
> a lucky one and we will achieve the performance to upstream these changes.
> 
> Changes since v1:
> - Split into multiple patches
> - Use the new uknetdev API
> 
> Changes since v2:
> - Add more info to commit messages
> 
> Changes since v3:
> - Use nb_align field for queue infos
> - Add patch for enabling default drivers
> 
> Changes since v4:
> - Apply reviews feedback
> 
> Costin Lupu (10):
>    plat/xen: Add vif device type
>    plat/xen/drivers: Add skeleton for netfront driver
>    plat/xen/drivers/net: Configure netfront device
>    plat/xen/drivers/net: Create netfront queues
>    plat/xen/drivers/net: Configure netfront tx queue
>    plat/xen/drivers/net: Configure netfront rx queue
>    plat/xen/drivers/net: Enable/disable interrupts for rx queues
>    plat/xen/drivers/net: Start netfront device
>    plat/xen/drivers/net: Add transmit operation
>    plat/xen/drivers/net: Add receive operation
> 
>   plat/xen/Config.uk                 |   8 +
>   plat/xen/Makefile.uk               |  11 +
>   plat/xen/drivers/net/exportsyms.uk |   1 +
>   plat/xen/drivers/net/netfront.c    | 860 +++++++++++++++++++++++++++++
>   plat/xen/drivers/net/netfront.h    | 147 +++++
>   plat/xen/drivers/net/netfront_xb.h |  46 ++
>   plat/xen/drivers/net/netfront_xs.c | 528 ++++++++++++++++++
>   plat/xen/include/xenbus/xenbus.h   |   1 +
>   plat/xen/xenbus/client.c           |   1 +
>   9 files changed, 1603 insertions(+)
>   create mode 100644 plat/xen/drivers/net/exportsyms.uk
>   create mode 100644 plat/xen/drivers/net/netfront.c
>   create mode 100644 plat/xen/drivers/net/netfront.h
>   create mode 100644 plat/xen/drivers/net/netfront_xb.h
>   create mode 100644 plat/xen/drivers/net/netfront_xs.c
> 


From minios-devel-bounces@lists.xenproject.org Fri May 14 14:08:53 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 14:08:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127386.239409 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUn-0000hc-H2; Fri, 14 May 2021 14:08:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127386.239409; Fri, 14 May 2021 14:08:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUn-0000hV-Dy; Fri, 14 May 2021 14:08:53 +0000
Received: by outflank-mailman (input) for mailman id 127386;
 Fri, 14 May 2021 14:08:51 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=sj0E=KJ=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lhYUl-0000h5-0w
 for minios-devel@lists.xen.org; Fri, 14 May 2021 14:08:51 +0000
Received: from mailer1.neclab.eu (unknown [195.37.70.40])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 69296841-8a7b-43da-abce-d69705a8eb81;
 Fri, 14 May 2021 14:08:45 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer1.neclab.eu (Postfix) with ESMTP id EF4FE103B43;
 Fri, 14 May 2021 16:08:44 +0200 (CEST)
Received: from mailer1.neclab.eu ([127.0.0.1])
 by localhost (atlas-a.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 6aSynzz-0s62; Fri, 14 May 2021 16:08:44 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer1.neclab.eu (Postfix) with ESMTPS id AA58EFFF4E;
 Fri, 14 May 2021 16:08:44 +0200 (CEST)
Received: from [10.7.2.37] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 14 May
 2021 16:08:44 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 69296841-8a7b-43da-abce-d69705a8eb81
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-a.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer1-20210408; t=1621001324;
	bh=UbGs5w9C3FaIPMvHofOK1wkx7den6glvYaOGXXVdnV0=;
	h=Subject:To:CC:References:From:Date:In-Reply-To:From;
	b=MokXMrMlB5Pf0TeuFNtfFBU/DvSxsa+RTAjY/FJtqfHEb8TDf8oybXIg2Uwc2bz5a
	 h1pJdWcm9SJs7/QJBFvojx7OHRwRDyswRl8YYVZ7jchdgHdBED7acEh2rOoxF+S6Mm
	 kNPUe429D85BCx/05eOkYIDOfNkd/hCJItRHN2QvXfYlpf+nxDTh2sK/8IclgAXnp6
	 9PukRFhGZB3IhfPWgVnOh58OuQ0vlCQB7THwvo/a+0fMvecgNvXLHqLAqKBzywqMVw
	 kCi7oiGZHuGihXeAy6KkdUf1o5ZWIIU1tv6IJrPzmjwZoAcP3h8X0DIqZHGmeGlzmU
	 IWQZO5KUTSwlA==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [UNIKRAFT PATCH v5 03/10] plat/xen/drivers/net: Configure
 netfront device
To: Costin Lupu <costin.lupu@cs.pub.ro>, <minios-devel@lists.xen.org>
CC: <sharan.santhanam@neclab.eu>, Razvan Cojocaru
	<razvan.cojocaru93@gmail.com>
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
 <20201117083848.27180-4-costin.lupu@cs.pub.ro>
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
Message-ID: <f4d2952d-7e13-afd9-3472-7258dc47674a@neclab.eu>
Date: Fri, 14 May 2021 16:08:43 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
 Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <20201117083848.27180-4-costin.lupu@cs.pub.ro>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: oberon.office.hd (192.168.24.90) To puck.office.hd
 (192.168.24.91)

Thanks a lot!

Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>

On 17.11.20 09:38, Costin Lupu wrote:
> The information needed for configuring netfront devices is in the Xenstore. For
> now, we only retrieve the MAC and IP addresses from there in order to
> initialize the device.
> 
> This patch introduces the `netfront_dev` structure which integrates both netdev
> and Xenbus device information and also keeps the configuration parameters.
> 
> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
> Signed-off-by: Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> ---
>   plat/xen/Makefile.uk               |   1 +
>   plat/xen/drivers/net/netfront.c    | 100 ++++++++++++++
>   plat/xen/drivers/net/netfront.h    |  66 +++++++++
>   plat/xen/drivers/net/netfront_xb.h |  43 ++++++
>   plat/xen/drivers/net/netfront_xs.c | 206 +++++++++++++++++++++++++++++
>   5 files changed, 416 insertions(+)
>   create mode 100644 plat/xen/drivers/net/netfront.h
>   create mode 100644 plat/xen/drivers/net/netfront_xb.h
>   create mode 100644 plat/xen/drivers/net/netfront_xs.c
> 
> diff --git a/plat/xen/Makefile.uk b/plat/xen/Makefile.uk
> index 339b1b21..dfca58fe 100644
> --- a/plat/xen/Makefile.uk
> +++ b/plat/xen/Makefile.uk
> @@ -121,6 +121,7 @@ LIBXENNETFRONT_ASINCLUDES-y    += $(LIBXENPLAT_ASINCLUDES-y)
>   LIBXENNETFRONT_CFLAGS-y        += $(LIBXENPLAT_CFLAGS-y)
>   LIBXENNETFRONT_CINCLUDES-y     += $(LIBXENPLAT_CINCLUDES-y)
>   LIBXENNETFRONT_SRCS-y          += $(LIBXENPLAT_BASE)/drivers/net/netfront.c
> +LIBXENNETFRONT_SRCS-y          += $(LIBXENPLAT_BASE)/drivers/net/netfront_xs.c
>   endif
>   
>   ifeq ($(CONFIG_XEN_BLKFRONT),y)
> diff --git a/plat/xen/drivers/net/netfront.c b/plat/xen/drivers/net/netfront.c
> index b455911e..18c3b2ef 100644
> --- a/plat/xen/drivers/net/netfront.c
> +++ b/plat/xen/drivers/net/netfront.c
> @@ -33,21 +33,121 @@
>    * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
>    */
>   
> +#include <uk/assert.h>
> +#include <uk/print.h>
> +#include <uk/alloc.h>
> +#include <uk/netdev_driver.h>
>   #include <xenbus/xenbus.h>
> +#include "netfront.h"
> +#include "netfront_xb.h"
>   
>   
>   #define DRIVER_NAME  "xen-netfront"
>   
> +#define to_netfront_dev(dev) \
> +	__containerof(dev, struct netfront_dev, netdev)
> +
>   static struct uk_alloc *drv_allocator;
>   
> +static const void *netfront_einfo_get(struct uk_netdev *n,
> +		enum uk_netdev_einfo_type einfo_type)
> +{
> +	struct netfront_dev *nfdev;
> +
> +	UK_ASSERT(n != NULL);
> +
> +	nfdev = to_netfront_dev(n);
> +	switch (einfo_type) {
> +	case UK_NETDEV_IPV4_ADDR_STR:
> +		return nfdev->econf.ipv4addr;
> +	case UK_NETDEV_IPV4_MASK_STR:
> +		return nfdev->econf.ipv4mask;
> +	case UK_NETDEV_IPV4_GW_STR:
> +		return nfdev->econf.ipv4gw;
> +	default:
> +		break;
> +	}
> +
> +	/* type not supported */
> +	return NULL;
> +}
> +
> +static const struct uk_hwaddr *netfront_mac_get(struct uk_netdev *n)
> +{
> +	struct netfront_dev *nfdev;
> +
> +	UK_ASSERT(n != NULL);
> +	nfdev = to_netfront_dev(n);
> +	return &nfdev->hw_addr;
> +}
> +
> +static uint16_t netfront_mtu_get(struct uk_netdev *n)
> +{
> +	struct netfront_dev *nfdev;
> +
> +	UK_ASSERT(n != NULL);
> +	nfdev = to_netfront_dev(n);
> +	return nfdev->mtu;
> +}
> +
> +static unsigned int netfront_promisc_get(struct uk_netdev *n)
> +{
> +	struct netfront_dev *nfdev;
> +
> +	UK_ASSERT(n != NULL);
> +	nfdev = to_netfront_dev(n);
> +	return nfdev->promisc;
> +}
> +
> +static const struct uk_netdev_ops netfront_ops = {
> +	.einfo_get = netfront_einfo_get,
> +	.hwaddr_get = netfront_mac_get,
> +	.mtu_get = netfront_mtu_get,
> +	.promiscuous_get = netfront_promisc_get,
> +};
>   
>   static int netfront_add_dev(struct xenbus_device *xendev)
>   {
> +	struct netfront_dev *nfdev;
>   	int rc = 0;
>   
>   	UK_ASSERT(xendev != NULL);
>   
> +	nfdev = uk_calloc(drv_allocator, 1, sizeof(*nfdev));
> +	if (!nfdev) {
> +		rc = -ENOMEM;
> +		goto err_out;
> +	}
> +
> +	nfdev->xendev = xendev;
> +	nfdev->mtu = UK_ETH_PAYLOAD_MAXLEN;
> +
> +	/* Xenbus initialization */
> +	rc = netfront_xb_init(nfdev, drv_allocator);
> +	if (rc) {
> +		uk_pr_err("Error initializing Xenbus data: %d\n", rc);
> +		goto err_xenbus;
> +	}
> +
> +	/* register netdev */
> +	nfdev->netdev.ops = &netfront_ops;
> +	rc = uk_netdev_drv_register(&nfdev->netdev, drv_allocator, DRIVER_NAME);
> +	if (rc < 0) {
> +		uk_pr_err("Failed to register %s device with libuknetdev\n",
> +			DRIVER_NAME);
> +		goto err_register;
> +	}
> +	nfdev->uid = rc;
> +	rc = 0;
> +
> +out:
>   	return rc;
> +err_register:
> +	netfront_xb_fini(nfdev, drv_allocator);
> +err_xenbus:
> +	uk_free(drv_allocator, nfdev);
> +err_out:
> +	goto out;
>   }
>   
>   static int netfront_drv_init(struct uk_alloc *allocator)
> diff --git a/plat/xen/drivers/net/netfront.h b/plat/xen/drivers/net/netfront.h
> new file mode 100644
> index 00000000..0cc8230b
> --- /dev/null
> +++ b/plat/xen/drivers/net/netfront.h
> @@ -0,0 +1,66 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Costin Lupu <costin.lupu@cs.pub.ro>
> + *          Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> + *
> + * Copyright (c) 2020, University Politehnica of Bucharest. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived from
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
> + */
> +
> +#ifndef __NETFRONT_H__
> +#define __NETFRONT_H__
> +
> +#include <uk/netdev.h>
> +
> +struct xs_econf {
> +	char *ipv4addr;
> +	char *ipv4mask;
> +	char *ipv4gw;
> +};
> +
> +struct netfront_dev {
> +	/* Xenbus device */
> +	struct xenbus_device *xendev;
> +	/* Network device */
> +	struct uk_netdev netdev;
> +
> +	/* Configuration parameters */
> +	struct xs_econf econf;
> +
> +	/* The netdevice identifier */
> +	uint16_t uid;
> +	/* The mtu */
> +	uint16_t mtu;
> +	/* The hw address of the netdevice */
> +	struct uk_hwaddr hw_addr;
> +	/* RX promiscuous mode. */
> +	uint8_t promisc : 1;
> +};
> +
> +#endif /* __NETFRONT_H__ */
> diff --git a/plat/xen/drivers/net/netfront_xb.h b/plat/xen/drivers/net/netfront_xb.h
> new file mode 100644
> index 00000000..6332cf71
> --- /dev/null
> +++ b/plat/xen/drivers/net/netfront_xb.h
> @@ -0,0 +1,43 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Costin Lupu <costin.lupu@cs.pub.ro>
> + *
> + * Copyright (c) 2020, University Politehnica of Bucharest. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived from
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
> + */
> +
> +#ifndef __NETFRONT_XB_H__
> +#define __NETFRONT_XB_H__
> +
> +#include "netfront.h"
> +
> +int  netfront_xb_init(struct netfront_dev *netdev, struct uk_alloc *a);
> +void netfront_xb_fini(struct netfront_dev *netdev, struct uk_alloc *a);
> +
> +#endif /* __NETFRONT_XB_H__ */
> diff --git a/plat/xen/drivers/net/netfront_xs.c b/plat/xen/drivers/net/netfront_xs.c
> new file mode 100644
> index 00000000..e8b8d32a
> --- /dev/null
> +++ b/plat/xen/drivers/net/netfront_xs.c
> @@ -0,0 +1,206 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Costin Lupu <costin.lupu@cs.pub.ro>
> + *
> + * Copyright (c) 2020, University Politehnica of Bucharest. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived from
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
> + */
> +#include <inttypes.h>
> +#include <stdio.h>
> +#include <string.h>
> +#include <uk/errptr.h>
> +#include <uk/print.h>
> +#include <uk/assert.h>
> +#include <xenbus/xs.h>
> +#include "netfront_xb.h"
> +
> +
> +static int xs_read_backend_id(const char *nodename, domid_t *domid)
> +{
> +	char path[strlen(nodename) + sizeof("/backend-id")];
> +	int value, rc;
> +
> +	snprintf(path, sizeof(path), "%s/backend-id", nodename);
> +
> +	rc = xs_read_integer(XBT_NIL, path, &value);
> +	if (!rc)
> +		*domid = (domid_t) value;
> +
> +	return rc;
> +}
> +
> +static void xs_econf_fini(struct xs_econf *econf,
> +		struct uk_alloc *a)
> +{
> +	if (econf->ipv4addr) {
> +		uk_free(a, econf->ipv4addr);
> +		econf->ipv4addr = NULL;
> +	}
> +	if (econf->ipv4mask) {
> +		uk_free(a, econf->ipv4mask);
> +		econf->ipv4mask = NULL;
> +	}
> +	if (econf->ipv4gw) {
> +		uk_free(a, econf->ipv4gw);
> +		econf->ipv4gw = NULL;
> +	}
> +}
> +
> +static int xs_econf_init(struct xs_econf *econf, char *ip_str,
> +		struct uk_alloc *a)
> +{
> +	int rc = -1;
> +	char *ip_addr = NULL, *ip_gw_str = NULL, *ip_mask_str = NULL;
> +
> +	/* IP */
> +	ip_addr = strtok(ip_str, " ");
> +	if (ip_addr == NULL)
> +		goto out_err;
> +	econf->ipv4addr = uk_malloc(a, strlen(ip_addr) + 1);
> +	if (!econf->ipv4addr) {
> +		uk_pr_err("Error allocating ip config.\n");
> +		goto out_err;
> +	}
> +	memcpy(econf->ipv4addr, ip_addr, strlen(ip_addr) + 1);
> +
> +	/* Mask */
> +	ip_mask_str = strtok(NULL, " ");
> +	if (ip_mask_str == NULL)
> +		goto out_err;
> +	econf->ipv4mask = uk_malloc(a, strlen(ip_mask_str) + 1);
> +	if (!econf->ipv4mask) {
> +		uk_pr_err("Error allocating ip mask config.\n");
> +		goto out_err;
> +	}
> +	memcpy(econf->ipv4mask, ip_mask_str, strlen(ip_mask_str) + 1);
> +
> +	/* Gateway */
> +	ip_gw_str = strtok(NULL, " ");
> +	if (ip_gw_str == NULL)
> +		goto out_err;
> +	econf->ipv4gw = uk_malloc(a, strlen(ip_gw_str) + 1);
> +	if (!econf->ipv4gw) {
> +		uk_pr_err("Error allocating ip gateway config.\n");
> +		goto out_err;
> +	}
> +	memcpy(econf->ipv4gw, ip_gw_str, strlen(ip_gw_str) + 1);
> +
> +	rc = 0;
> +out:
> +	return rc;
> +out_err:
> +	xs_econf_fini(econf, a);
> +	goto out;
> +}
> +
> +int netfront_xb_init(struct netfront_dev *nfdev, struct uk_alloc *a)
> +{
> +	struct xenbus_device *xendev;
> +	char *mac_str, *p, *ip_str;
> +	int rc;
> +
> +	UK_ASSERT(nfdev != NULL);
> +
> +	xendev = nfdev->xendev;
> +	UK_ASSERT(xendev != NULL);
> +	UK_ASSERT(xendev->nodename != NULL);
> +
> +	rc = xs_read_backend_id(xendev->nodename, &xendev->otherend_id);
> +	if (rc)
> +		goto out;
> +
> +	/* read backend path */
> +	xendev->otherend = xs_read(XBT_NIL, xendev->nodename, "backend");
> +	if (PTRISERR(xendev->otherend)) {
> +		uk_pr_err("Error reading backend path.\n");
> +		rc = PTR2ERR(xendev->otherend);
> +		xendev->otherend = NULL;
> +		goto out;
> +	}
> +
> +	/* read MAC address */
> +	mac_str = xs_read(XBT_NIL, xendev->nodename, "mac");
> +	if (PTRISERR(mac_str)) {
> +		uk_pr_err("Error reading MAC address.\n");
> +		rc = PTR2ERR(mac_str);
> +		goto no_conf;
> +	}
> +	uk_pr_info("\tMAC %s\n", mac_str);
> +
> +	p = mac_str;
> +	for (int i = 0; i < UK_NETDEV_HWADDR_LEN; i++) {
> +		nfdev->hw_addr.addr_bytes[i] = (uint8_t) strtoul(p, &p, 16);
> +		p++;
> +	}
> +	free(mac_str);
> +
> +	/* read IP address */
> +	ip_str = xs_read(XBT_NIL, xendev->otherend, "ip");
> +	if (PTRISERR(ip_str)) {
> +		uk_pr_err("Error reading IP address.\n");
> +		rc = PTR2ERR(ip_str);
> +		goto no_conf;
> +	}
> +	uk_pr_info("\tIP: %s\n", ip_str);
> +
> +	rc = xs_econf_init(&nfdev->econf, ip_str, a);
> +	if (rc)
> +		goto no_conf;
> +	free(ip_str);
> +
> +	/* TODO spit event channels */
> +
> +	/* TODO netmap */
> +
> +out:
> +	return rc;
> +no_conf:
> +	if (xendev->otherend) {
> +		free(xendev->otherend);
> +		xendev->otherend = NULL;
> +	}
> +	goto out;
> +}
> +
> +void netfront_xb_fini(struct netfront_dev *nfdev, struct uk_alloc *a)
> +{
> +	struct xenbus_device *xendev;
> +
> +	UK_ASSERT(nfdev != NULL);
> +
> +	xendev = nfdev->xendev;
> +	UK_ASSERT(xendev != NULL);
> +
> +	xs_econf_fini(&nfdev->econf, a);
> +
> +	if (xendev->otherend) {
> +		free(xendev->otherend);
> +		xendev->otherend = NULL;
> +	}
> +}
> 


From minios-devel-bounces@lists.xenproject.org Fri May 14 14:08:58 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 14:08:58 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127388.239413 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUs-0000l1-Ij; Fri, 14 May 2021 14:08:58 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127388.239413; Fri, 14 May 2021 14:08:58 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUs-0000kx-Fd; Fri, 14 May 2021 14:08:58 +0000
Received: by outflank-mailman (input) for mailman id 127388;
 Fri, 14 May 2021 14:08:56 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=sj0E=KJ=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lhYUq-0000kc-HU
 for minios-devel@lists.xen.org; Fri, 14 May 2021 14:08:56 +0000
Received: from mailer2.neclab.eu (unknown [195.37.70.41])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id b3c87e2e-30f1-4670-ab04-8f3fb00eef9f;
 Fri, 14 May 2021 14:08:54 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer2.neclab.eu (Postfix) with ESMTP id 6060AF2008;
 Fri, 14 May 2021 16:08:53 +0200 (CEST)
Received: from mailer2.neclab.eu ([127.0.0.1])
 by localhost (atlas-b.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id moq7Y4gsqdQv; Fri, 14 May 2021 16:08:53 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer2.neclab.eu (Postfix) with ESMTPS id 16DE8F2006;
 Fri, 14 May 2021 16:08:47 +0200 (CEST)
Received: from [10.7.2.37] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 14 May
 2021 16:08:46 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: b3c87e2e-30f1-4670-ab04-8f3fb00eef9f
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-b.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer2-20210408; t=1621001333;
	bh=p8I1Ne8hQYICmUfEg5ilv67DtirSSLGd4qOEVb9jrTo=;
	h=Subject:To:CC:References:From:Date:In-Reply-To:From;
	b=RXpyws9yJIGVmc6ur0xuNNxqwzG7zuiWylV/7kwYV5T9JuIf/vk2TPKYgsfgnIzWt
	 zN6yEMN7VZq3kuD9tiQn4yGG3Wgc06XAVDBGjhRDolK6aK6zLAso1AlmSRqLiUjJrq
	 T5AuGk6n4kTHph2sMtzUHStJcxmSGmW5bWYujE37e8KuUlylibAKwvDEFxWPZyyhM3
	 Mtcphal5jdNRdlAfDx7HTCcMvRImMBexzztbRd7cepnfWqKaBmRi+LW16EILVlflRM
	 ML7JV2zwI+VCruUB9KgmoHw9bvfFn52J7Ve8+FOIy/a/SiPpEzkSbSgKSEd/v2qv7Z
	 TUH0Cm6QhRuFQ==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [UNIKRAFT PATCH v5 02/10] plat/xen/drivers: Add skeleton for
 netfront driver
To: Costin Lupu <costin.lupu@cs.pub.ro>, <minios-devel@lists.xen.org>
CC: <sharan.santhanam@neclab.eu>, Razvan Cojocaru
	<razvan.cojocaru93@gmail.com>
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
 <20201117083848.27180-3-costin.lupu@cs.pub.ro>
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
Message-ID: <816cad90-84b1-5383-4f77-03bce104a075@neclab.eu>
Date: Fri, 14 May 2021 16:08:45 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
 Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <20201117083848.27180-3-costin.lupu@cs.pub.ro>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: puck.office.hd (192.168.24.91) To puck.office.hd
 (192.168.24.91)

Thanks a lot!

Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>

On 17.11.20 09:38, Costin Lupu wrote:
> This patch introduces the skeleton for the Xen netfront driver.
> 
> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
> Signed-off-by: Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> ---
>   plat/xen/Config.uk                 |  8 ++++
>   plat/xen/Makefile.uk               | 10 ++++
>   plat/xen/drivers/net/exportsyms.uk |  1 +
>   plat/xen/drivers/net/netfront.c    | 73 ++++++++++++++++++++++++++++++
>   4 files changed, 92 insertions(+)
>   create mode 100644 plat/xen/drivers/net/exportsyms.uk
>   create mode 100644 plat/xen/drivers/net/netfront.c
> 
> diff --git a/plat/xen/Config.uk b/plat/xen/Config.uk
> index 364c9528..3e542be1 100644
> --- a/plat/xen/Config.uk
> +++ b/plat/xen/Config.uk
> @@ -90,6 +90,14 @@ config XEN_XENBUS
>   menu "Xenbus Drivers"
>   	depends on XEN_XENBUS
>   
> +config XEN_NETFRONT
> +	bool "Xenbus Netfront Driver"
> +	default y if LIBUKNETDEV
> +	default n
> +	depends on LIBUKNETDEV
> +	help
> +		Driver for netfront devices
> +
>   menuconfig XEN_BLKFRONT
>   	bool "Xenbus Blkfront Driver"
>   	default n
> diff --git a/plat/xen/Makefile.uk b/plat/xen/Makefile.uk
> index 2a8cdbf6..339b1b21 100644
> --- a/plat/xen/Makefile.uk
> +++ b/plat/xen/Makefile.uk
> @@ -10,6 +10,7 @@ $(eval $(call addplat_s,xen,$(CONFIG_PLAT_XEN)))
>   ##
>   $(eval $(call addplatlib,xen,libxenplat))
>   $(eval $(call addplatlib_s,xen,libxenbus,$(CONFIG_XEN_XENBUS)))
> +$(eval $(call addplatlib_s,xen,libxennetfront,$(CONFIG_XEN_NETFRONT)))
>   $(eval $(call addplatlib_s,xen,libxenblkfront,$(CONFIG_XEN_BLKFRONT)))
>   $(eval $(call addplatlib_s,xen,libxen9pfront,$(CONFIG_XEN_9PFRONT)))
>   
> @@ -113,6 +114,15 @@ LIBXENBUS_SRCS-y               += $(LIBXENPLAT_BASE)/xenbus/xs_watch.c
>   LIBXENBUS_SRCS-y               += $(LIBXENPLAT_BASE)/xenbus/xs.c
>   endif
>   
> +ifeq ($(CONFIG_XEN_NETFRONT),y)
> +LIBXENNETFRONT_EXPORTS          = $(LIBXENPLAT_BASE)/drivers/net/exportsyms.uk
> +LIBXENNETFRONT_ASFLAGS-y       += $(LIBXENPLAT_ASFLAGS-y)
> +LIBXENNETFRONT_ASINCLUDES-y    += $(LIBXENPLAT_ASINCLUDES-y)
> +LIBXENNETFRONT_CFLAGS-y        += $(LIBXENPLAT_CFLAGS-y)
> +LIBXENNETFRONT_CINCLUDES-y     += $(LIBXENPLAT_CINCLUDES-y)
> +LIBXENNETFRONT_SRCS-y          += $(LIBXENPLAT_BASE)/drivers/net/netfront.c
> +endif
> +
>   ifeq ($(CONFIG_XEN_BLKFRONT),y)
>   LIBXENBLKFRONT_EXPORTS           = $(LIBXENPLAT_BASE)/drivers/blk/exportsyms.uk
>   LIBXENBLKFRONT_ASFLAGS-y        += $(LIBXENPLAT_ASFLAGS-y)
> diff --git a/plat/xen/drivers/net/exportsyms.uk b/plat/xen/drivers/net/exportsyms.uk
> new file mode 100644
> index 00000000..c86c3f35
> --- /dev/null
> +++ b/plat/xen/drivers/net/exportsyms.uk
> @@ -0,0 +1 @@
> +none
> \ No newline at end of file
> diff --git a/plat/xen/drivers/net/netfront.c b/plat/xen/drivers/net/netfront.c
> new file mode 100644
> index 00000000..b455911e
> --- /dev/null
> +++ b/plat/xen/drivers/net/netfront.c
> @@ -0,0 +1,73 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Costin Lupu <costin.lupu@cs.pub.ro>
> + *          Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> + *
> + * Copyright (c) 2020, University Politehnica of Bucharest. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived from
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
> + */
> +
> +#include <xenbus/xenbus.h>
> +
> +
> +#define DRIVER_NAME  "xen-netfront"
> +
> +static struct uk_alloc *drv_allocator;
> +
> +
> +static int netfront_add_dev(struct xenbus_device *xendev)
> +{
> +	int rc = 0;
> +
> +	UK_ASSERT(xendev != NULL);
> +
> +	return rc;
> +}
> +
> +static int netfront_drv_init(struct uk_alloc *allocator)
> +{
> +	/* driver initialization */
> +	if (!allocator)
> +		return -EINVAL;
> +
> +	drv_allocator = allocator;
> +	return 0;
> +}
> +
> +static const xenbus_dev_type_t netfront_devtypes[] = {
> +	xenbus_dev_vif,
> +	xenbus_dev_none
> +};
> +
> +static struct xenbus_driver netfront_driver = {
> +	.device_types = netfront_devtypes,
> +	.init         = netfront_drv_init,
> +	.add_dev      = netfront_add_dev
> +};
> +XENBUS_REGISTER_DRIVER(&netfront_driver);
> 


From minios-devel-bounces@lists.xenproject.org Fri May 14 14:09:00 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 14:09:00 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127389.239417 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUu-0000nm-L0; Fri, 14 May 2021 14:09:00 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127389.239417; Fri, 14 May 2021 14:09:00 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYUu-0000nf-Hw; Fri, 14 May 2021 14:09:00 +0000
Received: by outflank-mailman (input) for mailman id 127389;
 Fri, 14 May 2021 14:08:59 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=sj0E=KJ=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lhYUt-0000nI-C8
 for minios-devel@lists.xen.org; Fri, 14 May 2021 14:08:59 +0000
Received: from mailer1.neclab.eu (unknown [195.37.70.40])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 271fc7ff-ec57-4fc7-bced-59aa9fa110ca;
 Fri, 14 May 2021 14:08:57 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer1.neclab.eu (Postfix) with ESMTP id 97926103B43;
 Fri, 14 May 2021 16:08:56 +0200 (CEST)
Received: from mailer1.neclab.eu ([127.0.0.1])
 by localhost (atlas-a.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id cw_PpJdxVq5C; Fri, 14 May 2021 16:08:56 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer1.neclab.eu (Postfix) with ESMTPS id 54B4CFFF4E;
 Fri, 14 May 2021 16:08:56 +0200 (CEST)
Received: from [10.7.2.37] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 14 May
 2021 16:08:55 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 271fc7ff-ec57-4fc7-bced-59aa9fa110ca
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-a.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer1-20210408; t=1621001336;
	bh=rjTvXQpMzzARpOkiBlzrdD9ByfpcNdcDeH3Zr/r+JD0=;
	h=Subject:To:CC:References:From:Date:In-Reply-To:From;
	b=OWd7j20HSyB9NCR6BUTUgf07UxolwAdBKMnkhk418EE/beqfKSVVmr8z37NmgtNqb
	 Voy4om0265SSEmnYtrmzcWXx6/b+9ViYUB579q6oB6uGVgfAE9VTCCj4sol8n/e3mX
	 uBHuU+kqOGgOym5ZAkqgwudCKFL97QrIb38GYYsMlSjvQ25A7J9QQIQtuFNqr22o1/
	 47artU7XpgQ68JnMEQT+3TZiIeuyT0HfhsLItP2DBFYW1XSZqSb8k/3K+5LYfT2BhF
	 UkDfVuUM8pOnF/z2Zf2HRje/nlQiIFr6P2RVgsTehmb/+Ad/wh6R+vTrMpiLB+HtvI
	 KPsBqmUJ7Rc5w==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [UNIKRAFT PATCH v5 05/10] plat/xen/drivers/net: Configure
 netfront tx queue
To: Costin Lupu <costin.lupu@cs.pub.ro>, <minios-devel@lists.xen.org>
CC: <sharan.santhanam@neclab.eu>, Razvan Cojocaru
	<razvan.cojocaru93@gmail.com>
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
 <20201117083848.27180-6-costin.lupu@cs.pub.ro>
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
Message-ID: <7df82da2-029b-0e55-1bec-041ff637d57a@neclab.eu>
Date: Fri, 14 May 2021 16:08:54 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
 Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <20201117083848.27180-6-costin.lupu@cs.pub.ro>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: titania.office.hd (192.168.24.89) To puck.office.hd
 (192.168.24.91)

Thanks a lot!

Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>

On 17.11.20 09:38, Costin Lupu wrote:
> For each queue, either rx or tx, the packets references are kept in a Xen
> shared ring. This patch introduces the initialization of tx shared ring. Each
> time the driver will send a packet it will add a request on the tx shared ring
> which will be serviced by the backend. Therefore we need to keep track of the
> requests by keeping track of their IDs. Because our resources are limited, we
> will maintain a pool of IDs (see `freelist` array) for this purpose.
> 
> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
> Signed-off-by: Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> ---
>   plat/xen/drivers/net/netfront.c | 109 ++++++++++++++++++++++++++++++++
>   plat/xen/drivers/net/netfront.h |  32 ++++++++++
>   2 files changed, 141 insertions(+)
> 
> diff --git a/plat/xen/drivers/net/netfront.c b/plat/xen/drivers/net/netfront.c
> index 47ad4865..c9e09184 100644
> --- a/plat/xen/drivers/net/netfront.c
> +++ b/plat/xen/drivers/net/netfront.c
> @@ -33,10 +33,12 @@
>    * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
>    */
>   
> +#include <string.h>
>   #include <uk/assert.h>
>   #include <uk/print.h>
>   #include <uk/alloc.h>
>   #include <uk/netdev_driver.h>
> +#include <xen-x86/mm.h>
>   #include <xenbus/xenbus.h>
>   #include "netfront.h"
>   #include "netfront_xb.h"
> @@ -49,6 +51,84 @@
>   
>   static struct uk_alloc *drv_allocator;
>   
> +
> +static void add_id_to_freelist(uint16_t id, uint16_t *freelist)
> +{
> +	freelist[id + 1] = freelist[0];
> +	freelist[0]  = id;
> +}
> +
> +static uint16_t get_id_from_freelist(uint16_t *freelist)
> +{
> +	uint16_t id;
> +
> +	id = freelist[0];
> +	freelist[0] = freelist[id + 1];
> +	return id;
> +}
> +
> +static struct uk_netdev_tx_queue *netfront_txq_setup(struct uk_netdev *n,
> +		uint16_t queue_id,
> +		uint16_t nb_desc __unused,
> +		struct uk_netdev_txqueue_conf *conf)
> +{
> +	int rc;
> +	struct netfront_dev *nfdev;
> +	struct uk_netdev_tx_queue *txq;
> +	netif_tx_sring_t *sring;
> +
> +	UK_ASSERT(n != NULL);
> +
> +	nfdev = to_netfront_dev(n);
> +	if (queue_id >= nfdev->max_queue_pairs) {
> +		uk_pr_err("Invalid queue identifier: %"__PRIu16"\n", queue_id);
> +		return ERR2PTR(-EINVAL);
> +	}
> +
> +	txq  = &nfdev->txqs[queue_id];
> +	UK_ASSERT(!txq->initialized);
> +	txq->netfront_dev = nfdev;
> +	txq->lqueue_id = queue_id;
> +
> +	/* Setup shared ring */
> +	sring = uk_palloc(conf->a, 1);
> +	if (!sring)
> +		return ERR2PTR(-ENOMEM);
> +	memset(sring, 0, PAGE_SIZE);
> +	SHARED_RING_INIT(sring);
> +	FRONT_RING_INIT(&txq->ring, sring, PAGE_SIZE);
> +	txq->ring_size = NET_TX_RING_SIZE;
> +	txq->ring_ref = gnttab_grant_access(nfdev->xendev->otherend_id,
> +		virt_to_mfn(sring), 0);
> +	UK_ASSERT(txq->ring_ref != GRANT_INVALID_REF);
> +
> +	/* Setup event channel */
> +	rc = evtchn_alloc_unbound(nfdev->xendev->otherend_id,
> +			NULL, NULL,
> +			&txq->evtchn);
> +	if (rc) {
> +		uk_pr_err("Error creating event channel: %d\n", rc);
> +		gnttab_end_access(txq->ring_ref);
> +		uk_pfree(conf->a, sring, 1);
> +		return ERR2PTR(-rc);
> +	}
> +	/* Events are always disabled for tx queue */
> +	mask_evtchn(txq->evtchn);
> +
> +	/* Initialize list of request ids */
> +	uk_semaphore_init(&txq->sem, NET_TX_RING_SIZE);
> +	for (uint16_t i = 0; i < NET_TX_RING_SIZE; i++) {
> +		add_id_to_freelist(i, txq->freelist);
> +		txq->gref[i] = GRANT_INVALID_REF;
> +		txq->netbuf[i] = NULL;
> +	}
> +
> +	txq->initialized = true;
> +	nfdev->txqs_num++;
> +
> +	return txq;
> +}
> +
>   static int netfront_rxtx_alloc(struct netfront_dev *nfdev,
>   		const struct uk_netdev_conf *conf)
>   {
> @@ -90,6 +170,33 @@ err_free_txrx:
>   	return rc;
>   }
>   
> +static int netfront_txq_info_get(struct uk_netdev *n,
> +		uint16_t queue_id,
> +		struct uk_netdev_queue_info *qinfo)
> +{
> +	struct netfront_dev *nfdev;
> +	struct uk_netdev_tx_queue *txq;
> +	int rc = 0;
> +
> +	UK_ASSERT(n != NULL);
> +	UK_ASSERT(qinfo != NULL);
> +
> +	nfdev = to_netfront_dev(n);
> +	if (unlikely(queue_id >= nfdev->max_queue_pairs)) {
> +		uk_pr_err("Invalid queue_id %"__PRIu16"\n", queue_id);
> +		rc = -EINVAL;
> +		goto exit;
> +	}
> +	txq = &nfdev->txqs[queue_id];
> +	qinfo->nb_min = txq->ring_size;
> +	qinfo->nb_max = txq->ring_size;
> +	qinfo->nb_align = 1;
> +	qinfo->nb_is_power_of_two = 1;
> +
> +exit:
> +	return rc;
> +}
> +
>   static int netfront_configure(struct uk_netdev *n,
>   		const struct uk_netdev_conf *conf)
>   {
> @@ -181,6 +288,8 @@ static unsigned int netfront_promisc_get(struct uk_netdev *n)
>   
>   static const struct uk_netdev_ops netfront_ops = {
>   	.configure = netfront_configure,
> +	.txq_configure = netfront_txq_setup,
> +	.txq_info_get = netfront_txq_info_get,
>   	.info_get = netfront_info_get,
>   	.einfo_get = netfront_einfo_get,
>   	.hwaddr_get = netfront_mac_get,
> diff --git a/plat/xen/drivers/net/netfront.h b/plat/xen/drivers/net/netfront.h
> index a811b092..2ac20b15 100644
> --- a/plat/xen/drivers/net/netfront.h
> +++ b/plat/xen/drivers/net/netfront.h
> @@ -37,11 +37,42 @@
>   #define __NETFRONT_H__
>   
>   #include <uk/netdev.h>
> +#include <uk/semaphore.h>
> +#include <xen/io/netif.h>
> +#include <common/gnttab.h>
> +#include <common/events.h>
> +
> +
> +#define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE)
>   
>   /**
>    * internal structure to represent the transmit queue.
>    */
>   struct uk_netdev_tx_queue {
> +	/* The netfront device */
> +	struct netfront_dev *netfront_dev;
> +	/* The libuknet queue identifier */
> +	uint16_t lqueue_id;
> +	/* True if initialized */
> +	bool initialized;
> +
> +	/* Shared ring size */
> +	uint16_t ring_size;
> +	/* Shared ring */
> +	netif_tx_front_ring_t ring;
> +	/* Shared ring grant ref */
> +	grant_ref_t ring_ref;
> +	/* Queue event channel */
> +	evtchn_port_t evtchn;
> +
> +	/* Free list protecting semaphore */
> +	struct uk_semaphore sem;
> +	/* Free list of transmitting request IDs */
> +	uint16_t freelist[NET_TX_RING_SIZE + 1];
> +	/* Grants for transmit buffers */
> +	grant_ref_t gref[NET_TX_RING_SIZE];
> +	/* Transmit packets addresses */
> +	struct uk_netbuf *netbuf[NET_TX_RING_SIZE];
>   };
>   
>   /**
> @@ -63,6 +94,7 @@ struct netfront_dev {
>   	struct uk_netdev netdev;
>   
>   	/* List of the Rx/Tx queues */
> +	uint16_t txqs_num;
>   	struct uk_netdev_tx_queue *txqs;
>   	struct uk_netdev_rx_queue *rxqs;
>   	/* Maximum number of queue pairs */
> 


From minios-devel-bounces@lists.xenproject.org Fri May 14 14:09:13 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 14:09:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127390.239421 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYV7-0000wY-N0; Fri, 14 May 2021 14:09:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127390.239421; Fri, 14 May 2021 14:09:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYV7-0000wS-Js; Fri, 14 May 2021 14:09:13 +0000
Received: by outflank-mailman (input) for mailman id 127390;
 Fri, 14 May 2021 14:09:12 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=sj0E=KJ=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lhYV6-0000wF-RN
 for minios-devel@lists.xen.org; Fri, 14 May 2021 14:09:12 +0000
Received: from mailer2.neclab.eu (unknown [195.37.70.41])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 7914d70d-8c36-4aba-83e9-8af9d2e4a908;
 Fri, 14 May 2021 14:09:10 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer2.neclab.eu (Postfix) with ESMTP id 04DCCF2008;
 Fri, 14 May 2021 16:09:10 +0200 (CEST)
Received: from mailer2.neclab.eu ([127.0.0.1])
 by localhost (atlas-b.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id RmLWOfx8b6CX; Fri, 14 May 2021 16:09:09 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer2.neclab.eu (Postfix) with ESMTPS id AF585F2006;
 Fri, 14 May 2021 16:09:03 +0200 (CEST)
Received: from [10.7.2.37] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 14 May
 2021 16:09:03 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 7914d70d-8c36-4aba-83e9-8af9d2e4a908
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-b.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer2-20210408; t=1621001349;
	bh=GMEDM44WvBr2KTwhzeBUXEqfcYaynkq4nqTOpyqI0yE=;
	h=Subject:To:CC:References:From:Date:In-Reply-To:From;
	b=Si8rX897wdool1BdYY9BZ6RZ68FclfceI1BeLBX1UPqq2bh1na4vhDhqYmkommBEG
	 iIeUj1iqh5x8QLEVFzmyKBt98Duv+IS0Mltw44vSGvotYghITCVXuO3pE21LLQoFf1
	 UePXKj5l42dXaHOBdMpDJtcZYT8ZQEjqwiut5qqR4e4Q9r4sgUqcfsaxhot+s0qZU9
	 MKNtFnIR7LSy2r2kK4n3OF7gnI40ljn8jMIDNJpwJhTgl/BbSWXn3awcDx0ybzcVbm
	 dgMPCTZJypQ7BaOaEaPApv58qzGhP87yPT6JeU+0AMRRavpQCzytl8JYA/uIvxjLzZ
	 3fwFvFU3x1YoQ==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [UNIKRAFT PATCH v5 06/10] plat/xen/drivers/net: Configure
 netfront rx queue
To: Costin Lupu <costin.lupu@cs.pub.ro>, <minios-devel@lists.xen.org>
CC: <sharan.santhanam@neclab.eu>, Razvan Cojocaru
	<razvan.cojocaru93@gmail.com>
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
 <20201117083848.27180-7-costin.lupu@cs.pub.ro>
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
Message-ID: <efacfc87-505c-1044-0bdd-c3773fe8d65f@neclab.eu>
Date: Fri, 14 May 2021 16:09:02 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
 Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <20201117083848.27180-7-costin.lupu@cs.pub.ro>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: oberon.office.hd (192.168.24.90) To puck.office.hd
 (192.168.24.91)

Thanks a lot!

Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>

On 17.11.20 09:38, Costin Lupu wrote:
> Incoming packets are saved in buffers allocated with user-provided callbacks.
> Whenever such packet is available, the driver is notified via event channels.
> This patch introduces the configuration logic for rx queues and the handler
> used in dealing with the notifications.
> 
> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
> Signed-off-by: Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> ---
>   plat/xen/drivers/net/netfront.c | 212 ++++++++++++++++++++++++++++++--
>   plat/xen/drivers/net/netfront.h |  29 +++++
>   2 files changed, 232 insertions(+), 9 deletions(-)
> 
> diff --git a/plat/xen/drivers/net/netfront.c b/plat/xen/drivers/net/netfront.c
> index c9e09184..bb52d4a3 100644
> --- a/plat/xen/drivers/net/netfront.c
> +++ b/plat/xen/drivers/net/netfront.c
> @@ -52,6 +52,11 @@
>   static struct uk_alloc *drv_allocator;
>   
>   
> +static uint16_t xennet_rxidx(RING_IDX idx)
> +{
> +	return (uint16_t) (idx & (NET_RX_RING_SIZE - 1));
> +}
> +
>   static void add_id_to_freelist(uint16_t id, uint16_t *freelist)
>   {
>   	freelist[id + 1] = freelist[0];
> @@ -67,6 +72,82 @@ static uint16_t get_id_from_freelist(uint16_t *freelist)
>   	return id;
>   }
>   
> +static int netfront_rxq_enqueue(struct uk_netdev_rx_queue *rxq,
> +		struct uk_netbuf *netbuf)
> +{
> +	RING_IDX req_prod;
> +	uint16_t id;
> +	netif_rx_request_t *rx_req;
> +	struct netfront_dev *nfdev;
> +	int notify;
> +
> +	/* buffer must be page aligned */
> +	UK_ASSERT(((unsigned long) netbuf->buf & ~PAGE_MASK) == 0);
> +
> +	if (RING_FULL(&rxq->ring)) {
> +		uk_pr_debug("rx queue is full\n");
> +		return -ENOSPC;
> +	}
> +
> +	/* get request */
> +	req_prod = rxq->ring.req_prod_pvt;
> +	id = xennet_rxidx(req_prod);
> +	rx_req = RING_GET_REQUEST(&rxq->ring, req_prod);
> +	rx_req->id = id;
> +
> +	/* save buffer */
> +	rxq->netbuf[id] = netbuf;
> +	/* setup grant for buffer data */
> +	nfdev = rxq->netfront_dev;
> +	rxq->gref[id] = rx_req->gref =
> +		gnttab_grant_access(nfdev->xendev->otherend_id,
> +			virt_to_mfn(netbuf->buf), 0);
> +	UK_ASSERT(rx_req->gref != GRANT_INVALID_REF);
> +
> +	wmb(); /* Ensure backend sees requests */
> +	rxq->ring.req_prod_pvt = req_prod + 1;
> +
> +	RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&rxq->ring, notify);
> +	if (notify)
> +		notify_remote_via_evtchn(rxq->evtchn);
> +
> +	return 0;
> +}
> +
> +static int netfront_rx_fillup(struct uk_netdev_rx_queue *rxq, uint16_t nb_desc)
> +{
> +	struct uk_netbuf *netbuf[nb_desc];
> +	int rc, status = 0;
> +	uint16_t cnt;
> +
> +	cnt = rxq->alloc_rxpkts(rxq->alloc_rxpkts_argp, netbuf, nb_desc);
> +
> +	for (uint16_t i = 0; i < cnt; i++) {
> +		rc = netfront_rxq_enqueue(rxq, netbuf[i]);
> +		if (unlikely(rc < 0)) {
> +			uk_pr_err("Failed to add a buffer to rx queue %p: %d\n",
> +				rxq, rc);
> +
> +			/*
> +			 * Release netbufs that we are not going
> +			 * to use anymore
> +			 */
> +			for (uint16_t j = i; j < cnt; j++)
> +				uk_netbuf_free(netbuf[j]);
> +
> +			status |= UK_NETDEV_STATUS_UNDERRUN;
> +
> +			goto out;
> +		}
> +	}
> +
> +	if (unlikely(cnt < nb_desc))
> +		status |= UK_NETDEV_STATUS_UNDERRUN;
> +
> +out:
> +	return status;
> +}
> +
>   static struct uk_netdev_tx_queue *netfront_txq_setup(struct uk_netdev *n,
>   		uint16_t queue_id,
>   		uint16_t nb_desc __unused,
> @@ -103,15 +184,19 @@ static struct uk_netdev_tx_queue *netfront_txq_setup(struct uk_netdev *n,
>   	UK_ASSERT(txq->ring_ref != GRANT_INVALID_REF);
>   
>   	/* Setup event channel */
> -	rc = evtchn_alloc_unbound(nfdev->xendev->otherend_id,
> -			NULL, NULL,
> -			&txq->evtchn);
> -	if (rc) {
> -		uk_pr_err("Error creating event channel: %d\n", rc);
> -		gnttab_end_access(txq->ring_ref);
> -		uk_pfree(conf->a, sring, 1);
> -		return ERR2PTR(-rc);
> -	}
> +	if (nfdev->split_evtchn || !nfdev->rxqs[queue_id].initialized) {
> +		rc = evtchn_alloc_unbound(nfdev->xendev->otherend_id,
> +				NULL, NULL,
> +				&txq->evtchn);
> +		if (rc) {
> +			uk_pr_err("Error creating event channel: %d\n", rc);
> +			gnttab_end_access(txq->ring_ref);
> +			uk_pfree(conf->a, sring, 1);
> +			return ERR2PTR(rc);
> +		}
> +	} else
> +		txq->evtchn = nfdev->rxqs[queue_id].evtchn;
> +
>   	/* Events are always disabled for tx queue */
>   	mask_evtchn(txq->evtchn);
>   
> @@ -129,6 +214,86 @@ static struct uk_netdev_tx_queue *netfront_txq_setup(struct uk_netdev *n,
>   	return txq;
>   }
>   
> +static void netfront_handler(evtchn_port_t port __unused,
> +		struct __regs *regs __unused, void *arg)
> +{
> +	struct uk_netdev_rx_queue *rxq = arg;
> +
> +	/* Indicate to the network stack about an event */
> +	uk_netdev_drv_rx_event(&rxq->netfront_dev->netdev, rxq->lqueue_id);
> +}
> +
> +static struct uk_netdev_rx_queue *netfront_rxq_setup(struct uk_netdev *n,
> +		uint16_t queue_id,
> +		uint16_t nb_desc __unused,
> +		struct uk_netdev_rxqueue_conf *conf)
> +{
> +	int rc;
> +	struct netfront_dev *nfdev;
> +	struct uk_netdev_rx_queue *rxq;
> +	netif_rx_sring_t *sring;
> +
> +	UK_ASSERT(n != NULL);
> +	UK_ASSERT(conf != NULL);
> +
> +	nfdev = to_netfront_dev(n);
> +	if (queue_id >= nfdev->max_queue_pairs) {
> +		uk_pr_err("Invalid queue identifier: %"__PRIu16"\n", queue_id);
> +		return ERR2PTR(-EINVAL);
> +	}
> +
> +	rxq = &nfdev->rxqs[queue_id];
> +	UK_ASSERT(!rxq->initialized);
> +	rxq->netfront_dev = nfdev;
> +	rxq->lqueue_id = queue_id;
> +
> +	/* Setup shared ring */
> +	sring = uk_palloc(conf->a, 1);
> +	if (!sring)
> +		return ERR2PTR(-ENOMEM);
> +	memset(sring, 0, PAGE_SIZE);
> +	SHARED_RING_INIT(sring);
> +	FRONT_RING_INIT(&rxq->ring, sring, PAGE_SIZE);
> +	rxq->ring_size = NET_RX_RING_SIZE;
> +	rxq->ring_ref = gnttab_grant_access(nfdev->xendev->otherend_id,
> +		virt_to_mfn(sring), 0);
> +	UK_ASSERT(rxq->ring_ref != GRANT_INVALID_REF);
> +
> +	/* Setup event channel */
> +	if (nfdev->split_evtchn || !nfdev->txqs[queue_id].initialized) {
> +		rc = evtchn_alloc_unbound(nfdev->xendev->otherend_id,
> +				netfront_handler, rxq,
> +				&rxq->evtchn);
> +		if (rc) {
> +			uk_pr_err("Error creating event channel: %d\n", rc);
> +			gnttab_end_access(rxq->ring_ref);
> +			uk_pfree(conf->a, sring, 1);
> +			return ERR2PTR(rc);
> +		}
> +	} else {
> +		rxq->evtchn = nfdev->txqs[queue_id].evtchn;
> +		/* overwriting event handler */
> +		bind_evtchn(rxq->evtchn, netfront_handler, rxq);
> +	}
> +	/*
> +	 * By default, events are disabled and it is up to the user or
> +	 * network stack to explicitly enable them.
> +	 */
> +	mask_evtchn(rxq->evtchn);
> +	rxq->intr_enabled = 0;
> +
> +	rxq->alloc_rxpkts = conf->alloc_rxpkts;
> +	rxq->alloc_rxpkts_argp = conf->alloc_rxpkts_argp;
> +
> +	/* Allocate receive buffers for this queue */
> +	netfront_rx_fillup(rxq, rxq->ring_size);
> +
> +	rxq->initialized = true;
> +	nfdev->rxqs_num++;
> +
> +	return rxq;
> +}
> +
>   static int netfront_rxtx_alloc(struct netfront_dev *nfdev,
>   		const struct uk_netdev_conf *conf)
>   {
> @@ -197,6 +362,33 @@ exit:
>   	return rc;
>   }
>   
> +static int netfront_rxq_info_get(struct uk_netdev *n,
> +		uint16_t queue_id,
> +		struct uk_netdev_queue_info *qinfo)
> +{
> +	struct netfront_dev *nfdev;
> +	struct uk_netdev_rx_queue *rxq;
> +	int rc = 0;
> +
> +	UK_ASSERT(n != NULL);
> +	UK_ASSERT(qinfo != NULL);
> +
> +	nfdev = to_netfront_dev(n);
> +	if (unlikely(queue_id >= nfdev->max_queue_pairs)) {
> +		uk_pr_err("Invalid queue id: %"__PRIu16"\n", queue_id);
> +		rc = -EINVAL;
> +		goto exit;
> +	}
> +	rxq = &nfdev->rxqs[queue_id];
> +	qinfo->nb_min = rxq->ring_size;
> +	qinfo->nb_max = rxq->ring_size;
> +	qinfo->nb_align = 1;
> +	qinfo->nb_is_power_of_two = 1;
> +
> +exit:
> +	return rc;
> +}
> +
>   static int netfront_configure(struct uk_netdev *n,
>   		const struct uk_netdev_conf *conf)
>   {
> @@ -289,7 +481,9 @@ static unsigned int netfront_promisc_get(struct uk_netdev *n)
>   static const struct uk_netdev_ops netfront_ops = {
>   	.configure = netfront_configure,
>   	.txq_configure = netfront_txq_setup,
> +	.rxq_configure = netfront_rxq_setup,
>   	.txq_info_get = netfront_txq_info_get,
> +	.rxq_info_get = netfront_rxq_info_get,
>   	.info_get = netfront_info_get,
>   	.einfo_get = netfront_einfo_get,
>   	.hwaddr_get = netfront_mac_get,
> diff --git a/plat/xen/drivers/net/netfront.h b/plat/xen/drivers/net/netfront.h
> index 2ac20b15..7e971002 100644
> --- a/plat/xen/drivers/net/netfront.h
> +++ b/plat/xen/drivers/net/netfront.h
> @@ -44,6 +44,7 @@
>   
>   
>   #define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE)
> +#define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE)
>   
>   /**
>    * internal structure to represent the transmit queue.
> @@ -79,6 +80,33 @@ struct uk_netdev_tx_queue {
>    * internal structure to represent the receive queue.
>    */
>   struct uk_netdev_rx_queue {
> +	/* The netfront device */
> +	struct netfront_dev *netfront_dev;
> +	/* The libuknet queue identifier */
> +	uint16_t lqueue_id;
> +	/* True if initialized */
> +	bool initialized;
> +
> +	/* Shared ring size */
> +	uint16_t ring_size;
> +	/* Shared ring */
> +	netif_rx_front_ring_t ring;
> +	/* Shared ring grant ref */
> +	grant_ref_t ring_ref;
> +	/* Queue event channel */
> +	evtchn_port_t evtchn;
> +
> +	/* The flag to interrupt on the transmit queue */
> +	uint8_t intr_enabled;
> +
> +	/* User-provided receive buffer allocation function */
> +	uk_netdev_alloc_rxpkts alloc_rxpkts;
> +	void *alloc_rxpkts_argp;
> +
> +	/* Receive buffers for incoming packets */
> +	struct uk_netbuf *netbuf[NET_RX_RING_SIZE];
> +	/* Grants for receive buffers */
> +	grant_ref_t gref[NET_RX_RING_SIZE];
>   };
>   
>   struct xs_econf {
> @@ -95,6 +123,7 @@ struct netfront_dev {
>   
>   	/* List of the Rx/Tx queues */
>   	uint16_t txqs_num;
> +	uint16_t rxqs_num;
>   	struct uk_netdev_tx_queue *txqs;
>   	struct uk_netdev_rx_queue *rxqs;
>   	/* Maximum number of queue pairs */
> 


From minios-devel-bounces@lists.xenproject.org Fri May 14 14:09:17 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 14:09:17 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127391.239426 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYVB-000104-Pj; Fri, 14 May 2021 14:09:17 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127391.239426; Fri, 14 May 2021 14:09:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYVB-0000zw-Lb; Fri, 14 May 2021 14:09:17 +0000
Received: by outflank-mailman (input) for mailman id 127391;
 Fri, 14 May 2021 14:09:16 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=sj0E=KJ=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lhYVA-0000wF-Q4
 for minios-devel@lists.xen.org; Fri, 14 May 2021 14:09:16 +0000
Received: from mailer1.neclab.eu (unknown [195.37.70.40])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 80d51273-7d69-4a31-bbc9-b689de139184;
 Fri, 14 May 2021 14:09:15 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer1.neclab.eu (Postfix) with ESMTP id 8FA80103B43;
 Fri, 14 May 2021 16:09:14 +0200 (CEST)
Received: from mailer1.neclab.eu ([127.0.0.1])
 by localhost (atlas-a.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 75xBuMxCS-0b; Fri, 14 May 2021 16:09:14 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer1.neclab.eu (Postfix) with ESMTPS id 4DDC6FFF4E;
 Fri, 14 May 2021 16:09:14 +0200 (CEST)
Received: from [10.7.2.37] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 14 May
 2021 16:09:13 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 80d51273-7d69-4a31-bbc9-b689de139184
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-a.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer1-20210408; t=1621001354;
	bh=wxE64Xk0a17Oowe3KPwhkwObWXPdUU0MpBJGhIfQtDI=;
	h=Subject:To:CC:References:From:Date:In-Reply-To:From;
	b=KHkKKpOsHisn/UWUE9ICQui0951WhDTPISkJhj7d75EZua61zArG900L0J7oaLJ7k
	 TNJ4+7fxmjGajbRlyauEXLOQKNihLOmDywiQC8O52XbjJF+zo5yA1ufbdEFU/UsJtT
	 ZHiO1UhtmhY0yOTk2yIwB6cWec9uF0TG/FxXLwZNqLIxw3X2QbHng131VkdPu8rQPk
	 q/bVbG4U7DNGHkhLW158fX4/FOHi/HoUrwc147MudlOgFpLQ7JsoAR2F5aWb9DjLg7
	 1Xz3uSkzczYlIKYJfZgTHbqV5aW66HTIpKwJaGBaG7qXC0rmdFQrBtRRhSJVr0nZDR
	 iMFNytJcqRGLA==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [UNIKRAFT PATCH v5 09/10] plat/xen/drivers/net: Add transmit
 operation
To: Costin Lupu <costin.lupu@cs.pub.ro>, <minios-devel@lists.xen.org>
CC: <sharan.santhanam@neclab.eu>, Razvan Cojocaru
	<razvan.cojocaru93@gmail.com>
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
 <20201117083848.27180-10-costin.lupu@cs.pub.ro>
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
Message-ID: <606c1823-da8d-dfe3-47c4-64f3fa928613@neclab.eu>
Date: Fri, 14 May 2021 16:09:13 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
 Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <20201117083848.27180-10-costin.lupu@cs.pub.ro>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: puck.office.hd (192.168.24.91) To puck.office.hd
 (192.168.24.91)

Thanks a lot!

Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>

On 17.11.20 09:38, Costin Lupu wrote:
> Whenever a packet is transmitted, the request describing it is written in the
> shared ring. The packet itself is written in a page referenced by the request
> and shared, as well, with the backend. At the end of each transmit operation, a
> cleanup operation is performed free'ing the resources allocated for the
> previously transmitted packets.
> 
> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
> Signed-off-by: Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> ---
>   plat/xen/drivers/net/netfront.c | 113 ++++++++++++++++++++++++++++++++
>   1 file changed, 113 insertions(+)
> 
> diff --git a/plat/xen/drivers/net/netfront.c b/plat/xen/drivers/net/netfront.c
> index 48b7c02f..5cae3efa 100644
> --- a/plat/xen/drivers/net/netfront.c
> +++ b/plat/xen/drivers/net/netfront.c
> @@ -39,6 +39,7 @@
>   #include <uk/alloc.h>
>   #include <uk/netdev_driver.h>
>   #include <xen-x86/mm.h>
> +#include <xen-x86/irq.h>
>   #include <xenbus/xenbus.h>
>   #include "netfront.h"
>   #include "netfront_xb.h"
> @@ -78,6 +79,117 @@ static uint16_t get_id_from_freelist(uint16_t *freelist)
>   	return id;
>   }
>   
> +static int network_tx_buf_gc(struct uk_netdev_tx_queue *txq)
> +{
> +	RING_IDX prod, cons;
> +	netif_tx_response_t *tx_rsp;
> +	uint16_t id;
> +	bool more_to_do;
> +	int count = 0;
> +
> +	do {
> +		prod = txq->ring.sring->rsp_prod;
> +		rmb(); /* Ensure we see responses up to 'rp'. */
> +
> +		for (cons = txq->ring.rsp_cons; cons != prod; cons++) {
> +			tx_rsp = RING_GET_RESPONSE(&txq->ring, cons);
> +
> +			if (tx_rsp->status == NETIF_RSP_NULL)
> +				continue;
> +
> +			if (tx_rsp->status == NETIF_RSP_ERROR)
> +				uk_pr_err("netdev%u: Transmission error on txq %u\n",
> +					txq->netfront_dev->netdev._data->id,
> +					txq->lqueue_id);
> +
> +			id  = tx_rsp->id;
> +			UK_ASSERT(id < NET_TX_RING_SIZE);
> +
> +			gnttab_end_access(txq->gref[id]);
> +			txq->gref[id] = GRANT_INVALID_REF;
> +			uk_netbuf_free_single(txq->netbuf[id]);
> +
> +			add_id_to_freelist(id, txq->freelist);
> +			uk_semaphore_up(&txq->sem);
> +
> +			count++;
> +		}
> +
> +		txq->ring.rsp_cons = prod;
> +
> +		RING_FINAL_CHECK_FOR_RESPONSES(&txq->ring, more_to_do);
> +	} while (more_to_do);
> +
> +	return count;
> +}
> +
> +static int netfront_xmit(struct uk_netdev *n,
> +		struct uk_netdev_tx_queue *txq,
> +		struct uk_netbuf *pkt)
> +{
> +	struct netfront_dev *nfdev;
> +	unsigned long flags;
> +	uint16_t id;
> +	RING_IDX req_prod;
> +	netif_tx_request_t *tx_req;
> +	int notify;
> +	int status = 0, count;
> +
> +	UK_ASSERT(n != NULL);
> +	UK_ASSERT(txq != NULL);
> +	UK_ASSERT(pkt != NULL);
> +	UK_ASSERT(pkt->len < PAGE_SIZE);
> +
> +	nfdev = to_netfront_dev(n);
> +
> +	/* get request id */
> +	if (unlikely(!uk_semaphore_down_try(&txq->sem))) {
> +		/* try some cleanup */
> +		local_irq_save(flags);
> +		count = network_tx_buf_gc(txq);
> +		local_irq_restore(flags);
> +		if (count == 0 || !uk_semaphore_down_try(&txq->sem))
> +			return -ENOSPC;
> +	}
> +	local_irq_save(flags);
> +	id = get_id_from_freelist(txq->freelist);
> +	local_irq_restore(flags);
> +
> +	/* get request */
> +	req_prod = txq->ring.req_prod_pvt;
> +	tx_req = RING_GET_REQUEST(&txq->ring, req_prod);
> +
> +	/* setup grant for buffer data */
> +	txq->gref[id] = tx_req->gref =
> +		gnttab_grant_access(nfdev->xendev->otherend_id,
> +			virt_to_mfn(pkt->buf), 1);
> +	UK_ASSERT(tx_req->gref != GRANT_INVALID_REF);
> +	txq->netbuf[id] = pkt;
> +
> +	tx_req->offset = 0;
> +	tx_req->size = (uint16_t) pkt->len;
> +	tx_req->flags = 0;
> +	tx_req->id = id;
> +
> +	txq->ring.req_prod_pvt = req_prod + 1;
> +	wmb(); /* Ensure backend sees requests */
> +
> +	RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&txq->ring, notify);
> +	if (notify)
> +		notify_remote_via_evtchn(txq->evtchn);
> +
> +	status |= UK_NETDEV_STATUS_SUCCESS;
> +
> +	/* some cleanup */
> +	local_irq_save(flags);
> +	count = network_tx_buf_gc(txq);
> +	local_irq_restore(flags);
> +
> +	status |= likely(count > 0) ? UK_NETDEV_STATUS_MORE : 0x0;
> +
> +	return status;
> +}
> +
>   static int netfront_rxq_enqueue(struct uk_netdev_rx_queue *rxq,
>   		struct uk_netbuf *netbuf)
>   {
> @@ -601,6 +713,7 @@ static int netfront_add_dev(struct xenbus_device *xendev)
>   	}
>   
>   	/* register netdev */
> +	nfdev->netdev.tx_one = netfront_xmit;
>   	nfdev->netdev.ops = &netfront_ops;
>   	rc = uk_netdev_drv_register(&nfdev->netdev, drv_allocator, DRIVER_NAME);
>   	if (rc < 0) {
> 


From minios-devel-bounces@lists.xenproject.org Fri May 14 14:09:29 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 14:09:29 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127392.239429 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYVN-00016p-RG; Fri, 14 May 2021 14:09:29 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127392.239429; Fri, 14 May 2021 14:09:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhYVN-00016i-OQ; Fri, 14 May 2021 14:09:29 +0000
Received: by outflank-mailman (input) for mailman id 127392;
 Fri, 14 May 2021 14:09:28 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=sj0E=KJ=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lhYVM-00015m-Hx
 for minios-devel@lists.xen.org; Fri, 14 May 2021 14:09:28 +0000
Received: from mailer2.neclab.eu (unknown [195.37.70.41])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id c9697e59-0a7e-4fd6-9214-22b64e2fd5c2;
 Fri, 14 May 2021 14:09:27 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer2.neclab.eu (Postfix) with ESMTP id 591E8F2008;
 Fri, 14 May 2021 16:09:26 +0200 (CEST)
Received: from mailer2.neclab.eu ([127.0.0.1])
 by localhost (atlas-b.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id X8ogn9i6B12I; Fri, 14 May 2021 16:09:26 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer2.neclab.eu (Postfix) with ESMTPS id 101E0F2006;
 Fri, 14 May 2021 16:09:20 +0200 (CEST)
Received: from [10.7.2.37] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 14 May
 2021 16:09:19 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: c9697e59-0a7e-4fd6-9214-22b64e2fd5c2
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-b.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer2-20210408; t=1621001366;
	bh=27DNRpQXQDwJNadzY5y3iNCehVcyVx/rkqYb5/dGPHI=;
	h=Subject:To:CC:References:From:Date:In-Reply-To:From;
	b=snU1/UoecBwmZV0BXfccjWepCfO5lWIC2bIXC0VcoI+Uoyahx2Ot4Flck2ZZitYyV
	 NhX2D4rJBm6Mo4UmWuNta1L5zm+tyBa+9nOiP03OCJ1PKR+TtsUqXxIakM2OT/mPpV
	 vbU4AJioAUMzUP1b1JHSPw9smhkHWcNNCc01gBrpfVV0wWKVleCvuqVcHcSrrvDEVh
	 3Rukhmd8Hg25xRgScnq9H50fI8NKm0u3igyGKRZc0hnZg9bmLmYssImDjTJR37Z6Oc
	 0psMt6iki8jU+UcKho67s57TZfqOlcFZpmy9IwJc/HQo09r2qZwMB5gNPIt+MjNI+8
	 EXUtAfUTng8Lw==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [UNIKRAFT PATCH v5 10/10] plat/xen/drivers/net: Add receive
 operation
To: Costin Lupu <costin.lupu@cs.pub.ro>, <minios-devel@lists.xen.org>
CC: <sharan.santhanam@neclab.eu>, Razvan Cojocaru
	<razvan.cojocaru93@gmail.com>
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
 <20201117083848.27180-11-costin.lupu@cs.pub.ro>
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
Message-ID: <df4e17b1-d4c0-3dd9-e588-10b7ff54e8f5@neclab.eu>
Date: Fri, 14 May 2021 16:09:18 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0)
 Gecko/20100101 Thunderbird/78.9.0
MIME-Version: 1.0
In-Reply-To: <20201117083848.27180-11-costin.lupu@cs.pub.ro>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: titania.office.hd (192.168.24.89) To puck.office.hd
 (192.168.24.91)

Thanks a lot!

Reviewed-by: Simon Kuenzer <simon.kuenzer@neclab.eu>

On 17.11.20 09:38, Costin Lupu wrote:
> Incoming packets are written in pages allocated by the netfront. Such pages are
> allocated and registered to the shared ring after completion of receiving
> operations.
> 
> Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
> Signed-off-by: Razvan Cojocaru <razvan.cojocaru93@gmail.com>
> ---
>   plat/xen/drivers/net/netfront.c | 103 ++++++++++++++++++++++++++++++++
>   1 file changed, 103 insertions(+)
> 
> diff --git a/plat/xen/drivers/net/netfront.c b/plat/xen/drivers/net/netfront.c
> index 5cae3efa..948234ff 100644
> --- a/plat/xen/drivers/net/netfront.c
> +++ b/plat/xen/drivers/net/netfront.c
> @@ -232,6 +232,52 @@ static int netfront_rxq_enqueue(struct uk_netdev_rx_queue *rxq,
>   	return 0;
>   }
>   
> +static int netfront_rxq_dequeue(struct uk_netdev_rx_queue *rxq,
> +		struct uk_netbuf **netbuf)
> +{
> +	RING_IDX prod, cons;
> +	netif_rx_response_t *rx_rsp;
> +	uint16_t len, id;
> +	struct uk_netbuf *buf = NULL;
> +	int count = 0;
> +
> +	UK_ASSERT(rxq != NULL);
> +	UK_ASSERT(netbuf != NULL);
> +
> +	prod = rxq->ring.sring->rsp_prod;
> +	rmb(); /* Ensure we see queued responses up to 'rp'. */
> +	cons = rxq->ring.rsp_cons;
> +	/* No new descriptor since last dequeue operation */
> +	if (cons == prod) {
> +		*netbuf = NULL;
> +		goto out;
> +	}
> +
> +	/* get response */
> +	rx_rsp = RING_GET_RESPONSE(&rxq->ring, cons);
> +	UK_ASSERT(rx_rsp->status > NETIF_RSP_NULL);
> +	id = rx_rsp->id;
> +	UK_ASSERT(id < NET_RX_RING_SIZE);
> +
> +	/* remove grant for buffer data */
> +	gnttab_end_access(rxq->gref[id]);
> +
> +	buf = rxq->netbuf[id];
> +	len = (uint16_t) rx_rsp->status;
> +	if (len > UK_ETH_FRAME_MAXLEN)
> +		len = UK_ETH_FRAME_MAXLEN;
> +	buf->len = len;
> +	buf->data = buf->buf;
> +
> +	*netbuf = buf;
> +
> +	rxq->ring.rsp_cons++;
> +	count = 1;
> +
> +out:
> +	return count;
> +}
> +
>   static int netfront_rx_fillup(struct uk_netdev_rx_queue *rxq, uint16_t nb_desc)
>   {
>   	struct uk_netbuf *netbuf[nb_desc];
> @@ -282,6 +328,62 @@ static int netfront_rxq_intr_enable(struct uk_netdev_rx_queue *rxq)
>   	return (more > 0);
>   }
>   
> +static int netfront_recv(struct uk_netdev *n,
> +		struct uk_netdev_rx_queue *rxq,
> +		struct uk_netbuf **pkt)
> +{
> +	int rc, status = 0;
> +
> +	UK_ASSERT(n != NULL);
> +	UK_ASSERT(rxq != NULL);
> +	UK_ASSERT(pkt != NULL);
> +
> +	/* Queue interrupts have to be off when calling receive */
> +	UK_ASSERT(!(rxq->intr_enabled & NETFRONT_INTR_EN));
> +
> +	rc = netfront_rxq_dequeue(rxq, pkt);
> +	UK_ASSERT(rc >= 0);
> +
> +	status |= (*pkt) ? UK_NETDEV_STATUS_SUCCESS : 0x0;
> +	status |= netfront_rx_fillup(rxq, rc);
> +
> +	/* Enable interrupt only when user had previously enabled it */
> +	if (rxq->intr_enabled & NETFRONT_INTR_USR_EN_MASK) {
> +		/* Need to enable the interrupt on the last packet */
> +		rc = netfront_rxq_intr_enable(rxq);
> +		if (rc == 1 && !(*pkt)) {
> +			/**
> +			 * Packet arrive after reading the queue and before
> +			 * enabling the interrupt
> +			 */
> +			rc = netfront_rxq_dequeue(rxq, pkt);
> +			UK_ASSERT(rc >= 0);
> +			status |= UK_NETDEV_STATUS_SUCCESS;
> +
> +			/*
> +			 * Since we received something, we need to fillup
> +			 * and notify
> +			 */
> +			status |= netfront_rx_fillup(rxq, rc);
> +
> +			/* Need to enable the interrupt on the last packet */
> +			rc = netfront_rxq_intr_enable(rxq);
> +			status |= (rc == 1) ? UK_NETDEV_STATUS_MORE : 0x0;
> +		} else if (*pkt) {
> +			/* When we originally got a packet and there is more */
> +			status |= (rc == 1) ? UK_NETDEV_STATUS_MORE : 0x0;
> +		}
> +	} else if (*pkt) {
> +		/**
> +		 * For polling case, we report always there are further
> +		 * packets unless the queue is empty.
> +		 */
> +		status |= UK_NETDEV_STATUS_MORE;
> +	}
> +
> +	return status;
> +}
> +
>   static struct uk_netdev_tx_queue *netfront_txq_setup(struct uk_netdev *n,
>   		uint16_t queue_id,
>   		uint16_t nb_desc __unused,
> @@ -714,6 +816,7 @@ static int netfront_add_dev(struct xenbus_device *xendev)
>   
>   	/* register netdev */
>   	nfdev->netdev.tx_one = netfront_xmit;
> +	nfdev->netdev.rx_one = netfront_recv;
>   	nfdev->netdev.ops = &netfront_ops;
>   	rc = uk_netdev_drv_register(&nfdev->netdev, drv_allocator, DRIVER_NAME);
>   	if (rc < 0) {
> 


From minios-devel-bounces@lists.xenproject.org Fri May 14 16:32:32 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 14 May 2021 16:32:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.127432.239522 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhajk-0002RV-O2; Fri, 14 May 2021 16:32:28 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 127432.239522; Fri, 14 May 2021 16:32:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lhajk-0002RO-L3; Fri, 14 May 2021 16:32:28 +0000
Received: by outflank-mailman (input) for mailman id 127432;
 Fri, 14 May 2021 16:32:28 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=YAYX=KJ=cs.pub.ro=costin.lupu@srs-us1.protection.inumbo.net>)
 id 1lhajk-0002RI-0s
 for minios-devel@lists.xen.org; Fri, 14 May 2021 16:32:28 +0000
Received: from mx.upb.ro (unknown [141.85.13.210])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 6fd2124a-b344-4e7f-ba0a-3e9fb5abcdc7;
 Fri, 14 May 2021 16:32:25 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 83816B560065;
 Fri, 14 May 2021 19:32:24 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id Mau7zc64v8gJ; Fri, 14 May 2021 19:32:22 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 5BDE7B560086;
 Fri, 14 May 2021 19:32:22 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 7HuHZFKFa503; Fri, 14 May 2021 19:32:22 +0300 (EEST)
Received: from [192.168.1.35] (unknown [188.25.174.245])
 by mx.upb.ro (Postfix) with ESMTPSA id 07FBCB560065;
 Fri, 14 May 2021 19:32:21 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 6fd2124a-b344-4e7f-ba0a-3e9fb5abcdc7
X-Virus-Scanned: amavisd-new at upb.ro
Subject: Re: [UNIKRAFT PATCH v5 00/10] Introduce Xen Netfront driver
To: Simon Kuenzer <simon.kuenzer@neclab.eu>, minios-devel@lists.xen.org
Cc: sharan.santhanam@neclab.eu
References: <20201117083848.27180-1-costin.lupu@cs.pub.ro>
 <bad1bf2d-3e9f-e938-b9d5-4ed5d766c7b0@neclab.eu>
From: Costin Lupu <costin.lupu@cs.pub.ro>
Message-ID: <4843e1be-5dd7-b404-820c-8f3bb308c6c2@cs.pub.ro>
Date: Fri, 14 May 2021 19:32:21 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.10.0
MIME-Version: 1.0
In-Reply-To: <bad1bf2d-3e9f-e938-b9d5-4ed5d766c7b0@neclab.eu>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

Hi Simon,

Yeah, it's fine with me.

Costin

On 5/14/21 5:08 PM, Simon Kuenzer wrote:
> Hi Costin,
>=20
> thanks a lot for your work. I will take it upstream. While doing this, =
I
> am going to remove the following line from the license header of your
> newly created files from patch no. 2 and 3 because it is in conflict
> with the BSD-3 license:
> "THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY."
>=20
> Can you consent to this change?
>=20
> Thanks,
>=20
> Simon
>=20
> On 17.11.20 09:38, Costin Lupu wrote:
>> The current changes are required for supporting netfront devices. They
>> should
>> be used together with the lwip patch series because they depend on
>> each other.
>>
>> These changes follow the same approach used for the design and
>> implementation
>> of the virtio-net driver.
>>
>> The first version of these patches was sent in 2018. Maybe the current
>> year is
>> a lucky one and we will achieve the performance to upstream these
>> changes.
>>
>> Changes since v1:
>> - Split into multiple patches
>> - Use the new uknetdev API
>>
>> Changes since v2:
>> - Add more info to commit messages
>>
>> Changes since v3:
>> - Use nb_align field for queue infos
>> - Add patch for enabling default drivers
>>
>> Changes since v4:
>> - Apply reviews feedback
>>
>> Costin Lupu (10):
>> =C2=A0=C2=A0 plat/xen: Add vif device type
>> =C2=A0=C2=A0 plat/xen/drivers: Add skeleton for netfront driver
>> =C2=A0=C2=A0 plat/xen/drivers/net: Configure netfront device
>> =C2=A0=C2=A0 plat/xen/drivers/net: Create netfront queues
>> =C2=A0=C2=A0 plat/xen/drivers/net: Configure netfront tx queue
>> =C2=A0=C2=A0 plat/xen/drivers/net: Configure netfront rx queue
>> =C2=A0=C2=A0 plat/xen/drivers/net: Enable/disable interrupts for rx qu=
eues
>> =C2=A0=C2=A0 plat/xen/drivers/net: Start netfront device
>> =C2=A0=C2=A0 plat/xen/drivers/net: Add transmit operation
>> =C2=A0=C2=A0 plat/xen/drivers/net: Add receive operation
>>
>> =C2=A0 plat/xen/Config.uk=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 8 +
>> =C2=A0 plat/xen/Makefile.uk=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 11 +
>> =C2=A0 plat/xen/drivers/net/exportsyms.uk |=C2=A0=C2=A0 1 +
>> =C2=A0 plat/xen/drivers/net/netfront.c=C2=A0=C2=A0=C2=A0 | 860 +++++++=
++++++++++++++++++++++
>> =C2=A0 plat/xen/drivers/net/netfront.h=C2=A0=C2=A0=C2=A0 | 147 +++++
>> =C2=A0 plat/xen/drivers/net/netfront_xb.h |=C2=A0 46 ++
>> =C2=A0 plat/xen/drivers/net/netfront_xs.c | 528 ++++++++++++++++++
>> =C2=A0 plat/xen/include/xenbus/xenbus.h=C2=A0=C2=A0 |=C2=A0=C2=A0 1 +
>> =C2=A0 plat/xen/xenbus/client.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 1 +
>> =C2=A0 9 files changed, 1603 insertions(+)
>> =C2=A0 create mode 100644 plat/xen/drivers/net/exportsyms.uk
>> =C2=A0 create mode 100644 plat/xen/drivers/net/netfront.c
>> =C2=A0 create mode 100644 plat/xen/drivers/net/netfront.h
>> =C2=A0 create mode 100644 plat/xen/drivers/net/netfront_xb.h
>> =C2=A0 create mode 100644 plat/xen/drivers/net/netfront_xs.c
>>
>=20


From minios-devel-bounces@lists.xenproject.org Mon May 17 16:31:17 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 17 May 2021 16:31:17 +0000
Received: from list by lists.xenproject.org with outflank-mailman.128426.241099 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lig9D-0002z6-5o; Mon, 17 May 2021 16:31:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 128426.241099; Mon, 17 May 2021 16:31:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lig9D-0002yz-2v; Mon, 17 May 2021 16:31:15 +0000
Received: by outflank-mailman (input) for mailman id 128426;
 Mon, 17 May 2021 16:31:14 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=zTc9=KM=neclab.eu=sharan.santhanam@srs-us1.protection.inumbo.net>)
 id 1lig9B-0002ys-E7
 for minios-devel@lists.xenproject.org; Mon, 17 May 2021 16:31:14 +0000
Received: from mailer2.neclab.eu (unknown [195.37.70.41])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5e903331-66d8-48f9-90ac-8acfffdf9755;
 Mon, 17 May 2021 16:31:09 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer2.neclab.eu (Postfix) with ESMTP id A313BF2013;
 Mon, 17 May 2021 18:31:08 +0200 (CEST)
Received: from mailer2.neclab.eu ([127.0.0.1])
 by localhost (atlas-b.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 86nFqPpr6Li7; Mon, 17 May 2021 18:31:08 +0200 (CEST)
Received: from puck.office.hd (puck.office.hd [192.168.24.91])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer2.neclab.eu (Postfix) with ESMTPS id 51DC2F2004
 for <minios-devel@lists.xenproject.org>; Mon, 17 May 2021 18:31:06 +0200 (CEST)
Received: from [10.7.1.5] (192.168.24.96) by puck.office.hd (192.168.24.91)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 17 May
 2021 18:31:05 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 5e903331-66d8-48f9-90ac-8acfffdf9755
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-b.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer2-20210408; t=1621269068;
	bh=rGKVVjF8vLLUzy0rJYaTUiEOco/hRFTFAKThbvJ1zmY=;
	h=Subject:To:References:From:Date:In-Reply-To:From;
	b=hj8v6qzywAo2WH+Rr+SSbP1jkh+S1Vzfo+KAsnKXqtwE7gv+v9H6M2ZntuqK8/Cw3
	 wUkmMPdgcWh0LX5y3P8nA60jL8Z5UdKOqk7ojgiK+RyT02OmZeWtkJ5Lm6CHqIwrmM
	 SDIIXwcgYxN8z/dznk5gNRM/yXO+6aP1uFVkLXB6SxVfJr1mSTiCutOuP3INBe5kiO
	 8Z1AISwGtknfa0yNDZyaVc8dExbm3rx/YH7xQHS5816gWeQDm4x4/L7nZi0hqQhTmM
	 tIihGjbBQLNyf3MnBxDWiulRSWqvX3KXCXJdw8CR0oZlpjqtkC76H9uWTpoGoimwcM
	 wW5JxoddelAPg==
X-ENC: Last-Hop-TLS-encrypted
Subject: Re: [PATCH v2 2/2] arm/rtc: enable pl031 for arm64.
To: <minios-devel@lists.xenproject.org>
References: <20201216142341.164678-1-jianyong.wu@arm.com>
 <20201216142341.164678-3-jianyong.wu@arm.com>
From: Sharan Santhanam <sharan.santhanam@neclab.eu>
Message-ID: <f9c37ee5-17b5-9b7a-5776-d03f6ded10f0@neclab.eu>
Date: Mon, 17 May 2021 18:31:04 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <20201216142341.164678-3-jianyong.wu@arm.com>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-Originating-IP: [192.168.24.96]
X-ClientProxiedBy: titania.office.hd (192.168.24.89) To puck.office.hd
 (192.168.24.91)

Hello Jianyong Wu,

This patch looks fine to me.

Reviewed-by: Sharan Santhanam <sharan.santhanam@neclab.eu>

Thanks & Regards

Sharan

On 12/16/20 3:23 PM, Jianyong Wu wrote:
> Currently, rtc is not enabled in arm, so wall time can't
> be provided currectly.
> pl031 is chosen as the rtc device for arm in this patch, but
> we have interface extension of capable of plugging other rtc device.
>
> Signed-off-by: Wei Chen <wei.chen@arm.com>
> Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
> ---
>   plat/common/arm/time.c         |   3 +
>   plat/drivers/include/rtc/rtc.h |  75 +++++++++++
>   plat/drivers/rtc/pl031.c       | 223 +++++++++++++++++++++++++++++++++
>   plat/drivers/rtc/rtc.c         | 189 ++++++++++++++++++++++++++++
>   plat/kvm/Config.uk             |   5 +
>   plat/kvm/Makefile.uk           |  12 +-
>   6 files changed, 506 insertions(+), 1 deletion(-)
>   create mode 100644 plat/drivers/include/rtc/rtc.h
>   create mode 100644 plat/drivers/rtc/pl031.c
>   create mode 100644 plat/drivers/rtc/rtc.c
>
> diff --git a/plat/common/arm/time.c b/plat/common/arm/time.c
> index bbb3c72..5562a0e 100644
> --- a/plat/common/arm/time.c
> +++ b/plat/common/arm/time.c
> @@ -43,6 +43,7 @@
>   #include <ofw/gic_fdt.h>
>   #include <uk/plat/common/irq.h>
>   #include <gic/gic-v2.h>
> +#include <rtc/rtc.h>
>   #include <arm/time.h>
>   
>   /* TODO: For now this file is KVM dependent. As soon as we have more
> @@ -150,4 +151,6 @@ void ukplat_time_init(void)
>   
>   	/* Enable timer */
>   	generic_timer_enable();
> +	/* Initialize rtc */
> +	_dtb_init_rtc(_libkvmplat_cfg.dtb);
>   }
> diff --git a/plat/drivers/include/rtc/rtc.h b/plat/drivers/include/rtc/rtc.h
> new file mode 100644
> index 0000000..9f00b02
> --- /dev/null
> +++ b/plat/drivers/include/rtc/rtc.h
> @@ -0,0 +1,75 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Wei Chen <Wei.Chen@arm.com>
> + *          Jianyong Wu <Jianyong.Wu@arm.com>
> + *
> + * Copyright (c) 2019, Arm Ltd. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived from
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + */
> +
> +#ifndef __PLAT_KVM_ARM_RTC_H__
> +#define __PLAT_KVM_ARM_RTC_H__
> +
> +#define RTC_ENABLE 1
> +#define RTC_DISABLE 0
> +
> +struct rtc_time {
> +	int year;
> +	int mon;
> +	int day;
> +	int hour;
> +	int min;
> +	int sec;
> +};
> +
> +struct rtc_dev {
> +	char *name;
> +	int id;
> +	const struct rtc_ops *ops;
> +};
> +
> +struct rtc_ops {
> +	void (*enable)(struct rtc_dev *, unsigned int);
> +	int (*status)(struct rtc_dev *);
> +	void (*read_time)(struct rtc_dev *, struct rtc_time *);
> +	void (*write_time)(struct rtc_dev *, struct rtc_time *);
> +	void (*read_alarm)(struct rtc_dev *, struct rtc_time *);
> +	void (*write_alarm)(struct rtc_dev *, struct rtc_time *);
> +	uint32_t (*rtc_boot_tick_get)(struct rtc_dev *);
> +	void (*alarm_irq_enable)(struct rtc_dev *, unsigned int);
> +	int (*irq_handler)(void *);
> +};
> +
> +void _dtb_init_rtc(void *arg);
> +void rtc_raw_to_tm(uint32_t raw, struct rtc_time *tm);
> +uint32_t rtc_tm_to_raw(struct rtc_time *tm);
> +
> +extern uint32_t rtc_boot_seconds;
> +extern struct rtc_dev rtc_pl031;
> +
> +#endif //__PLAT_KVM_ARM_RTC_H__
> diff --git a/plat/drivers/rtc/pl031.c b/plat/drivers/rtc/pl031.c
> new file mode 100644
> index 0000000..fe958b9
> --- /dev/null
> +++ b/plat/drivers/rtc/pl031.c
> @@ -0,0 +1,223 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Wei Chen <Wei.Chen@arm.com>
> + *          Jianyong Wu <Jianyong.Wu@arm.com>
> + *
> + * Copyright (c) 2018, Arm Ltd. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived from
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + */
> +#include <string.h>
> +#include <libfdt.h>
> +#include <stdio.h>
> +#include <uk/assert.h>
> +#include <uk/essentials.h>
> +#include <uk/print.h>
> +#include <uk/list.h>
> +#include <arm/cpu.h>
> +#include <ofw/fdt.h>
> +#include <rtc/rtc.h>
> +#include <gic/gic-v2.h>
> +#include <ofw/gic_fdt.h>
> +#include <uk/plat/common/irq.h>
> +
> +extern uint64_t rtc_base_addr;
> +
> +/* Define offset of PL031 registers */
> +#define RTC_DR		0
> +#define RTC_MR		0x4
> +#define RTC_LR		0x8
> +#define RTC_CR		0xc
> +#define RTC_IMSC	0x10
> +#define RTC_RIS		0x14
> +#define RTC_MIS		0x18
> +#define RTC_ICR		0x1c
> +
> +#define PL031_REG(r)	(void *)(rtc_base_addr + (r))
> +
> +static uint32_t pl031_read_raw(void)
> +{
> +	return ioreg_read32(PL031_REG(RTC_DR));
> +}
> +
> +static void pl031_read_time(struct rtc_dev *dev, struct rtc_time *rt)
> +{
> +	uint32_t raw;
> +
> +	if (!dev || strcmp(dev->name, "rtc_pl031")) {
> +		uk_pr_warn("%s: rtc device should be rtc_pl031\n", __func__);
> +		return;
> +	}
> +
> +	raw = pl031_read_raw();
> +	rtc_raw_to_tm(raw, rt);
> +}
> +
> +static void pl031_write_raw(uint32_t val)
> +{
> +	ioreg_write32(PL031_REG(RTC_LR), val);
> +}
> +
> +static void pl031_write_time(struct rtc_dev *dev, struct rtc_time *rt)
> +{
> +	uint32_t raw;
> +
> +	if (!dev || strcmp(dev->name, "rtc_pl031")) {
> +		uk_pr_warn("%s: rtc device should be rtc_pl031\n", __func__);
> +		return;
> +	}
> +
> +	raw = rtc_tm_to_raw(rt);
> +	pl031_write_raw(raw);
> +}
> +
> +/*
> + * set rtc match register comparing with counter
> + * value to generat a interrupt
> + */
> +static void pl031_write_alarm_raw(uint32_t alarm)
> +{
> +	ioreg_write32(PL031_REG(RTC_MR), alarm);
> +}
> +
> +static void pl031_write_alarm(struct rtc_dev *dev, struct rtc_time *rt)
> +{
> +	uint32_t raw;
> +
> +	if (!dev || strcmp(dev->name, "rtc_pl031")) {
> +		uk_pr_warn("%s: rtc device should be rtc_pl031\n", __func__);
> +		return;
> +	}
> +
> +	raw = rtc_tm_to_raw(rt);
> +	pl031_write_alarm_raw(raw);
> +}
> +
> +static uint32_t pl031_read_alarm_raw(void)
> +{
> +	return ioreg_read32(PL031_REG(RTC_MR));
> +}
> +
> +uint32_t pl031_boot_tick_get(struct rtc_dev *dev)
> +{
> +	if (!dev || strcmp(dev->name, "rtc_pl031"))
> +		uk_pr_warn("%s: rtc device should be rtc_pl031, return boot time from pl031 instead\n",
> +			    __func__);
> +
> +	return pl031_read_raw();
> +}
> +
> +static void pl031_read_alarm(struct rtc_dev *dev, struct rtc_time *rt)
> +{
> +	if (!dev || strcmp(dev->name, "rtc_pl031")) {
> +		uk_pr_warn("%s: rtc device should be rtc_pl031\n", __func__);
> +		return;
> +	}
> +
> +	rtc_raw_to_tm(pl031_read_alarm_raw(), rt);
> +}
> +
> +/*
> + * If pl031 is not enabled, enable it by write 1 to RTC_CR, otherwise
> + * do nothing.
> + */
> +static void pl031_enable(struct rtc_dev *dev, unsigned int enable)
> +{
> +	if (!dev || strcmp(dev->name, "rtc_pl031")) {
> +		uk_pr_warn("%s: rtc device should be rtc_pl031\n", __func__);
> +		return;
> +	}
> +
> +	ioreg_write32(PL031_REG(RTC_CR), enable);
> +}
> +
> +/*
> + * return rtc status, 1 denotes enable and 0 denotes disable,
> + * -1 denotes wrong device
> + */
> +static int pl031_get_status(struct rtc_dev *dev)
> +{
> +	int val;
> +
> +	if (!dev || strcmp(dev->name, "rtc_pl031")) {
> +		uk_pr_warn("%s: rtc device should be rtc_pl031\n", __func__);
> +		return -1;
> +	}
> +
> +	val = ioreg_read32(PL031_REG(RTC_CR));
> +	val &= RTC_ENABLE;
> +	return val;
> +}
> +
> +/* enable alarm irq, 1 denotes enable, 2 denotes disable */
> +static void pl031_enable_intr(struct rtc_dev *dev, unsigned int enable)
> +{
> +	if (!dev || strcmp(dev->name, "rtc_pl031")) {
> +		uk_pr_warn("%s: rtc device should be rtc_pl031\n", __func__);
> +		return;
> +	}
> +
> +	ioreg_write32(PL031_REG(RTC_IMSC), enable);
> +}
> +
> +static uint32_t pl031_get_raw_intr_state(void)
> +{
> +	return ioreg_read32(PL031_REG(RTC_RIS));
> +}
> +
> +static void pl031_clear_intr(void)
> +{
> +	while (pl031_get_raw_intr_state())
> +		ioreg_write32(PL031_REG(RTC_ICR), 1);
> +}
> +
> +/* wait for platform device framework to register this handler */
> +int pl031_irq_handler(void *arg __unused)
> +{
> +	pl031_clear_intr();
> +	// TODO: do something real
> +
> +	return 1;
> +}
> +
> +static const struct rtc_ops ops_pl031 = {
> +	.enable			= pl031_enable,
> +	.status			= pl031_get_status,
> +	.read_time		= pl031_read_time,
> +	.write_time		= pl031_write_time,
> +	.read_alarm		= pl031_read_alarm,
> +	.write_alarm		= pl031_write_alarm,
> +	.rtc_boot_tick_get	= pl031_boot_tick_get,
> +	.alarm_irq_enable	= pl031_enable_intr,
> +	.irq_handler		= pl031_irq_handler,
> +};
> +
> +struct rtc_dev rtc_pl031 = {
> +	.name	= "rtc_pl031",
> +	.id	= 0,
> +	.ops	= &ops_pl031,
> +};
> diff --git a/plat/drivers/rtc/rtc.c b/plat/drivers/rtc/rtc.c
> new file mode 100644
> index 0000000..1185ed4
> --- /dev/null
> +++ b/plat/drivers/rtc/rtc.c
> @@ -0,0 +1,189 @@
> +/* SPDX-License-Identifier: BSD-3-Clause */
> +/*
> + * Authors: Wei Chen <Wei.Chen@arm.com>
> + *          Jianyong Wu <Jianyong.Wu@arm.com>
> + *
> + * Copyright (c) 2018, Arm Ltd. All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *    notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *    notice, this list of conditions and the following disclaimer in the
> + *    documentation and/or other materials provided with the distribution.
> + * 3. Neither the name of the copyright holder nor the names of its
> + *    contributors may be used to endorse or promote products derived from
> + *    this software without specific prior written permission.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGE.
> + *
> + */
> +
> +#include <string.h>
> +#include <libfdt.h>
> +#include <stdio.h>
> +#include <uk/essentials.h>
> +#include <arm/cpu.h>
> +#include <rtc/rtc.h>
> +#include <ofw/fdt.h>
> +#include <gic/gic-v2.h>
> +#include <ofw/gic_fdt.h>
> +#include <uk/plat/common/irq.h>
> +
> +#define RTC_DEV_NUM 1
> +
> +uint64_t rtc_base_addr;
> +uint32_t rtc_boot_seconds;
> +
> +const int day_per_mon[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
> +const char * const rtc_device_list[] = {
> +	"arm,pl031",
> +};
> +
> +void rtc_raw_to_tm(uint32_t raw, struct rtc_time *rt)
> +{
> +	int hour, days, years, dy4, dy100, dy400, normal_days,
> +			day_in_year, sum = 0, leap;
> +
> +	rt->sec = raw % 60;
> +	rt->min = (raw % (60 * 60)) / 60;
> +	hour = raw / 60 / 60;
> +	days =  hour / 24;
> +	rt->hour = hour % 24;
> +	/*
> +	 * total days for every continue 4-years, assuming there is a leap
> +	 * year among every 4 years.
> +	 */
> +	dy4 = 365 * 3 + 366;
> +	// total days for every continue 100-years.
> +	dy100 = 25 * dy4 - 1;
> +	// total days for every continue 400-years.
> +	dy400 = dy100 * 4 + 1;
> +	// normalize the days by get rid of the additional day in leap year
> +	normal_days = days - days / dy4 + days / dy100 + days / dy400;
> +	years = normal_days / 365;
> +	rt->year = 1970 + years;
> +	leap = ((!(rt->year % 4) && (rt->year % 100)) || !(rt->year % 400));
> +	day_in_year =  normal_days - years * 365;
> +	/*
> +	 * if the residue days larger than the sum of the first two month
> +	 * we should consider Feb,29.
> +	 */
> +	sum += leap * (day_in_year >= (day_per_mon[0] + day_per_mon[1]));
> +	for (int i = 0; i < 12; i++) {
> +		sum += day_per_mon[i];
> +		if (day_in_year < sum) {
> +			rt->mon = i + 1;
> +			rt->day = day_in_year - (sum - day_per_mon[i]) + 1;
> +			break;
> +		}
> +	}
> +}
> +
> +uint32_t rtc_tm_to_raw(struct rtc_time *rt)
> +{
> +	int leaps, leap, days, sec;
> +
> +	leaps = (rt->year - 1970) / 4 - (rt->year - 1970) / 100 +
> +			(rt->year - 1970) / 400;
> +	leap = ((!(rt->year % 4) && (rt->year % 100)) || !(rt->year % 400));
> +	days = (rt->year - 1970) * 365 + leaps;
> +	if (rt->mon == 1) {
> +		days += day_per_mon[0];
> +	} else {
> +		for (int i = 0; i < rt->mon - 1; i++)
> +			days += day_per_mon[i];
> +	}
> +	days += rt->day + (rt->mon > 2) * leap - 1;
> +	sec = days * 3600 * 24 + rt->hour * 3600 + rt->min * 60 + rt->sec;
> +
> +	return sec;
> +}
> +
> +struct rtc_dev *rtc_list[RTC_DEV_NUM];
> +
> +static void rtc_dev_register(struct rtc_dev *dev)
> +{
> +	rtc_list[dev->id] = dev;
> +}
> +
> +void _dtb_init_rtc(void *dtb)
> +{
> +	uint64_t size;
> +	uint32_t irq_type, hwirq, trigger_type;
> +	int fdt_rtc, ret, index, irq, rc;
> +
> +	uk_pr_info("Probing RTC...\n");
> +	/*
> +	 * We choose the first available rtc device in device list as the
> +	 * system rtc.
> +	 */
> +	fdt_rtc = fdt_node_offset_idx_by_compatible_list(dtb, -1,
> +			rtc_device_list, &index);
> +	if (fdt_rtc < 0) {
> +		uk_pr_err("Could not find rtc device!, fdt_rtc is %d\n",
> +			fdt_rtc);
> +		return;
> +	}
> +
> +	ret = fdt_get_address(dtb, fdt_rtc, 0, &rtc_base_addr, &size);
> +	if (ret < 0) {
> +		uk_pr_err("Could not get rtc address\n");
> +		return;
> +	}
> +
> +	rc = gic_get_irq_from_dtb(dtb, fdt_rtc, 0, &irq_type, &hwirq,
> +			&trigger_type);
> +	if (rc < 0) {
> +		uk_pr_err("Failed to find IRQ number from DTB\n");
> +		return;
> +	}
> +
> +	irq = gic_irq_translate(irq_type, hwirq);
> +	if (irq < 0 || irq >= __MAX_IRQ) {
> +		uk_pr_err("Failed to translate IRQ number\n");
> +		return;
> +	}
> +
> +	rc = ukplat_irq_register(irq, rtc_list[index]->ops->irq_handler, NULL);
> +	if (rc < 0) {
> +		uk_pr_err("Failed to register rtc interrupt handler\n");
> +		return;
> +	}
> +
> +	switch (index) {
> +	case 0:
> +		rtc_dev_register(&rtc_pl031);
> +		break;
> +	default:
> +		uk_pr_err("No rtc device found to register\n");
> +		return;
> +	}
> +
> +	if (rtc_list[index]->ops->status(rtc_list[index]) == RTC_DISABLE)
> +		rtc_list[index]->ops->enable(rtc_list[index], RTC_ENABLE);
> +
> +	if (rtc_list[index]->ops->status(rtc_list[index]) != RTC_ENABLE) {
> +		uk_pr_err("Fail to enable rtc\n");
> +		return;
> +	}
> +	/* Record the boot seconds */
> +	rtc_boot_seconds = rtc_list[index]->ops->rtc_boot_tick_get(rtc_list[index]);
> +	/* Disable rtc alarm irq at its reset */
> +	rtc_list[index]->ops->alarm_irq_enable(rtc_list[index], RTC_DISABLE);
> +
> +	uk_pr_info("Found RTC on: %lu\n", rtc_base_addr);
> +}
> diff --git a/plat/kvm/Config.uk b/plat/kvm/Config.uk
> index 3372b6c..1bf72f3 100644
> --- a/plat/kvm/Config.uk
> +++ b/plat/kvm/Config.uk
> @@ -133,6 +133,11 @@ config LIBGICV2
>          select LIBOFW
>          depends on ARCH_ARM_64
>   
> +config LIBPL031
> +       bool "Arm platform rtc device driver"
> +       default y if ARCH_ARM_64
> +       depends on ARCH_ARM_64
> +
>   config LIBOFW
>          bool "Open Firmware library support"
>          default n
> diff --git a/plat/kvm/Makefile.uk b/plat/kvm/Makefile.uk
> index 94321e0..03711b4 100644
> --- a/plat/kvm/Makefile.uk
> +++ b/plat/kvm/Makefile.uk
> @@ -14,7 +14,7 @@ $(eval $(call addplatlib_s,kvm,libkvmvirtioblk,$(CONFIG_VIRTIO_BLK)))
>   $(eval $(call addplatlib_s,kvm,libkvmvirtio9p,$(CONFIG_VIRTIO_9P)))
>   $(eval $(call addplatlib_s,kvm,libkvmofw,$(CONFIG_LIBOFW)))
>   $(eval $(call addplatlib_s,kvm,libkvmgicv2,$(CONFIG_LIBGICV2)))
> -
> +$(eval $(call addplatlib_s,kvm,libkvmpl031,$(CONFIG_LIBPL031)))
>   ##
>   ## Platform library definitions
>   ##
> @@ -182,3 +182,13 @@ LIBKVMGICV2_CINCLUDES-y         += -I$(UK_PLAT_COMMON_BASE)/include
>   LIBKVMGICV2_CINCLUDES-y         += -I$(UK_PLAT_DRIVERS_BASE)/include
>   
>   LIBKVMGICV2_SRCS-y += $(UK_PLAT_DRIVERS_BASE)/gic/gic-v2.c
> +
> +##
> +## RTC-PL031 library definitions
> +##
> +LIBKVMPL031_CINCLUDES-y		+= -I$(LIBKVMPLAT_BASE)/include
> +LIBKVMPL031_CINCLUDES-y		+= -I$(UK_PLAT_COMMON_BASE)/include
> +LIBKVMPL031_CINCLUDES-y		+= -I$(UK_PLAT_DRIVERS_BASE)/include
> +
> +LIBKVMPL031_SRCS-y		+= $(UK_PLAT_DRIVERS_BASE)/rtc/pl031.c
> +LIBKVMPL031_SRCS-y		+= $(UK_PLAT_DRIVERS_BASE)/rtc/rtc.c


From minios-devel-bounces@lists.xenproject.org Mon May 24 06:47:22 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 06:47:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131678.245962 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Mx-0000kT-HA; Mon, 24 May 2021 06:47:19 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131678.245962; Mon, 24 May 2021 06:47:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Mx-0000kM-Do; Mon, 24 May 2021 06:47:19 +0000
Received: by outflank-mailman (input) for mailman id 131678;
 Mon, 24 May 2021 06:47:18 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=16U1=KT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1ll4Mw-0000kG-Hr
 for minios-devel@lists.xen.org; Mon, 24 May 2021 06:47:18 +0000
Received: from mail-ej1-x62e.google.com (unknown [2a00:1450:4864:20::62e])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id d6ecbc62-86cc-495c-9f37-90c66447cca5;
 Mon, 24 May 2021 06:47:17 +0000 (UTC)
Received: by mail-ej1-x62e.google.com with SMTP id n2so40034668ejy.7
 for <minios-devel@lists.xen.org>; Sun, 23 May 2021 23:47:17 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c301:f000:283b:905b:cf37:5cad])
 by smtp.gmail.com with ESMTPSA id j1sm1319925edv.14.2021.05.23.23.47.15
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 23 May 2021 23:47:16 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: d6ecbc62-86cc-495c-9f37-90c66447cca5
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=TLPmJAtYIAQG0H1v2LLx5Z7il+EWiLUXl9ZlgALMkYlujqA3Lj0de48GDDzss8LUUe
         s8iKNZJPnfn8vBd6BegDr3Rel5BHSmjI0R5YaMpQsEG1I4iURxFogV2euhpettNVwQmJ
         qx5T8M1Sxdz4M/G0BFDsb63HD/sYQdvbnglnIKU7mWT8L2Up/VYItDjar4hXgmJaGVyK
         kuSeqtoemrrl5QLaolPWbQNXRkr94mAPxEUaewPCTX/MsKLHOqqqBIupQrmi6l4gmox4
         YP3kBU97jdjQa4x7BHzUkLeGfkcQlUwzy6j+gsRZ4gMn+unNSWBlPKsDPaYkd+I490b3
         sQGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=XIzCRyzQJQCcJuYoTQCy+UIJCvctRUrJe1Gu712PSe1NnqeNH40BXxChlzExpt9U7e
         SDIXcba/WevxBaigwFJ4KzG6h9JWH+kcLe5r66VQqmmTmSKmMKohD2fVuiWjHTcL/dj2
         c4M80sx0N8WpeB0oTRDmSGCg07U34NXu51OnnmygGO9+zq0fZFWiZujexxm/1Eu/jVic
         FXdnwsJPhAwzMVmu4lyfR9IbYPiZaUcw4/AjSA69KSXYZOnXpihBVMuALd7S68Kxjxj9
         /McN7VW2RJt6l5JGhxL69QQskulUCzMDmrRXvbJChcLRjGskaW7r3m6rtVRZaTW7cCpD
         Ym+w==
X-Gm-Message-State: AOAM531Y3Mm3tQdb8J+QpWrTZJo0nRGTb7cL5WoRkMQ/YXjo8kmt1Uhy
	iy/wSmAXjxMu2YnEi5iLC/c=
X-Google-Smtp-Source: ABdhPJw7s0ZySsMZx+Mc3YiVgZz2aE3efiTYUItUHxh8PjrH8csMyieGtKyPcwm/RqYL6DGbZXSyZw==
X-Received: by 2002:a17:906:c010:: with SMTP id e16mr22158152ejz.214.1621838836298;
        Sun, 23 May 2021 23:47:16 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,29/35] plat/arm: Make sure fpsimd sysregs writing take effects
Date: Mon, 24 May 2021 09:47:15 +0300
Message-Id: <20210524064715.9375-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-30-justin.he@arm.com>
References: <20201223073857.118076-30-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon May 24 06:47:42 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 06:47:42 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131679.245966 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4NK-0000oI-Ji; Mon, 24 May 2021 06:47:42 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131679.245966; Mon, 24 May 2021 06:47:42 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4NK-0000oB-GM; Mon, 24 May 2021 06:47:42 +0000
Received: by outflank-mailman (input) for mailman id 131679;
 Mon, 24 May 2021 06:47:41 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=16U1=KT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1ll4NJ-0000o2-9J
 for minios-devel@lists.xen.org; Mon, 24 May 2021 06:47:41 +0000
Received: from mail-ed1-x52a.google.com (unknown [2a00:1450:4864:20::52a])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id b5e5438b-9dba-4ec9-a789-a65bb47a0c51;
 Mon, 24 May 2021 06:47:40 +0000 (UTC)
Received: by mail-ed1-x52a.google.com with SMTP id y7so13094963eda.2
 for <minios-devel@lists.xen.org>; Sun, 23 May 2021 23:47:40 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c301:f000:283b:905b:cf37:5cad])
 by smtp.gmail.com with ESMTPSA id d17sm7405392ejp.90.2021.05.23.23.47.39
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 23 May 2021 23:47:39 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: b5e5438b-9dba-4ec9-a789-a65bb47a0c51
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=n7Rvx6dAAef1om+Y39GzgDgk2oF6SOUGJiFh+epfCwKLegbLJZpRcds9w8TUUs2rdz
         MgjQ3tw58+Ny6K7L53DyP67h0AVnP1OXxyAs+bVhnSI935GR9NjEsBAVZjoPGvUeHHnw
         jrFHygIIR351UgNL5qOBrn6SL8SFpQEOyj3/KNnQZLVtgNo+hILGaDas4bwUuz8bHirM
         GQoIDv6IJvaVnYhkzdJt1SKDQsp1GWOVxLg4jvlGWA2u7ALQ7iSVcfGMQpDEHq9DLAJd
         /t1LqVkr1uQCbXjVS5Ko5RWCZYYoIl4S3UydK2+K3PVSnWJtXh03EadFZsz6rgRFACDI
         ZSOQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=HKVy+s5H4OSKFyVp95CvdhR/vXE3i5Et00MsqdXWJtqPebpDIti0gi4s5bz+zhOegX
         suTiNbgNOax+jbwegZGfbl28Hy43Nte+g6CkbSoq7pXq2rtfgv9ynciWbkxiTYsKryX7
         6+INQ8kOZ7BK8tYBIIhMvpfnkCVYKrRbZ5/DyGTfYwvTqbPSlMqkIkmt6IxNqgihS72x
         Mg7OI9J/yJxH0OnZgJ5wL8fl/ww5JiBKdJp2Y9IEjciOOjhEJyPFbxsGECzCG35AqxvT
         L47pNMSTOR+2TVtECOyKaPycB2kw57xIBNtS0v+RHOoz0/aft4ums3PpFQpvH93FLBGl
         JyWA==
X-Gm-Message-State: AOAM533FohCoN8B9xN2uwNGAg8MXF3UovvL+Pi8Z0al7GkCxSRSBY/eV
	lXP+8hfMC/RcGAyl7D+CEM8=
X-Google-Smtp-Source: ABdhPJyeuDG7F+De/Ur5drlRbxyO4cHWh/KobTQBN7KEL95lEhY/WtR5y5fgFGtntZ8HgjT5dEr5LA==
X-Received: by 2002:a50:d589:: with SMTP id v9mr24673574edi.126.1621838859664;
        Sun, 23 May 2021 23:47:39 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,30/35] plat/virtio_9p: Remove excessive check for max virtqueue size
Date: Mon, 24 May 2021 09:47:38 +0300
Message-Id: <20210524064738.9427-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-31-justin.he@arm.com>
References: <20201223073857.118076-31-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon May 24 06:48:05 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 06:48:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131680.245969 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Nh-0000t1-Lb; Mon, 24 May 2021 06:48:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131680.245969; Mon, 24 May 2021 06:48:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Nh-0000su-Ik; Mon, 24 May 2021 06:48:05 +0000
Received: by outflank-mailman (input) for mailman id 131680;
 Mon, 24 May 2021 06:48:04 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=16U1=KT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1ll4Ng-0000sm-Pi
 for minios-devel@lists.xen.org; Mon, 24 May 2021 06:48:04 +0000
Received: from mail-ej1-x62d.google.com (unknown [2a00:1450:4864:20::62d])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 169065a1-eeb2-4964-82f1-0691dd57ea84;
 Mon, 24 May 2021 06:48:04 +0000 (UTC)
Received: by mail-ej1-x62d.google.com with SMTP id l1so40051293ejb.6
 for <minios-devel@lists.xen.org>; Sun, 23 May 2021 23:48:03 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c301:f000:283b:905b:cf37:5cad])
 by smtp.gmail.com with ESMTPSA id i19sm8815656eds.65.2021.05.23.23.48.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 23 May 2021 23:48:03 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 169065a1-eeb2-4964-82f1-0691dd57ea84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=JDqHXlLwZI6WxXSQNhPmfK9HR90cXpt8lbN6eglPYKdVb5EgHaNVlj7M2N+acekIWP
         bMwgfckoPeEz1lBZASVrqgGpuAAw1zPb0Fh/RVyvK+Ul7VHujfpxLl8Tc6RYE9IkeIdZ
         OKpDu/6O+jpNwSzvOY7ZL62jN7pVp70rZuECo9bflzsa2Sx/QSkk4kmyICre8mBZyZhc
         PwspsjIx2SiJ7DF0GrDPuFk8ykTtR+Qz8vfgY4uZpHtx9qKdDKmoPil4Aqvdv/W98gVD
         TW5nW6HLJZcxkrJAk3EmU8yRVMlTguFhrusH/07puntzEf+1Iqd7GWXmkwrMMOvV9DsS
         /X4Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=MHgF0AmO7ysXoLvsdS7BzaaxJpHoILb/K1YOZhPcVbs01r2tY3AOW87G2f7ltBYeDJ
         eR7FVxqYFuQU2GjlvmoNGCDXLTMNk7wgW+Ze2HGsLg8WvvkuALz14cPES6lriK9W4guB
         Fokbtng/eudU/nwkrlL87uPSCBTTWA8y3TcVCfdWhlvEMhkGfaNF0KcubBxKG5aC89Sb
         r+QEDxOeqSO5xRDzUdz/duVqgErETWnFba3Spzu8wTSuz/uGLIbxashfH/siHDWkO1Ws
         /Vavihu1U9I5cOMUeb7t5zakBj1hkvAPRtaHAdZvPKc5hbhgz30PrtgQVNKeB4GBJ9mJ
         GaTQ==
X-Gm-Message-State: AOAM533NXIAlP3ZAak+UknO35xVqfl3pKT+mRLkl7xVujvKZklU0US0M
	v407X1CJJHV5SiqnNUiAHjo=
X-Google-Smtp-Source: ABdhPJz9LTZdixIbdaKDnvqUUZGPJNSKMzNOyIQ4/n55v/CuVQadJjK/EQi3oakzoq+n4G9/mu27rg==
X-Received: by 2002:a17:906:d147:: with SMTP id br7mr22292777ejb.272.1621838883143;
        Sun, 23 May 2021 23:48:03 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,32/35] plat/arm/generic_timer: Fix assert in ns_to_ticks
Date: Mon, 24 May 2021 09:48:02 +0300
Message-Id: <20210524064802.9492-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-33-justin.he@arm.com>
References: <20201223073857.118076-33-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon May 24 06:48:16 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 06:48:16 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131681.245974 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Ns-0000x1-Ns; Mon, 24 May 2021 06:48:16 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131681.245974; Mon, 24 May 2021 06:48:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Ns-0000wu-Kj; Mon, 24 May 2021 06:48:16 +0000
Received: by outflank-mailman (input) for mailman id 131681;
 Mon, 24 May 2021 06:48:15 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=16U1=KT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1ll4Nr-0000wj-Rt
 for minios-devel@lists.xen.org; Mon, 24 May 2021 06:48:15 +0000
Received: from mail-ej1-x636.google.com (unknown [2a00:1450:4864:20::636])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 7b56e82d-00f9-4741-ab96-345af83b2c1f;
 Mon, 24 May 2021 06:48:15 +0000 (UTC)
Received: by mail-ej1-x636.google.com with SMTP id c20so40111388ejm.3
 for <minios-devel@lists.xen.org>; Sun, 23 May 2021 23:48:15 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c301:f000:283b:905b:cf37:5cad])
 by smtp.gmail.com with ESMTPSA id q4sm2174770edv.24.2021.05.23.23.48.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 23 May 2021 23:48:14 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 7b56e82d-00f9-4741-ab96-345af83b2c1f
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=OwiQky0BrmFsPgoVP+nEIE/pgFXPdCaKNk/igOMCtLPzEEtjJQDM/QP5dzeNT1+DDZ
         zEkBjNPprH+AncLtyELVfXHzl1MK0auvNtViSUrvNH/6aDP2lfHEGPeiqdOFNZQwWYaq
         azwg2ItUsddvIn/ATetRCDCWNxFe8OeUwS1fLBHJ7AK76DS6uysEza/Y66EZOnRkQC7y
         3x/Rdg3cXibDMVxxHoT3dXN/9WE1ChZ5cJ6neEB2wfZn1SC60COFGDfj8zNVrYNgqolu
         603Vk7J7K3Z1pf45uznrE962YsUgeokAWOnxraYLDulQyItQ5Zdy+zRHw4I/FMy90hvn
         ZTRg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=Z9nPAkTvVGFLKjpBSZq0dYI4+y/6o4kv9BidoxkMQvqqa3MEmum1XxEYvfweD2hZGi
         /msai/vQ9+D+FTf7X7s8Uge330mf6WD5fPkfbQJFEemNHisontc3rzTMvS7oa9WjA81M
         UN16Y3SqTbUJkSuZGgtz/kk4Xz2klppA1oQFCUBh/i6kE2TkpZ3cL23bJQxTW2EVVTM6
         gKXjFpoA0peWXAyoNnXZge7yKeZERYQpwJa6XMDu0b0G93Gf/Qd8JMpj0aEijBqvZa4G
         jvw7VCAVaMBoIW+iOpjwKzFPJAwJNubXzbjdhgKmeFtuVEYjzke+f+Vpt2EuwtRH/t4w
         bQug==
X-Gm-Message-State: AOAM530KU0HedI1kCvedoHyE8bEnjHUWPMex/2GY1LCl9iT+fFryyb7Q
	whc6Z24BRcvsHnKOCPZnsdTpt54fIrU8EA==
X-Google-Smtp-Source: ABdhPJxLKbizz5GVFrItAloSJte90vhZwv1YO23EqclcnHzhhRA6culR2PLIjGWl5CaPJldaPu+ykA==
X-Received: by 2002:a17:906:7e51:: with SMTP id z17mr21729227ejr.2.1621838894379;
        Sun, 23 May 2021 23:48:14 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,33/35] plat/kvm/arm: Fix x19 corruption by interrupt handler
Date: Mon, 24 May 2021 09:48:13 +0300
Message-Id: <20210524064813.9543-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-34-justin.he@arm.com>
References: <20201223073857.118076-34-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon May 24 06:59:17 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 06:59:17 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131682.245977 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4YT-0001tA-Ct; Mon, 24 May 2021 06:59:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131682.245977; Mon, 24 May 2021 06:59:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4YT-0001t3-A5; Mon, 24 May 2021 06:59:13 +0000
Received: by outflank-mailman (input) for mailman id 131682;
 Mon, 24 May 2021 06:59:12 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=16U1=KT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1ll4YS-0001sx-AQ
 for minios-devel@lists.xen.org; Mon, 24 May 2021 06:59:12 +0000
Received: from mail-ed1-x52f.google.com (unknown [2a00:1450:4864:20::52f])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id d3c5528a-a653-4695-bd9b-38fcee0ff83b;
 Mon, 24 May 2021 06:59:11 +0000 (UTC)
Received: by mail-ed1-x52f.google.com with SMTP id df21so30663852edb.3
 for <minios-devel@lists.xen.org>; Sun, 23 May 2021 23:59:11 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c301:f000:283b:905b:cf37:5cad])
 by smtp.gmail.com with ESMTPSA id a97sm1997563edf.72.2021.05.23.23.59.09
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 23 May 2021 23:59:10 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: d3c5528a-a653-4695-bd9b-38fcee0ff83b
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zFOX/aOAln3FCwX9y43QtCAOmU3DZxU1c1RvMVrBMnw=;
        b=kKjchYjqiSr1WZWY8FWLnLhRgZh8hCh9Q8gRIykpfn38A0XUaaFKAiLMZMP7p93Rn1
         b+cULke/tzb7SO3TZ+4w/4C05ARoSiWMd3IiAy/EFwgvbT21GCJk46oWq8hZ8a1tjF/M
         vZF8GIB7iy+nba803ss0di9Vlyt1PVWox/Y5f0I/03jArHhGDFA+Ip0/IXcNEwO0PCuk
         6Mfyx8kRSEBiSaonhClueIKRfb5mIMvIIiAONhemZhRYLmxXqy7cmV4gnDl5gsTeZ3LH
         Apd9P9m9Iu3bhnKYqVN6dmvbij8piHRZFNHAF5MDPlRh0Vn1QN2hB+54roKUXFH4EYbD
         6HlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zFOX/aOAln3FCwX9y43QtCAOmU3DZxU1c1RvMVrBMnw=;
        b=Ii/ipV8Kmqk/1dgWsLgttqubQOnFWbux44BF8b4y1EGWTLH5gslEqlMMbzd3z5WShY
         +FenTcIOZhhRCImh1uzSevnusB43kfOdchxhmr3DvxsW0q6pf+XjQxjbkywdG5c0rYcO
         n8r79rOU92MeWUrPJuswevyxTI4AYTE+0F6YNRjhvlgxKve3gks8MnP+1S0ftmg8I8yr
         Csi6mOIDolc4QhvTA7wodngjzmu2Rsy2htbykQPSXOKmM1zPncRgx2Av/l0vi2Ci25ws
         CkA3NtxQR1zPu7Jx1Fz/LRSlL90m9JBzb1neYue0VGbRkgzs/3CSDBEw9TXVcmGVxdc4
         nQ9A==
X-Gm-Message-State: AOAM53368soGDgjN41WAs/8TPzFg3Re6MfH93ZbzKgpe7cMycse47T71
	pKbbz07C4KBx0+GSLjHuVBM=
X-Google-Smtp-Source: ABdhPJxxo0bJpY5P62lKNHaRR+cIlztiwdS74kpXGKJh38W8NTsGplh/flQS+YzgRx7hX/HZL+ftIA==
X-Received: by 2002:aa7:db93:: with SMTP id u19mr24102025edt.227.1621839550505;
        Sun, 23 May 2021 23:59:10 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,34/35] lib/posix-user: Export several posix-user interfaces
Date: Mon, 24 May 2021 09:59:08 +0300
Message-Id: <20210524065908.10221-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-35-justin.he@arm.com>
References: <20201223073857.118076-35-justin.he@arm.com>

All good with this patch. (I think the symbols introduced in `exportsyms.uk`
are already there in the latest version of unikraft).

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon May 24 07:00:18 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 07:00:18 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131683.245982 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4ZV-0002gz-HE; Mon, 24 May 2021 07:00:17 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131683.245982; Mon, 24 May 2021 07:00:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4ZV-0002gs-Dy; Mon, 24 May 2021 07:00:17 +0000
Received: by outflank-mailman (input) for mailman id 131683;
 Mon, 24 May 2021 07:00:16 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=16U1=KT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1ll4ZT-0002gm-VW
 for minios-devel@lists.xen.org; Mon, 24 May 2021 07:00:15 +0000
Received: from mail-ej1-x633.google.com (unknown [2a00:1450:4864:20::633])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 333e4bc3-3f94-4dfe-b7a5-154d476f7b67;
 Mon, 24 May 2021 07:00:15 +0000 (UTC)
Received: by mail-ej1-x633.google.com with SMTP id p24so38855295ejb.1
 for <minios-devel@lists.xen.org>; Mon, 24 May 2021 00:00:15 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c301:f000:283b:905b:cf37:5cad])
 by smtp.gmail.com with ESMTPSA id ck28sm1571735edb.63.2021.05.24.00.00.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 24 May 2021 00:00:14 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 333e4bc3-3f94-4dfe-b7a5-154d476f7b67
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=MgC+kG92ZNjt6KFHqduPGiLnMjSNLzlqnoKkuyMXNPTaPq2SGW0vlsCBNnkd/569TE
         uS+pGQEObNGn1wT2GsaqndfNvlq8XxO5LJRyPQ25nx3rpRxkVvUXKTH87q17t8tOOBIo
         4sS9Wwp5IfgKqu/su2VmS5ZlPdr9pwA2RsLoDm5IS0E8XCTB44PWQ/h6/fFk/fuCGDSH
         r246FRb6rmci1LarmPVRShUY0o7W/GpYaf8BacD3os2DnoaeMbyBySwhF3RzpbdmjmuU
         pkh8NTEZ2lwDf/1uQl30jYCXajYlwOiKTN76icISoq68wVHVu/s8kzg7ELekySrGir9b
         l8hA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=r3sXCrhdbpy3YMR3Tao1lx7ZSlFhrhN4E+H3X4opStU1DutE31E9rs7xVcmW4rAoDy
         Y5S93TLb/TRNgMwejQSa9lKY1E7nq6bl5cFw8CKmxmMhcbsPFRGcGulqV5vkInUgoWNz
         1h8/5whR5Z+TzJ1XPEkieR0IlLGbDCmjoTD486JDNsNmjrfp3T/9GBNyRQ13Db+Thxhd
         XixU2C1B9U0VP0ONXA8HGG/0c0MG6y8+FwmnGOHCkPIR/ukLf0BQax274kKjHSy0iu1p
         aQOtMF9Llw0IsFiNphvw7x+Ki4FjEPVBUFUSr8FdwmJj8LdFzesXxDEM7UN+TvL/7J4D
         MJ0Q==
X-Gm-Message-State: AOAM533T2nLf3Mi2BuG0gxMBzM8dsvd8jOnISdA6866M+X/VObtdTKs+
	wqHOzsULxhwOq1OCwD8+q7RyUnxTJ/3OHg==
X-Google-Smtp-Source: ABdhPJwB+Qlj94bB43gNkjQyUu1tw+4nFf6eUto+7LyhpdbqLn2CNFGuMFrfm/KzOgzOOGxilJGajA==
X-Received: by 2002:a17:906:f896:: with SMTP id lg22mr20655883ejb.170.1621839614388;
        Mon, 24 May 2021 00:00:14 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,35/35] plat/virtio: Fix the return value check for virtio_cread_bytes_many()
Date: Mon, 24 May 2021 10:00:13 +0300
Message-Id: <20210524070013.10374-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-36-justin.he@arm.com>
References: <20201223073857.118076-36-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon May 24 07:00:45 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 07:00:45 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131684.245986 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Zx-0002lQ-Jk; Mon, 24 May 2021 07:00:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131684.245986; Mon, 24 May 2021 07:00:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4Zx-0002lJ-Gl; Mon, 24 May 2021 07:00:45 +0000
Received: by outflank-mailman (input) for mailman id 131684;
 Mon, 24 May 2021 07:00:44 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=16U1=KT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1ll4Zw-0002lD-Jj
 for minios-devel@lists.xen.org; Mon, 24 May 2021 07:00:44 +0000
Received: from mail-ej1-x634.google.com (unknown [2a00:1450:4864:20::634])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id cfd2a9ea-e892-4ed3-bf98-1535a9fa9032;
 Mon, 24 May 2021 07:00:43 +0000 (UTC)
Received: by mail-ej1-x634.google.com with SMTP id et19so33066777ejc.4
 for <minios-devel@lists.xen.org>; Mon, 24 May 2021 00:00:43 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c301:f000:283b:905b:cf37:5cad])
 by smtp.gmail.com with ESMTPSA id bh2sm7477406ejb.80.2021.05.24.00.00.42
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 24 May 2021 00:00:42 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: cfd2a9ea-e892-4ed3-bf98-1535a9fa9032
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=nb6gnR1KWq1vR5y4yHSvD5QsRa1VlbVUCWiPrKYZxAr1/0UUIcKcx4+Wn8ghnWa4RU
         vPU4hZpuAEW9pKLLSgYOreJmxECxNNIbcyyiT/PK8BYaAVoJ/9u9ZVT4ugMx34hHA1NT
         mGh1ds5DMxY8Z9Uap4Ve6FfC+yZ1jMAf5FXyeiWDBwPM0W3ow5z0xySwvSXoP60HvN3W
         AN0jpC18OtebO8VDpD0xRK3XXP/owkHnD1IlJcvZC4nzQdddbT1/1abdg8jJ9ZnGz5vg
         VSs/oVe+wl7T5m56rXoEHSE7EleBI2iv5YO1vOF+R7hHpnepyDtpFkK71x0K04VHO+lj
         5ekQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=h9QJD7MOn7moNexz+hNk13rC5XYrhK9BgXsfzfmBbHyDv5RpmsIBTvHnxCfbIfOsj5
         hSP/MhMtIBEsqmb4OL9tH50vNsl155uPqI40XQWXzKTbNgKE6x2nMVCbbYNDIFq7Kbxm
         l+Vsi+wsd+/TMnLsAvOEmUDnqTwXlnn6k8SKK1O7lWtJxIZnm8qLi9SSlm4KJFc/9mbs
         MPKzkDQXZiZX/MJJ+b7iIzwfJcxq1UktUJWStwzWVlUUr3lX8a9rtoVmE+Ljyse6RX0T
         6hBOete8FRlRb1Juhj0M0X202viXHaN5sXOSregucRQ/dCKYd/zIjG7WeE1Dj16XMv2s
         i1jw==
X-Gm-Message-State: AOAM533V2LFjC3vIVy7EAYRWBK5VylzurvP45S5GKHlILsBgsb/qX8rL
	7m+SmFI7D0jF6VzHM1AH2MGQx0Gg+T8bjQ==
X-Google-Smtp-Source: ABdhPJzT5oFY/7x2W05fCNxXT5jee19Yb8nSzSDQz/XQw1oOqI1jeah7XjGfX74vfIy3GbxJQejXLA==
X-Received: by 2002:a17:906:5617:: with SMTP id f23mr20981741ejq.298.1621839642968;
        Mon, 24 May 2021 00:00:42 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,24/35] plat/virtio: Fix virtio net device mac negotiation
Date: Mon, 24 May 2021 10:00:41 +0300
Message-Id: <20210524070041.10428-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-25-justin.he@arm.com>
References: <20201223073857.118076-25-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon May 24 07:01:46 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 24 May 2021 07:01:46 +0000
Received: from list by lists.xenproject.org with outflank-mailman.131685.245989 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4av-0002rm-Nw; Mon, 24 May 2021 07:01:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 131685.245989; Mon, 24 May 2021 07:01:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1ll4av-0002rf-Kt; Mon, 24 May 2021 07:01:45 +0000
Received: by outflank-mailman (input) for mailman id 131685;
 Mon, 24 May 2021 07:01:44 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=jPO2=KT=arm.com=justin.he@srs-us1.protection.inumbo.net>)
 id 1ll4au-0002rZ-I4
 for minios-devel@lists.xen.org; Mon, 24 May 2021 07:01:44 +0000
Received: from EUR03-VE1-obe.outbound.protection.outlook.com (unknown
 [40.107.5.76]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 782435a3-39b9-47b0-9bd5-32d82ff79c23;
 Mon, 24 May 2021 07:01:42 +0000 (UTC)
Received: from MR2P264CA0181.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501::20) by
 AM6PR08MB4535.eurprd08.prod.outlook.com (2603:10a6:20b:74::14) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4150.27; Mon, 24 May 2021 07:01:38 +0000
Received: from VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com
 (2603:10a6:501:0:cafe::ef) by MR2P264CA0181.outlook.office365.com
 (2603:10a6:501::20) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend
 Transport; Mon, 24 May 2021 07:01:38 +0000
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by
 VE1EUR03FT040.mail.protection.outlook.com (10.152.18.210) with
 Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4129.25 via Frontend Transport; Mon, 24 May 2021 07:01:38 +0000
Received: ("Tessian outbound 3050e7a5b95d:v92");
 Mon, 24 May 2021 07:01:37 +0000
Received: from 47ee93bad067.1
 by 64aa7808-outbound-1.mta.getcheckrecipient.com id
 2B308450-7761-4AE0-9692-7D6A596EC2C4.1; 
 Mon, 24 May 2021 07:01:31 +0000
Received: from EUR05-VI1-obe.outbound.protection.outlook.com
 by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 47ee93bad067.1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384);
 Mon, 24 May 2021 07:01:31 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com (2603:10a6:20b:bb::21)
 by AM6PR08MB3606.eurprd08.prod.outlook.com (2603:10a6:20b:4d::25)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Mon, 24 May
 2021 07:01:30 +0000
Received: from AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60]) by AM6PR08MB4376.eurprd08.prod.outlook.com
 ([fe80::18c4:33fd:d055:fe60%3]) with mapi id 15.20.4150.027; Mon, 24 May 2021
 07:01:30 +0000
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 782435a3-39b9-47b0-9bd5-32d82ff79c23
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=89qnvRbMTgXHmz/6pOHhKi72hF9tMTYZgBfTS8mKgDs=;
 b=Ydws4PpubZJ3kcnViwF7tOJ2j6iwkmtnt6Fiim7jiER/hq8jtvJjLVjJo1LyRe07LPf2FteURANJDXGXL8SnRUrmjYMU1n7xY7WPjbhQRgsU9dTCyQJerGT5yIa4SVSTcFuPp8M3W4E8kUY0cAhwIlYEBCcCtQUXqwjP6YqZV2c=
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123)
 smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified)
 header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=pass action=none
 header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
 63.35.35.123 as permitted sender) receiver=protection.outlook.com;
 client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
X-CR-MTA-TID: 64aa7808
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=TjoMXsrxqV1qCPsk7dD1AfjXCgTHJyByALgqtJGnbwV7UdaXyxUrs0xYwz56XMrv/4QXKw7zGccmoICUDL66oYewcHREekCfZ2jYlreCvsxBT5hGZXSyZ5o7Jtiastr2344XHtMle/0LvhAgqdU+QwrAewbDneHvqg+p4NsF63Irj4Qe9aMxNeWsVgUwWoiaplyutcYPdW7ILnEyZGUIUMt0UxmndbNlIr5Z+vpyQPud6Cbk7dtFoWR9IW+EqgoBTAIgs4EFbPKv45oodLEhd6eZgQs3xLQD7/P/TqiFF7T/Kh8beBBfJZGRz5hwWVb5rSNu2okrHkkNZ6Qq+/MXVQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=89qnvRbMTgXHmz/6pOHhKi72hF9tMTYZgBfTS8mKgDs=;
 b=I9S4HCvGBQNLOYhPSmwy9qzXjhxKaJAz76ERP2QORZS8r72tkerDdu94DNxFa/5ke0lqVQFgTgyUPGjqTr2FhXvyhaAnzgfWRP/0hxvX5MGLqL8Tq5bPHHHw08n2YZ5pUyCdk4/6t9tjB5caAgghtA66B5PR/z2LZgGFq4bGUfQPPDFgjfP243pMCMnNhmwCPumuXwm2ls89uMTqJfYzNNh3wgS8jPYLkY6coZay0JlX8ASx0AqERnzbOV3iByqF9C696UdtX9JhDaEIm4x5SFv/Ep1W2cVqXuOinorluihZ0aDQLsoejsVWoxb2+mD7prEdOhBn0no20Uwq8/vw9A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
 header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
 s=selector2-armh-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=89qnvRbMTgXHmz/6pOHhKi72hF9tMTYZgBfTS8mKgDs=;
 b=Ydws4PpubZJ3kcnViwF7tOJ2j6iwkmtnt6Fiim7jiER/hq8jtvJjLVjJo1LyRe07LPf2FteURANJDXGXL8SnRUrmjYMU1n7xY7WPjbhQRgsU9dTCyQJerGT5yIa4SVSTcFuPp8M3W4E8kUY0cAhwIlYEBCcCtQUXqwjP6YqZV2c=
From: Justin He <Justin.He@arm.com>
To: Razvan Virtan <virtanrazvan@gmail.com>
CC: "minios-devel@lists.xen.org" <minios-devel@lists.xen.org>
Subject: RE: [RFCv4,34/35] lib/posix-user: Export several posix-user
 interfaces
Thread-Topic: [RFCv4,34/35] lib/posix-user: Export several posix-user
 interfaces
Thread-Index: AQHXUGpVhC2tMPazM02sJLD6R3e6hKryM/bA
Date: Mon, 24 May 2021 07:01:30 +0000
Message-ID:
 <AM6PR08MB43764E2120CE481568FD5897F7269@AM6PR08MB4376.eurprd08.prod.outlook.com>
References: <20201223073857.118076-35-justin.he@arm.com>
 <20210524065908.10221-1-razvanvirtan@gmail.com>
In-Reply-To: <20210524065908.10221-1-razvanvirtan@gmail.com>
Accept-Language: en-US, zh-CN
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ts-tracking-id: 257F5A6ABF350C48969E2B124F494243.0
x-checkrecipientchecked: true
Authentication-Results-Original: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [203.126.0.113]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 19cc5d7e-0bd5-40b7-afc6-08d91e81c6b9
x-ms-traffictypediagnostic: AM6PR08MB3606:|AM6PR08MB4535:
X-Microsoft-Antispam-PRVS:
	<AM6PR08MB45358BFC83C9644444C836C7F7269@AM6PR08MB4535.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:5797;OLM:9508;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
 qTbkwGnOMYk7GC3gm346nl4V0ucEmm09phIPm1ALR1nZJBB17QvEiWEFcZuAEEhfSYTTbySOpRvoHIQsa0BSwR93xIuPV+7RX1gFnd+a37ctU0NIwt2z+tiz20pLqmo1vo85Y9ayPRPxa4impz/Zf5BTGxCayXcVRe1+YcaV9JYn5bpcD8s8baQ2mETq8JCWh+nLgYZuFm6/SDckhDM1vzoW5UBgYMCx+RebnVe3kfGQgB+ueKMnwsK2EKzGsMGQoQ9pleeuFGPF/GbZcHt9WRkh5fIOGaS/BjiQ5e66a3FroF0HyHuIj0uqJVawal8qjXasVDd8EGFoAtwOg+Wl1xGxczCz7vNxcUCmsWRu+sniLecYCM+3puoO7lcGJe2znihd0VyncIxWvn/jk9eHu6tYmfi1X0FExh1v+gaGgWnrZmm9jloAJGBtEJZ9hssgS8eqW3N/ytYG/xdg6uCyrwq2DC+mcRXojBOMer7DkrTn0oeRbcWtyljg/zkES6pUzJq9/xZ1pQKbhT3NBWTptEUuyE4pJChCuCWsMEjMpLuiBztd9j4i6XTq/J2bX5j5CN81ODkbYdSmTslZlpT8SZEw0KA1dey/1yMIRUWlETg=
X-Forefront-Antispam-Report-Untrusted:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB4376.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(5660300002)(8936002)(9686003)(478600001)(38100700002)(186003)(26005)(4744005)(53546011)(83380400001)(8676002)(52536014)(7696005)(122000001)(66446008)(33656002)(66556008)(55016002)(316002)(6506007)(6916009)(66946007)(2906002)(71200400001)(4326008)(66476007)(64756008)(76116006)(86362001);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata:
 =?us-ascii?Q?aaQJMr095o2DR0lXhpEpAtEDlhPEu5D/WxgKn10b9dubzjVNrlahf8xuG5W+?=
 =?us-ascii?Q?r05fLXybZueOJnRmK+sav87yatECOWkKyLGsuPOj9TeN48C4U3QP2PIiykHw?=
 =?us-ascii?Q?xne02oOKoH6hubenEX+JprSJ+OtYpbHf/P6dvn/TbhCPTDaOS/TScdjAAbG0?=
 =?us-ascii?Q?JNFMdMmlv+0py6STlldqCFhVNPG0URM05YNPfTiuUeAzIwSNPPKA+iEuIDl5?=
 =?us-ascii?Q?odSnl+C+FdkpcoMLdGC29Bv6vsHdrQOIGNJyroy+ZYk64bZUAnsDIu48ER1z?=
 =?us-ascii?Q?EjS4lMVv8J7WNMqzXqAennfFW4k3OgnWodZS7Af7TPZHMpRKtACW470hAa9B?=
 =?us-ascii?Q?VWZqYF2eIsRAZCRbewCJgpUq0Uiju6UTgRaSt/z47frSV07Imubaj6BqNs/M?=
 =?us-ascii?Q?glESLei92DojQz9e7M2VDhYB/olSbx5Oqk3tZx+JsNQ03Md+cDtIvHwdpS7L?=
 =?us-ascii?Q?cJdQDALL2sjZzeqW4ovVtH9HrbgYEf9vXkFLSynNO3PGLz3cz90867YuS/AV?=
 =?us-ascii?Q?kjoP4CAR+k1Apb+XNTH76MZxfjFbnWRSXVLtaIQOXGrvTIsx8IG5va1ASSAH?=
 =?us-ascii?Q?iMy4s42BCYXvs1Bjs4yz40oluB5iht2zJTEdIstwWSQsjTOWtbLrq1DcFPAu?=
 =?us-ascii?Q?dBApxgrh3rq2uotTA5U1PpeHyq5ty6+Iu38nqLDP3QREEmf+bVdo/fL+mNFc?=
 =?us-ascii?Q?Sp1sXKzCDlKt2IhVBCqUHUqucNYv5jnPQMcILgCwkcNsZw79iz55Nk0WMB6M?=
 =?us-ascii?Q?F8VI74QNl+h+MFhtZpGt2xVT8Tl8o3HnjVb9f3cQQv42ocA8yE7mj46nYtUY?=
 =?us-ascii?Q?wTIh4RdIn376+jnfv2cqek01nm1Mn17zrXhphUdeMKBVg0t4VNdKLj3OrIzT?=
 =?us-ascii?Q?P2RkSJky3WhuTWSCZtbJs0OgbmuEdtAtR+2JVZssDFlfogSAaA6knT3askII?=
 =?us-ascii?Q?QLYBoB16zXmry4VdrV3IO8+kjNc/GG30hN/aaBAquinCQeJY6RHLJebdmhMv?=
 =?us-ascii?Q?cDEfPTzcsuljXA0vzu/lLj2NKCNiZmrD+CjAaEzG4Ifay1kOsY4c19MKtShx?=
 =?us-ascii?Q?jcFUMAi+vEgnZ+b6F36aKkOOU62MoqV3jePZhqzD1PBW9AZwH8B4jeCiZzl/?=
 =?us-ascii?Q?5I2mTpz4M+F8aJuCigu4ZbSm5UdpIiJpbeIpSCva7ZxuexrJhswlKStld9tm?=
 =?us-ascii?Q?SV1SgoBgZLL5N/uGSOGOYIXxjB3379XxAYfTxrq8/qsyKVbY5AkeSEm8eQXr?=
 =?us-ascii?Q?JbCahnH4Xil/KqLQzXi9Io4YoBAhBwjR0ztYFeFQv+NFQy86/u3OuGk+SbUy?=
 =?us-ascii?Q?t7JiAdXcVCUnRUKZYMLeBBiC?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3606
Original-Authentication-Results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
 VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
	14a0e888-736d-46e6-4432-08d91e81c1de
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info:
	7GGrAe+RBpA1o2+fikqsx7KXQAWJhMe70T3OwWdcZUZW7rvqTJ1oaR37eMH5UZZW7h4tGhknvuStFajbsxLGyD49Fveg1j8PnNpwJFbroEiDRx9uvUbkf9FYqri658gkjGWq+8zPiLRTpu/Nu3tQP+l+pkBw6ljBzygoNrEchYD52PR7YVBUZxXJ6xTCDk7XjToAXS9qHWr5TwXk1D68Tbj1BoDqOBjFxMKOETWJwXRGPML1u6u17HPhkOmU8OfywMxq94ZXYUMVUvt7YPPbElr7kVicaFCP8UqyH4pTsraNr3K3SVMFmzIAbvqOrvmwpq5WbuePxUQbi6BvX8bKHfQzw7oC0c7ddT/PSIXMbNx5nS74sEgxoFgUo380ftiUSrlUwOFIVpAnHJQRAGjl+bAwK1sFqDHEo3nsNhqvsjADwa5UYQJaSC2AnMM111D+V1QkSinTZSFnNHBCoRKQUMvoeu83kCvN14VC/mY+VBiYyKOj1fRACR8O+tSGkVZs7CE7Yibs++7jnWk+L9pslypLwWCaUuevj2KGYNyqEZVcM0qPJrsMpH4oa5aATz8cFZ5p3bpg6osrmFE9avQB+GEw3L4f4fye/mHRB6WgL+Xeom6J+mt0sBqnbZ5hSoSK6eCYoW5O02LKCNkb3OQ82Q==
X-Forefront-Antispam-Report:
	CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(376002)(346002)(396003)(136003)(39860400002)(36840700001)(46966006)(83380400001)(7696005)(53546011)(6506007)(36860700001)(47076005)(356005)(55016002)(70586007)(186003)(8676002)(81166007)(336012)(82740400003)(52536014)(70206006)(26005)(8936002)(4326008)(6862004)(478600001)(82310400003)(5660300002)(4744005)(33656002)(9686003)(316002)(86362001)(2906002);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 07:01:38.2018
 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 19cc5d7e-0bd5-40b7-afc6-08d91e81c6b9
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource:
	VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4535

Hi Razvan,

> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@gmail.com>
> Sent: Monday, May 24, 2021 2:59 PM
> To: Justin He <Justin.He@arm.com>
> Cc: minios-devel@lists.xen.org
> Subject: Re: [RFCv4,34/35] lib/posix-user: Export several posix-user
> interfaces
>
> All good with this patch. (I think the symbols introduced in
> `exportsyms.uk`
> are already there in the latest version of unikraft).
>
Yes, I had dropped this patch in v5 (github commits) since other developer =
fixed
it already


--
Cheers,
Justin (Jia He)


IMPORTANT NOTICE: The contents of this email and any attachments are confid=
ential and may also be privileged. If you are not the intended recipient, p=
lease notify the sender immediately and do not disclose the contents to any=
 other person, use it for any purpose, or store or copy the information in =
any medium. Thank you.


From minios-devel-bounces@lists.xenproject.org Wed May 26 13:21:41 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 26 May 2021 13:21:41 +0000
Received: from list by lists.xenproject.org with outflank-mailman.132503.247132 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lltTg-0006N1-AJ; Wed, 26 May 2021 13:21:40 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 132503.247132; Wed, 26 May 2021 13:21:40 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lltTg-0006Mu-6y; Wed, 26 May 2021 13:21:40 +0000
Received: by outflank-mailman (input) for mailman id 132503;
 Wed, 26 May 2021 13:21:38 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=PyTD=KV=citrix.com=george.dunlap@srs-us1.protection.inumbo.net>)
 id 1lltTe-0006HV-Oa
 for minios-devel@lists.xenproject.org; Wed, 26 May 2021 13:21:38 +0000
Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 9038a600-906c-4d4b-8bb7-59decc5060a9;
 Wed, 26 May 2021 13:21:31 +0000 (UTC)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 9038a600-906c-4d4b-8bb7-59decc5060a9
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple;
  d=citrix.com; s=securemail; t=1622035291;
  h=from:to:subject:date:message-id:content-id:
   content-transfer-encoding:mime-version;
  bh=doKkTjlCZc1UM9nnVxMCA8Br9hbSuqcFLE3wsnCPEWU=;
  b=eYtt/3AmvgJNSpYdU/hFqtOQo7it4vUTHQkeUC5U0+ZFrA9g0AIylj4o
   ARyTANYhAndncTMIMpdZjpWz/ENknhi7JQZTvz/T7KmVYlrTV8cpHUbMd
   PPZBHDkChjqRt9lnp1P7AQNgYjfzzJxPJDl74oiZWXW29aD0MSCcUBLTj
   Q=;
Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
IronPort-SDR: 18Szh88tIpRBXp/rx33OAKMF1HXDAvCjfwDqsvhsxPpqmf4YwkL9XAMeDxwxTAr4H1oMiaLa9P
 mwoOLPIPfHNJd6vFroO07RKrgROyQ3BZeEeqHLcgBZ92pub+ML/ZVvl3yoygbH9611h6SbCAl3
 5U1HakU689Z9JFqJWPhON0AE/IPye+AcNB+4/8JOpYYtMwxj9WQjlXLAAGphQOQFCgn/J/IEOr
 Z8Fp/Z2UG4S01OrYCiF5QwQvfv73atMf7/LfUrbtgwsaLSy4KUouJWBcOdrFIiIMVCK4D+EfPu
 lZ4=
X-SBRS: 5.1
X-MesageID: 44428694
X-Ironport-Server: esa5.hc3370-68.iphmx.com
X-Remote-IP: 162.221.158.21
X-Policy: $RELAYED
IronPort-HdrOrdr: A9a23:TzzzoqBLrN+BPXPlHeiKsceALOsnbusQ8zAXPh9KJyC9I/b2qy
 nxppgmPEfP+U0ssOlJo6HNBEDyewKnyXcT2/hfAV7CZniqhILMFuBfBOTZskTd8kHFh4xgPM
 RbAuZD4b/LfCBHZK/BiWHSebtBsbq6GciT9L/jJhxWPGVXgtRbnmFE43GgYypLrWd9dP8EPa
 vZwvACiyureHwRYMj+LGICRfL/q9rCk4+jSQIaBjY8gTP+zA+A2frfKVy1zx0eWzRAzfMJ6m
 7eiTH04a2lrrWS1gLc7WnO9J5b8eGRiuerRfb8yfT9GA+czzpAV74RH4FqewpF591H3Wxa0u
 UkZS1QefibpUmhJ11d6iGdpjUImAxel0MKj2Xo2kcL6PaJOg4SGo5Pg5lUfQDe7FdltNZg0L
 hT12bcrJZPCwjc9R6Nr+Qhx3lR5zWJSFcZ4JguZkZkIMIjgX5q3PkiFUhuYdw99eLBmfca+c
 xVfYvhDdptACCnhkHizx1SKYaXLwQO9z+9Mzo/U+KuoklroEw=
X-IronPort-AV: E=Sophos;i="5.82,331,1613451600"; 
   d="scan'208";a="44428694"
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=hHCNfMjcaWCorI8X+JHvLgRcHkB0CulC/wtnfABEF7U6W4FpcMwxT0C6HWYAycFxvWD0XWNtQC32yTKsRb9j5TRiOXVmOrQpyHzbJKxdH6NZBAJa1pPUbA+Xpe+k/7fJAIJ0G8+0lHpb5h/u1xcOkftn14Cq2V12WwWfxkSZ5bRYFxwALFlyYsHb9DVFi/AJgB6SFvb6EXerWEDr+qepr0jneHe4jqKXNHJ0nwY01rbU0ot51cgIUzrhsdAv9Gguq4yh84jq6phrWxCw0vszhI4KjjTPMFPGpKry2Y/zhySZQeoD0kV0C++ZXXa3gtYE0NzxwqWWtjmcwcRKznJ55g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=doKkTjlCZc1UM9nnVxMCA8Br9hbSuqcFLE3wsnCPEWU=;
 b=JlpJgynyMmCNvhMDNmYOiX7hsv3K98cQ0r8mx14k/vzBmDe9AdM7g92AT7q+5OEN8GkMQ+eOHHxDIUMaTm51MHEVf+7Z1dsWQ5OlggZiPqsjBEzbeRHjX63eRXqDH2pQYfH2WUK/zPASWmqOhRQyBDoNyuuhyhEmgAaFTonJCzGJGLIonWbXzfgpnPw/wki9JNvwYtKH6lK59Bk9xdsvIs6BOixil363OCHdpC9jsSktIYsp903nyZrS7sJSFycdOXNnhybKLcLId0AWQBzmRCRB/oVpHXxHhLnieT967dCsXlavST9Mu2uaOsie3o4HsWVN4kcJAFhwnRuWxYgn3A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com;
 dkim=pass header.d=citrix.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=doKkTjlCZc1UM9nnVxMCA8Br9hbSuqcFLE3wsnCPEWU=;
 b=Mq/TkpaVP7+7c0EtzW1A6fwwVD3mkbPuQJwGEQuFm0reEKPmV+psNftpDR3WmK3n7dDqUQCg67exp7KCa+wGm9VhMd4WkdDhA6zjXlPfWa6P63abIIVcsPrKlRROMAi+/N9eqXcYtsGftrXAIyayOnOC3aO6XSBoZZVHrvyxUH4=
From: George Dunlap <George.Dunlap@citrix.com>
To: "mirageos-devel@lists.xenproject.org"
	<mirageos-devel@lists.xenproject.org>, "minios-devel@lists.xenproject.org"
	<minios-devel@lists.xenproject.org>
Subject: Proposal: Move IRC networks to oftc.net
Thread-Topic: Proposal: Move IRC networks to oftc.net
Thread-Index: AQHXUjIIyTIrAL6mBEWFjV3wrZbKoQ==
Date: Wed, 26 May 2021 13:21:27 +0000
Message-ID: <B408BB9D-ECE5-465C-AE92-E59247491245@citrix.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3654.60.0.2.21)
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 85531bad-b530-455d-7b68-08d920492ad0
x-ms-traffictypediagnostic: PH0PR03MB6265:
x-microsoft-antispam-prvs: <PH0PR03MB6265AAEFCB113255E33876B299249@PH0PR03MB6265.namprd03.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: pspAzqr8RZQbGpRub4lUV/oq3+GsxaK/yGbnA5TJJ0ZBVYqBqwf/8S5w6cC4gABOw7uefCcgKVSKCGx5oHgTEAGDeQmrhI8lcljZR93Jg1NTj1SCQzfKsCKdAFjgr6xN3LPHPVgogBV8h7n+Eg5PriPioLOkbyR2dov6PaSrRfVjoWiUQgTYXM3JzRqqFmDWY3ucYHi7feyWDPX1cue2XIcHIh0BATXBh6mhxnWIhWd6HQ69fDkY0L8mhQ3x3e06iGYoHUoYEHnKuOuQFVzYO8JOBLgp+Cs6Ownc0uWz/uor0ciHWk27vn6rjVQH6nsr3fRpmsGzCqeLF0aMgVWUs6rn6GWhxqcgG8uI8/G7pfSgkD8+KgvSFq+lIgU8f6Azf5ldodhayqrhYiuZ/uZmUwzMiQfvDNANWDGn5lH+UotATgBqTosU0wwz457oG2FevcyJ+L6kOQtdCKyrMDlXTFttVftHFN3jSjE1WjntW5QgeKPaa2lw4pzQ2IH8DggGPqZKuaXCrgXDBM6NK9BvvLaLWH79BI9/zdwBLDpDvHxQA1kKsROsEx/X5XXU1gX3qorbER7Hk3+YXY01wqjb4DFW5qod7pG4fsYgavBlWTfa/PUis2ASIe4gRK1WctdUwn0EnboVL+2ZIFzIS6TeItZ4MDvyPhtSk9E2vVA9zKcOQ57Wuxs6njGy5HHeV8WrCHVPQ8Yscjcse1veIK8C+jsroJ78j68jVp/Cwd3QPWPlUpkQsNcmWK8J3pvFrjz5pgOlku+uSJAP/4HNelYqog==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR03MB5669.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(346002)(376002)(366004)(136003)(396003)(6486002)(186003)(966005)(478600001)(2616005)(36756003)(66446008)(83380400001)(66556008)(86362001)(66946007)(66476007)(64756008)(91956017)(76116006)(6506007)(38100700002)(8676002)(122000001)(8936002)(71200400001)(6512007)(2906002)(110136005)(316002)(4744005)(26005)(33656002)(450100002)(5660300002)(45980500001);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata: =?us-ascii?Q?XArKsPrkWV9BxTdWENTbV0KzhGkn8EYO+nEw8QFu+RxywCe2dBeeE02Nv0GO?=
 =?us-ascii?Q?wr0Whdk63YFvbWMAEUDTfM1NvDsQ3OkuPp7MRAEJood8PALXJzYwgugzozQ0?=
 =?us-ascii?Q?wKD8sY39T7/i/2F70QaOZa5t/2ApqRnECQNBNtpxi6azt/BpoQV0gBG6rOQA?=
 =?us-ascii?Q?tZHiwZVgCbYodufDED95ZU/b4l0s3JZ1zMRt2eV9PP75Cz59Ta8MwF/F4BC9?=
 =?us-ascii?Q?Q4RKxgsOkyR+dMhKGLFzAuArEGw0dzsTzE2JyhdTuyV7nYbtdSybYUvPMgLK?=
 =?us-ascii?Q?r/sMRO1eRyo3uBhHQKjum4L+0A1oEa35DMw4DeNCN6hDh10dwd8EtbUTU7T5?=
 =?us-ascii?Q?Gv4Jk7m8qbWkbM9OmAdTHYFC3plGJ6bAQZbvFccSkeFRPw+mBc+jtAgkpnQe?=
 =?us-ascii?Q?3liapi3GWWyWg+DuCwS4ajzUyg70rDsXqYgAYtt+MSzHZzwBQ4MRghFBjVI1?=
 =?us-ascii?Q?ik3AGtx8FsLojvVSwE5DLLHCbApk07ldFQeEjTLum6rf9M+I42DwpP3kggTz?=
 =?us-ascii?Q?1eIXGPi1X1A+rBmw0LTIsTfw6pzL4BUPYMUtrDaKrJgYP2MDZtGyVVitXzzn?=
 =?us-ascii?Q?a22fBqPT5LGnH35OAbtB1gky7Yje+3Ja51GPT05chrSvdLsamZQDwK3rjhl5?=
 =?us-ascii?Q?GKCLdlTLOP65BEOQKo7iCiTzulKhGI/2DrnlbE6E0fLkvzF4uYlX47eiAiYC?=
 =?us-ascii?Q?6XfMFJ5jkM6C4BNa/1A91dVT2SFeozLlmhtRdvb+s7yYVGBB5QJ00O9htXnN?=
 =?us-ascii?Q?LeWVKS6BDc7HhsuOE1+NfJdZ+PV7Cfyeks63YbyQsUmo2TehSC77HxmHt2uz?=
 =?us-ascii?Q?9LkkLk9a8gMwQYnGoDfL/7uJQWLxzgl0QoXMAA0VcdW8d1xeugWRLP9KPGmw?=
 =?us-ascii?Q?lJWMypEHkVWx9Rwgcq7CuBvzCsptPMPzmq2Yi8y4gB8Si64dpxW5OFFUlnv3?=
 =?us-ascii?Q?3O0v4bl1dvj209OPnQOcLwYSdhI8t6waRpFDyw0sHz5SuGk/Fr+FDkoH6rK1?=
 =?us-ascii?Q?rQy4ijASAo73Q2PLbTKwHYKQjIGiIqa8ttNGPNvu7j5RJ0UOqoNUWZp5jNth?=
 =?us-ascii?Q?hMQB0fmzxEl3IZQEsxxPaHd6ELIgiPAJ6562psJyKUBbLYc7xnsO0GU/8FZ4?=
 =?us-ascii?Q?nPPh86L0RWrWI5nkYp6UpPkD/3EsTlhFL97kuiCnrE7qZLW8rZ0awGddavhi?=
 =?us-ascii?Q?fDzVDbzoWGqoQWQPW56fH9neAZSFBcTllVD6Ife359oyjAwXQ3R6XEG0iMPr?=
 =?us-ascii?Q?PQ7Bt2y/j1qNBSvRqk9jnz/wAEVvPSTd0ZfywBEB17qKYpuBNtuaGn07CQS+?=
 =?us-ascii?Q?R0Pg+P4AbCfB8qmgfXgdasX2xmqkOq6NA+eOXPYw0ZuwNw=3D=3D?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-ID: <7F51BF4DF9BE2240A87E601C2D0CA13C@namprd03.prod.outlook.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH0PR03MB5669.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 85531bad-b530-455d-7b68-08d920492ad0
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2021 13:21:27.1070
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 335836de-42ef-43a2-b145-348c2ee9ca5b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: VZSZzmREAVHxMNlqUCYJyD7lqGYEvpsLmnKZtbyaFiFMNjalfTmCHSj/PGSzu7hmzKH+vhRKyxG1++aZ0/ue8Odq40/4YQw47Nc2mwMlqRo=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR03MB6265
X-OriginatorOrg: citrix.com

This message is because both MirageOS and Unikraft are listed as having IRC=
 channels on freenode.net (see https://xenproject.org/help/irc/ ).

There's been a situation developing on freenode for some time that came to =
a head last week. Since that time, the new operators of freenode have begun=
 seizing control of any channel whose topic mentions moving to a new server=
. Furthermore, they have been using the number of people logged into freeno=
de as evidence that the community supports their actions.

In response to this, the main hypervisor project has decided to move to oft=
c.net effective immediately, and a number of us have deleted our freenode a=
ccounts ( https://lists.xenproject.org/archives/html/xen-devel/2021-05/msg0=
1057.html ).

If you're still using the IRC channel listed in that page, please consider =
following suit. If you're not using the IRC channel, let me know so I can d=
elete references to it.

Thanks,
 -George Dunlap=


From minios-devel-bounces@lists.xenproject.org Wed May 26 20:06:46 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Wed, 26 May 2021 20:06:46 +0000
Received: from list by lists.xenproject.org with outflank-mailman.132719.247460 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1llzne-0007Lk-KJ; Wed, 26 May 2021 20:06:42 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 132719.247460; Wed, 26 May 2021 20:06:42 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1llzne-0007Ld-HU; Wed, 26 May 2021 20:06:42 +0000
Received: by outflank-mailman (input) for mailman id 132719;
 Wed, 26 May 2021 20:06:41 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <SRS0=Ud9N=KV=recoil.org=anil@srs-us1.protection.inumbo.net>)
 id 1llznd-0007GX-Ct
 for minios-devel@lists.xenproject.org; Wed, 26 May 2021 20:06:41 +0000
Received: from honk.recoil.org (unknown [2604:1380:2001:1300::3])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id b1782396-c8f5-412b-af2a-3738aaa1a59f;
 Wed, 26 May 2021 20:06:34 +0000 (UTC)
Received: from chuck.anglers.recoil.org (unknown [185.219.111.130])
 by honk.recoil.org (Postfix) with ESMTPSA id 24E143C00F0;
 Wed, 26 May 2021 20:06:32 +0000 (UTC)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: b1782396-c8f5-412b-af2a-3738aaa1a59f
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=recoil.org;
	s=selector1; t=1622059592;
	bh=2XcvEp3i2cPZAODYwTkHvP51txBzt6sOSNzjnzt4J3c=;
	h=From:Subject:Date:In-Reply-To:Cc:To:References:From;
	b=Kg3NdhaFHU9fJ01BL+BgG8jHnv/sUBX+ej1FUrW3r7VgCm26KretrWOe1UHYUVmnM
	 /bgA7Fni6yqfYToovjYBRD7sTeLM/Nk3f/0f3D244xZmmXDCS4HFG00usWkCyWZK1N
	 Xb4y47aJzLTTMPsocI8Bc+dEb0CNtBC2H/8+KdvA=
From: Anil Madhavapeddy <anil@recoil.org>
Message-Id: <FAEFA0A8-D9B6-42D9-9F37-0ACB5CBF5CDE@recoil.org>
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_291E864F-AE6E-4448-A8B7-558C5D90EC7B"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\))
Subject: Re: Proposal: Move IRC networks to oftc.net
Date: Wed, 26 May 2021 21:06:31 +0100
In-Reply-To: <B408BB9D-ECE5-465C-AE92-E59247491245@citrix.com>
Cc: "mirageos-devel@lists.xenproject.org" <mirageos-devel@lists.xenproject.org>,
 "minios-devel@lists.xenproject.org" <minios-devel@lists.xenproject.org>
To: George Dunlap <george.dunlap@citrix.com>
References: <B408BB9D-ECE5-465C-AE92-E59247491245@citrix.com>
X-Mailer: Apple Mail (2.3654.60.0.2.21)


--Apple-Mail=_291E864F-AE6E-4448-A8B7-558C5D90EC7B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi George,

To follow up on Hannes' previous mail which intersected with yours, =
#mirage is off to libera:

> we're now on libera.chat in #mirage -- the website (mirageos.org =
<http://mirageos.org/>) has
> already been updated with the new location.
>=20

regards,
Anil


> On 26 May 2021, at 14:21, George Dunlap <george.dunlap@citrix.com> =
wrote:
>=20
> This message is because both MirageOS and Unikraft are listed as =
having IRC channels on freenode.net (see =
https://xenproject.org/help/irc/ ).
>=20
> There's been a situation developing on freenode for some time that =
came to a head last week. Since that time, the new operators of freenode =
have begun seizing control of any channel whose topic mentions moving to =
a new server. Furthermore, they have been using the number of people =
logged into freenode as evidence that the community supports their =
actions.
>=20
> In response to this, the main hypervisor project has decided to move =
to oftc.net effective immediately, and a number of us have deleted our =
freenode accounts ( =
https://lists.xenproject.org/archives/html/xen-devel/2021-05/msg01057.html=
 ).
>=20
> If you're still using the IRC channel listed in that page, please =
consider following suit. If you're not using the IRC channel, let me =
know so I can delete references to it.
>=20
> Thanks,
> -George Dunlap


--Apple-Mail=_291E864F-AE6E-4448-A8B7-558C5D90EC7B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">Hi =
George,<div class=3D""><br class=3D""></div><div class=3D"">To follow up =
on Hannes' previous mail which intersected with yours, #mirage is off to =
libera:</div><div class=3D""><br class=3D""></div><div =
class=3D""><blockquote type=3D"cite" class=3D"">we're now on libera.chat =
in #mirage -- the website (<a href=3D"http://mirageos.org" =
class=3D"">mirageos.org</a>) has<br class=3D"">already been updated with =
the new location.<br class=3D""><br class=3D""></blockquote><br =
class=3D"">regards,</div><div class=3D"">Anil</div><div class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 26 May 2021, at 14:21, George Dunlap &lt;<a =
href=3D"mailto:george.dunlap@citrix.com" =
class=3D"">george.dunlap@citrix.com</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">This =
message is because both MirageOS and Unikraft are listed as having IRC =
channels on <a href=3D"http://freenode.net" class=3D"">freenode.net</a> =
(see <a href=3D"https://xenproject.org/help/irc/" =
class=3D"">https://xenproject.org/help/irc/</a> ).<br class=3D""><br =
class=3D"">There's been a situation developing on freenode for some time =
that came to a head last week. Since that time, the new operators of =
freenode have begun seizing control of any channel whose topic mentions =
moving to a new server. Furthermore, they have been using the number of =
people logged into freenode as evidence that the community supports =
their actions.<br class=3D""><br class=3D"">In response to this, the =
main hypervisor project has decided to move to <a href=3D"http://oftc.net"=
 class=3D"">oftc.net</a> effective immediately, and a number of us have =
deleted our freenode accounts ( <a =
href=3D"https://lists.xenproject.org/archives/html/xen-devel/2021-05/msg01=
057.html" =
class=3D"">https://lists.xenproject.org/archives/html/xen-devel/2021-05/ms=
g01057.html</a> ).<br class=3D""><br class=3D"">If you're still using =
the IRC channel listed in that page, please consider following suit. If =
you're not using the IRC channel, let me know so I can delete references =
to it.<br class=3D""><br class=3D"">Thanks,<br class=3D""> -George =
Dunlap<br class=3D""></div></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_291E864F-AE6E-4448-A8B7-558C5D90EC7B--


From minios-devel-bounces@lists.xenproject.org Thu May 27 13:23:12 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 27 May 2021 13:23:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.133353.248589 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lmFyf-000450-Rc; Thu, 27 May 2021 13:23:09 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 133353.248589; Thu, 27 May 2021 13:23:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lmFyf-00044s-Np; Thu, 27 May 2021 13:23:09 +0000
Received: by outflank-mailman (input) for mailman id 133353;
 Thu, 27 May 2021 13:23:08 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=eg77=KW=neclab.eu=simon.kuenzer@srs-us1.protection.inumbo.net>)
 id 1lmFyd-00044d-W5
 for minios-devel@lists.xenproject.org; Thu, 27 May 2021 13:23:08 +0000
Received: from mailer2.neclab.eu (unknown [195.37.70.41])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id b8ed43ce-2ac9-4284-a7ce-9fdd2e3ffa3a;
 Thu, 27 May 2021 13:23:05 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mailer2.neclab.eu (Postfix) with ESMTP id 125F8F2018;
 Thu, 27 May 2021 15:23:04 +0200 (CEST)
Received: from mailer2.neclab.eu ([127.0.0.1])
 by localhost (atlas-b.office.hd [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id YoeL01D_Qyaq; Thu, 27 May 2021 15:23:03 +0200 (CEST)
Received: from titania.office.hd (titania.office.hd [192.168.24.89])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by mailer2.neclab.eu (Postfix) with ESMTPS id BEAB1F2014;
 Thu, 27 May 2021 15:22:57 +0200 (CEST)
Received: from puck.office.hd (192.168.24.91) by titania.office.hd
 (192.168.24.89) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Thu, 27 May
 2021 15:22:57 +0200
Received: from puck.office.hd ([192.168.126.12]) by puck.office.hd
 ([192.168.126.12]) with mapi id 15.01.2242.010; Thu, 27 May 2021 15:22:57
 +0200
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: b8ed43ce-2ac9-4284-a7ce-9fdd2e3ffa3a
X-Virus-Scanned: Amavisd on Debian GNU/Linux (atlas-b.office.hd)
X-ENC: Last-Hop-TLS-encrypted
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=neclab.eu;
	s=mailer2-20210408; t=1622121783;
	bh=CUrAe0YpZBliRnGZJlow5lmRGzZPH1koYPqgIJZTcpk=;
	h=From:To:Subject:Date:References:In-Reply-To:From;
	b=oaquATOsYN/mMADKvViuvKh7ZbZMLmwDt804/3rNVn3GR9SJzPQfEIviBFVWcWdIr
	 9gJIZfPzZX+bCd4jiZhydad+w7DfiLzKxs3aD9cPZHB3aUQOgEfPNW8dlqYqDIwF0i
	 PiSEzaBDr4rMLG51LiLUvW/gbXQ5Rv+o9NOs2wnXzNdkJVHElF2fFaKUT9TPORhoxz
	 9SQkLGrBWn/k/0xIwBc4f+qXSmcVuNeQ4rdPKYiRUtTFgajq0tkNqynoNE/vSc8/OA
	 dHiZ5xuLU0FloX69G90eN1g0IzIvblqt56WEN2rubWEgV6pxcPN5K6FAa1xrh/Gad0
	 EEqBhXvVOBjAQ==
X-ENC: Last-Hop-TLS-encrypted
From: Simon Kuenzer <simon.kuenzer@neclab.eu>
To: George Dunlap <George.Dunlap@citrix.com>,
	"mirageos-devel@lists.xenproject.org" <mirageos-devel@lists.xenproject.org>,
	"minios-devel@lists.xenproject.org" <minios-devel@lists.xenproject.org>
Subject: Re: Proposal: Move IRC networks to oftc.net
Thread-Topic: Proposal: Move IRC networks to oftc.net
Thread-Index: AQHXUjIIyTIrAL6mBEWFjV3wrZbKoar3UmsA
Date: Thu, 27 May 2021 13:22:57 +0000
Message-ID: <C845C630-0BE7-48B9-BD95-0CE83F37B4E3@neclab.eu>
References: <B408BB9D-ECE5-465C-AE92-E59247491245@citrix.com>
In-Reply-To: <B408BB9D-ECE5-465C-AE92-E59247491245@citrix.com>
Accept-Language: en-GB, gl-ES, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.49.21050901
x-originating-ip: [192.168.24.96]
Content-Type: text/plain; charset="utf-8"
Content-ID: <A7955D3615D70F4FAF6BD60326330427@office.hd>
Content-Transfer-Encoding: base64
MIME-Version: 1.0

SGkgR2VvcmdlLA0KDQp0aGFua3MgYSBsb3QgZm9yIHVwZGF0aW5nIHVzLiBXZSBoYXZlIHRvIGFk
bWl0IHRoYXQgSVJDIHdhcyBuZXZlciByZWFsbHkgd29ya2luZyB3ZWxsIGZvciB1cy4gV2Ugd2Vy
ZSBjb25uZWN0ZWQgdGhyb3VnaCBaTkMgYnV0IG5vdCBwZXJtYW5lbnRseSBhdmFpbGFibGUgYW5k
IHRoZSBmZXcgbmV3Y29tZXJzIHRoYXQgY2hvc2UgSVJDIG9mdGVuIGRpZCBub3QgZ2V0IGltbWVk
aWF0ZSByZXNwb25zZXMgYW5kIGRpc2FwcGVhcmVkIGJlZm9yZSB3ZSBjb3VsZCByZXBseS4gV2Ug
ZGlkIGJldHRlciB3aXRoIHRoZSBtYWlsaW5nIGxpc3QgYW5kIEdpdEh1YiBpc3N1ZXMgYW5kIGl0
IGhhcHBlbmVkIHRoYXQgd2UgcHJlZmVycmVkIGludml0aW5nIG5ld2NvbWVycyBhbmQgY29udHJp
YnV0b3JzIHRvIG91ciBzZWxmLWhvc3RlZCBNYXR0ZXJtb3N0IGluc3RhbmNlLiBXZSB3b3VsZCBs
aWtlIHRvIGludHJvZHVjZSBhbiBvcGVuIHN5c3RlbSBhZ2FpbiBidXQgd2UgZGlkIG5vdCBzZXR0
bGUgb24gb25lIHlldC4gU2luY2UgSVJDIGRpZCBub3Qgd29yayBmb3IgdXMsIHBsZWFzZSByZW1v
dmUgb3VyIElSQyByZWZlcmVuY2VzIGZyb20gdGhlIFhlbiBwYWdlcyBhbmQgd2UgZGlzYWJsZSBv
dXIgZnJlZW5vZGUgYWNjb3VudHMuIEkgd2lsbCBrZWVwIHlvdSB1cGRhdGVkIHdpdGggb3VyIGFs
dGVybmF0aXZlIGFzIHNvb24gYXMgd2UgaGF2ZSBvbmUuDQoNClRoYW5rcywNCg0KU2ltb24NCg0K
77u/T24gMjYuMDUuMjEsIDE1OjIyLCAiTWluaW9zLWRldmVsIG9uIGJlaGFsZiBvZiBHZW9yZ2Ug
RHVubGFwIiA8bWluaW9zLWRldmVsLWJvdW5jZXNAbGlzdHMueGVucHJvamVjdC5vcmcgb24gYmVo
YWxmIG9mIEdlb3JnZS5EdW5sYXBAY2l0cml4LmNvbT4gd3JvdGU6DQoNCiAgICBUaGlzIG1lc3Nh
Z2UgaXMgYmVjYXVzZSBib3RoIE1pcmFnZU9TIGFuZCBVbmlrcmFmdCBhcmUgbGlzdGVkIGFzIGhh
dmluZyBJUkMgY2hhbm5lbHMgb24gZnJlZW5vZGUubmV0IChzZWUgaHR0cHM6Ly94ZW5wcm9qZWN0
Lm9yZy9oZWxwL2lyYy8gKS4NCg0KICAgIFRoZXJlJ3MgYmVlbiBhIHNpdHVhdGlvbiBkZXZlbG9w
aW5nIG9uIGZyZWVub2RlIGZvciBzb21lIHRpbWUgdGhhdCBjYW1lIHRvIGEgaGVhZCBsYXN0IHdl
ZWsuIFNpbmNlIHRoYXQgdGltZSwgdGhlIG5ldyBvcGVyYXRvcnMgb2YgZnJlZW5vZGUgaGF2ZSBi
ZWd1biBzZWl6aW5nIGNvbnRyb2wgb2YgYW55IGNoYW5uZWwgd2hvc2UgdG9waWMgbWVudGlvbnMg
bW92aW5nIHRvIGEgbmV3IHNlcnZlci4gRnVydGhlcm1vcmUsIHRoZXkgaGF2ZSBiZWVuIHVzaW5n
IHRoZSBudW1iZXIgb2YgcGVvcGxlIGxvZ2dlZCBpbnRvIGZyZWVub2RlIGFzIGV2aWRlbmNlIHRo
YXQgdGhlIGNvbW11bml0eSBzdXBwb3J0cyB0aGVpciBhY3Rpb25zLg0KDQogICAgSW4gcmVzcG9u
c2UgdG8gdGhpcywgdGhlIG1haW4gaHlwZXJ2aXNvciBwcm9qZWN0IGhhcyBkZWNpZGVkIHRvIG1v
dmUgdG8gb2Z0Yy5uZXQgZWZmZWN0aXZlIGltbWVkaWF0ZWx5LCBhbmQgYSBudW1iZXIgb2YgdXMg
aGF2ZSBkZWxldGVkIG91ciBmcmVlbm9kZSBhY2NvdW50cyAoIGh0dHBzOi8vbGlzdHMueGVucHJv
amVjdC5vcmcvYXJjaGl2ZXMvaHRtbC94ZW4tZGV2ZWwvMjAyMS0wNS9tc2cwMTA1Ny5odG1sICku
DQoNCiAgICBJZiB5b3UncmUgc3RpbGwgdXNpbmcgdGhlIElSQyBjaGFubmVsIGxpc3RlZCBpbiB0
aGF0IHBhZ2UsIHBsZWFzZSBjb25zaWRlciBmb2xsb3dpbmcgc3VpdC4gSWYgeW91J3JlIG5vdCB1
c2luZyB0aGUgSVJDIGNoYW5uZWwsIGxldCBtZSBrbm93IHNvIEkgY2FuIGRlbGV0ZSByZWZlcmVu
Y2VzIHRvIGl0Lg0KDQogICAgVGhhbmtzLA0KICAgICAtR2VvcmdlIER1bmxhcA0KDQo=


