Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1518944ybi; Sun, 16 Jun 2019 06:50:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxREB2ladYw/+uBHQY9Z0NKMee9ZGguHH1upa21RLQgmX0HQh1Zb1AomZqsIZcADYcDbtc9 X-Received: by 2002:a17:90a:5d0a:: with SMTP id s10mr21051462pji.94.1560693036540; Sun, 16 Jun 2019 06:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560693036; cv=none; d=google.com; s=arc-20160816; b=UlGiVhd5Pd46AR/DrhOrAW5j5DUgq5tSP+IzIzdOeIX64EMINDod73RpGZxs/nXjIF HnQtgqQ71rU+sn110J5pGGKWGXE6N/vxMgIktpRE+mRPNWZKaOppa+qepOt4YqZH41O4 FM/znUpV0aJur23h76SDlDqmJj8OeerG2cOLEdkV9vTA0UegPA3dv4bDCYsyZpHCmKaw wsrtRTqbGWVFIQHPwm0azvwRtn1qQBrIx/32/Mil1ghXLe8k6pzdRzE2rEBrtEw1MkZ8 ZZyluHi1nHMaRcIUsrXd64OrVg6iHbB2tyV8D1NbrZBLREb2YH1kjulvlldJbuMd0xia Tlhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=hRgmduehJB0wL8o9V7NJ3rdYV9c0H419WXYJkuBepmk=; b=I4MbLziPmbjfJkX7LN140JZ2L1HQuyxU6zl421VcL4Rj9xM3MxOSnolavttrpMqz85 +sQ1Wcpcm13zvqmKG9Gnog48eW5mC4ZZXewH2DAg1ju/xtw2OQplTaV/xPzbYKcMmxI5 n+5zwlPLJYOC1IKmzdr5MROCfDKupVwRw8HOTD8LaGW1QE1n1H+AOdjASop3D3gVte/z oEQSw+lCkbiL7SRxkWHe40M1CH72anmikVkrxUbaXOMJ35IqotdEXdUNDwP/k3HjXyVW EqOzwi/xFyN8BjoQENKdnEH2Q4gnKslZzXcr4MEwNV/ZKSZL2miNIPeHBWDuyNfCy7Cw zbHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@habanalabs.onmicrosoft.com header.s=selector1-habanalabs-onmicrosoft-com header.b=dD9obt9H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si3220628pgw.578.2019.06.16.06.50.21; Sun, 16 Jun 2019 06:50:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@habanalabs.onmicrosoft.com header.s=selector1-habanalabs-onmicrosoft-com header.b=dD9obt9H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727210AbfFPNsj (ORCPT + 99 others); Sun, 16 Jun 2019 09:48:39 -0400 Received: from mail-eopbgr30128.outbound.protection.outlook.com ([40.107.3.128]:11269 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725874AbfFPNsi (ORCPT ); Sun, 16 Jun 2019 09:48:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=habanalabs.onmicrosoft.com; s=selector1-habanalabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hRgmduehJB0wL8o9V7NJ3rdYV9c0H419WXYJkuBepmk=; b=dD9obt9HZUnwOpmcAI3g6gavl6gOA3o1suB8X+CDAh7pycIrEPBBXt0xvNP0YTfIfuZ1CVYBFhQs+KVEvn9AMpphmsogG3H17Xmb9bBrWPL05EBDgmwqeY3p2pEeImUb+cDO4hPXuUHtAua7gZfNdDLFQQmHcKBBcXNxeYQFK3w= Received: from VI1PR02MB3054.eurprd02.prod.outlook.com (10.170.235.155) by VI1PR02MB5934.eurprd02.prod.outlook.com (52.133.246.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.10; Sun, 16 Jun 2019 13:48:29 +0000 Received: from VI1PR02MB3054.eurprd02.prod.outlook.com ([fe80::d45e:25f0:5b42:30e2]) by VI1PR02MB3054.eurprd02.prod.outlook.com ([fe80::d45e:25f0:5b42:30e2%2]) with mapi id 15.20.1987.014; Sun, 16 Jun 2019 13:48:29 +0000 From: Tomer Tayar To: "oded.gabbay@gmail.com" CC: "linux-kernel@vger.kernel.org" Subject: [PATCH] habanalabs: Allow accessing host mapped addresses via debugfs Thread-Topic: [PATCH] habanalabs: Allow accessing host mapped addresses via debugfs Thread-Index: AQHVJEotqhRZKkY5HUWUiZb66OgpsA== Date: Sun, 16 Jun 2019 13:48:29 +0000 Message-ID: <20190616134813.4094-1-ttayar@habana.ai> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0068.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::32) To VI1PR02MB3054.eurprd02.prod.outlook.com (2603:10a6:802:17::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ttayar@habana.ai; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [31.154.190.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e09e787e-07f4-4601-3f00-08d6f261500b x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:VI1PR02MB5934; x-ms-traffictypediagnostic: VI1PR02MB5934: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0070A8666B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39840400004)(346002)(136003)(366004)(376002)(189003)(199004)(1361003)(66556008)(66476007)(64756008)(66446008)(8936002)(6916009)(86362001)(73956011)(66946007)(476003)(2616005)(486006)(53936002)(74482002)(81166006)(25786009)(1076003)(2351001)(6436002)(316002)(81156014)(8676002)(6486002)(68736007)(6512007)(7736002)(5640700003)(305945005)(66066001)(14444005)(14454004)(99286004)(71190400001)(71200400001)(50226002)(52116002)(478600001)(102836004)(3846002)(36756003)(186003)(256004)(26005)(2906002)(5660300002)(4326008)(2501003)(6506007)(386003)(6116002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR02MB5934;H:VI1PR02MB3054.eurprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: habana.ai does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: OiNurgQ5Gj9z5XG5nUb38/okg2sMi3JKUtiobbEZdzUsKPLtXDRjh+KYNTzvTS7Sj77B11uH3HTcRuJs+KNLIq58rYBGI7iOVnpvcgj3DAbe4jeV8cnWT0IL6GFTAy0ZqciRtKPaZJg008K31xn57n50fVU6Mp1MPkFV3QnPVqlCooG6mYnLf2DBDxGJwRq1ehD40YJTh01+YMv+p+KcxH7WdfxbqS3pVfdEyxb399UnllRy4DHxMGGfzqQx6wvOrXEiQ1xxJPcZ0Rn44TSTe9A5T1GvRfeuLdtepzS4fKsKSIdnWJ+1WjHjRvoOtw+wvzOpuS4JFdMJtuH56lbYqstoI8YdIpJdIpaScHjfq1wY6Xa36aqkpccvdN7hAG0F873kABC9/U3RQJBKIaZ0tVqufxWi6xAys9p+wd6nyuI= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: habana.ai X-MS-Exchange-CrossTenant-Network-Message-Id: e09e787e-07f4-4601-3f00-08d6f261500b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2019 13:48:29.1835 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0d4d4539-213c-4ed8-a251-dc9766ba127a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ttayar@habana.ai X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB5934 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWxsb3dzIHVzaW5nIHRoZSBhZGRyL2RhdGEzMiBkZWJ1Z2ZzIG5vZGVzIHRvIGFjY2VzcyBhIGRl dmljZSBWQSBvZiBhDQpob3N0IG1hcHBlZCBtZW1vcnkgd2hlbiB0aGUgSU9NTVUgaXMgZGlzYWJs ZWQuDQoNCkR1ZSB0byB0aGUgcG9zc2libGUgbGFyZ2UgYW1vdW50IG9mIGEgdXNlciBob3N0IG1h cHBlZCBtZW1vcnksIHRoZQ0KZHJpdmVyIGRvZXNuJ3QgbWFpbnRhaW4gYSBkYXRhYmFzZSB3aXRo IHRoZSBob3N0IGFkZHJlc3NlcyBwZXIgZGV2aWNlIFZBLg0KV2hlbiB0aGUgSU9NTVUgaXMgZGlz YWJsZWQsIHRoaXMgbWlzc2luZyBpbmZvIGlzIGJlaW5nIG92ZXJjb21lIGJ5DQpzaW1wbHkgdXNp bmcgcGh5c190b192aXJ0KCkuIEhvd2V2ZXIsIHRoaXMgaXMgbm90IHVzZWZ1bCB3aGVuIHRoZSBJ T01NVQ0KaXMgZW5hYmxlZCwgYW5kIHRodXMgdGhlIGVuZm9yY2VkIGxpbWl0YXRpb24uDQoNClNp Z25lZC1vZmYtYnk6IFRvbWVyIFRheWFyIDx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