Received: by 10.213.65.68 with SMTP id h4csp1620085imn; Mon, 19 Mar 2018 08:56:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELtFRoMxtTryDiIgW6FAaoOvL3J4zOy7Ymo/TeR6larUJdCnp18sqSo4rFL00YZv+n59+DoS X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr10708847plp.243.1521475004751; Mon, 19 Mar 2018 08:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521475004; cv=none; d=google.com; s=arc-20160816; b=v5VWNQuGT7rzMfKl8v13Fd0SiYNcvcaW+yl2+v76GlJh3B8j+e0b+T9zSi6BAkkrDx R28ZkfnTiJVcEeZ1nVLlhJYGUaxepGeG0hZeEGrLi2kux/iO9AMBttkb6ujkMeX2RyjR JWeTiZpO4IxaYxBZwBVWhQLTYmeMkcB7m7oM9ZEZg3e4hicyn5MplB6MBZBZ67PpVBVk Cycf1/mzFzRHUWhDZz5yCfLznR1D0qdyosWSelrZTR4K+RvTKCttXZf+uunM8Hhg82KP 3YsMqbShaniip19i+vhe5EzpxJERrxs++mNMOSHuVWvN7Z2j3+MdmPBeOjgnAuNYzvi5 zaMA== 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 :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=zXjlvctVwp+QfeLyXCpgWX+FIChVYmUBn5BiGVXCkeA=; b=MiBr/tBY6OSlvxERTwqk4gGnDyaLcK001iQNmJrkLnmFAE/jjcNlXlBIcViFLMLB13 cG7OM2hIw7t2h8iZ4F07jgUS1OOCnmJ9VB+XrNIkhhwaaq6yVmk8NV8gemyb4/VUt4Sh VGXmxAiUxtyUIK9CIVNYtx2yAZhf/FW7lUOkos0/m3RIzAz2nJDnSsmCdN3Pg9aXNcwL v8wBAOA0/7GxeBhb8OtMwH3HEv4j+8j8jboVlyi+2pm4L4oWu0FD0E8lzTXqn78NhT/K ZXqSAUWzrPz1+5BA41RY5Hg2E1AYFlDGG7P0GLQSYKVFhVZw3dzLtPN/vSVvy5yfVSkH Jhdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=h0yf+xHR; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3-v6si209180plc.317.2018.03.19.08.56.29; Mon, 19 Mar 2018 08:56:44 -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=@microsoft.com header.s=selector1 header.b=h0yf+xHR; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934044AbeCSPuG (ORCPT + 99 others); Mon, 19 Mar 2018 11:50:06 -0400 Received: from mail-sn1nam01on0129.outbound.protection.outlook.com ([104.47.32.129]:20557 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934022AbeCSPtx (ORCPT ); Mon, 19 Mar 2018 11:49:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zXjlvctVwp+QfeLyXCpgWX+FIChVYmUBn5BiGVXCkeA=; b=h0yf+xHRZ+g2kPeMSwqEkWyBqP5G7hiEsfclle12uUYnizEF9qr/mGccIqkYWsD52/Afi+J94QO/ug6pr3mUByHe7+zv+TSzp+mLEjUXm7Kc7uzFz75lT4vDTFr5EYR9iwiWzimZ711GkgiY1vfgFanb2SAmPgqEdlaoIc5zTOY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0981.namprd21.prod.outlook.com (52.132.133.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 15:49:40 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:49:40 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Stephen Hemminger , Stephen Hemminger , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 098/124] uio_hv_generic: check that host supports monitor page Thread-Topic: [PATCH AUTOSEL for 4.15 098/124] uio_hv_generic: check that host supports monitor page Thread-Index: AQHTv5nFms+qtFW1mUW8+faI5OkGfQ== Date: Mon, 19 Mar 2018 15:48:49 +0000 Message-ID: <20180319154645.11350-98-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0981;7:aP+um4q1rUGyjFY7FM2DwEQ0eceqygZ7oXtfGvAhetIKdz7/vYe7JS/nle3ZlNbiYmQJCBctdz/BzvZ2tuvRVd0gYoq0AFUrkOJQUk9Pbm6mh9uM/QKiA7Cw3D0nYrL27oKP3hq6646UbEgJbXPSCzdvrnmw6LmiL3a/K9dQqmia1w3ynuUV8r2XjqQvNKHdzNPT8BuE5Zpm3azg8UzM1+VAJHfqNZd9M2WWFY6NQzLHlJOmZ6Yf1bZx6lywk7Dq;20:OlKWQjXiOu+K+IQ0jwrNaDPPNF7MmiLgQWaUQILlCpcvjidGPUUKD1sP5m1tY6n/LNXB3yOXl1xVpylp/Ds6ka0X+4LsH70JOc64Ok+JnWICgansUfKCYfijXJMy8vfoHmvligmI2M2bihw72Hns7BtQtb1/qvjhwbzmrQlXOFM= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8b8af29e-5196-46d6-0b05-08d58db106a1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0981; x-ms-traffictypediagnostic: DM5PR2101MB0981: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0981;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0981; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(396003)(376002)(366004)(39860400002)(39380400002)(189003)(199004)(66066001)(6486002)(26005)(110136005)(5660300001)(54906003)(3280700002)(6512007)(68736007)(102836004)(6436002)(107886003)(10290500003)(53936002)(186003)(59450400001)(72206003)(14454004)(36756003)(2950100002)(316002)(6506007)(22452003)(478600001)(10090500001)(106356001)(105586002)(99286004)(7736002)(3660700001)(86362001)(76176011)(305945005)(86612001)(2501003)(97736004)(5250100002)(4326008)(3846002)(6116002)(1076002)(8936002)(25786009)(81156014)(81166006)(8676002)(2900100001)(2906002)(22906009)(41533002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0981;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: G8aNa8XfTvWHixQoKvx7tx4mQvBNcbLBduVyVtI6L7A8rdu2Rlj1ghCuL6/AbNefC8DsK9aTfiwroSht/a3qi6FU3b6Gvl6m/VukhkFCwbQDYxrXy2/stXjhtSZDqo9ExM4ZURBVOr1+OVr2BUdlvcDelychYmC7eOoFeTkHKOOC30rZgnAu4IoB2TaCUA9fFVItx2inYjE3MfcblhYSNxq2kn42zBdDsrbIEpb09a+PNI+e9k27A6XhyIUfsCchCE7fs9RKrvrP8lLm6Bz/D70gFuYidozJ1XsUo0nRbVMvlId0OnvE9suwR0Z2HI4Ec6HHJgu4DS0ZUjwsoRLluQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b8af29e-5196-46d6-0b05-08d58db106a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:48:49.3312 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0981 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Hemminger [ Upstream commit 06028d15177a1b406b7b075ea47c6a352732f23a ] In order for userspace application to signal host, it needs the host to support the monitor page property. Check for the flag and fail if this is not supported. Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/uio/uio_hv_generic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index 48d5327d38d4..fe5cdda80b2c 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -124,6 +124,13 @@ hv_uio_probe(struct hv_device *dev, if (ret) goto fail; =20 + /* Communicating with host has to be via shared memory not hypercall */ + if (!dev->channel->offermsg.monitor_allocated) { + dev_err(&dev->device, "vmbus channel requires hypercall\n"); + ret =3D -ENOTSUPP; + goto fail_close; + } + dev->channel->inbound.ring_buffer->interrupt_mask =3D 1; set_channel_read_mode(dev->channel, HV_CALL_DIRECT); =20 --=20 2.14.1