Received: by 10.192.165.156 with SMTP id m28csp39388imm; Tue, 10 Apr 2018 15:57:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/0mFk3nxmoouWKxNfaemvqeFpTmYR39axm/XaLFzb2ifTt70zjkkvpHLaSBQgobK49QD0Q X-Received: by 2002:a17:902:b209:: with SMTP id t9-v6mr2334086plr.105.1523401053058; Tue, 10 Apr 2018 15:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523401053; cv=none; d=google.com; s=arc-20160816; b=S4kW0oRSninDsDqlKn94CIqbBHPG18KFqkhZbUHF5pwXW0iVcism+00Zrq48R+b6Uy 2+HcpYgQbh55aUGUU/TdzLLzpxQELK6GpyW8OW63cfjZCoEREz2nNOx4Jve+wpVvxBKN 8aYhwoCgoqUQ6F2/1ThOo/Rf/IpRNfsJC7ZIM3jCU51CizNfLurOTN8y8BoZpc7d746n o7QXEDZks9obv6+BZdORxN4Cc/NzGB39L4UmY8pqk+5u2uAZ22n3+wIk1vbDCSJHmJF+ tJtIKSCUb8FlgkLaZg98UPpn/HBA2oMwOWJAqJlyvSjCiEyAr87/DiU1ykndZvYuXRaU c4aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TBgYUXB/k2aVqzHTeCgE9TO5hW6ZMKyzSK7mpnlvUnA=; b=U/F3UOxOY7z2sJb0iA/bRMwfEjzPbTowdmcWis8pnDurW5Xld2Wm6DO/fJqj6cW0+k KWPmFZ44j2gKSSG2Rgx53a9kCQ5prQPlu21yGee8A9q48GLKEx1Ovh0We+YwEDzBM799 RzgV2aCmjJKvcmmov1mOomSOygE30r6tzfydVQf3+kkct4Vb16iAkMh2LxxSpz+DYKCa N8iSjePLQDujOJWFoPKiG+QJK8YLB7al2lVc17uGxXgX9tDFEjSmZN7lqhYaDh2sojmy Bdis01z7wPF2LHpoXro3tt0qDAdiphUWAieQJFIsg7fMCom5jwvK6zmHsv/AniBcR6tG CgPA== ARC-Authentication-Results: i=1; mx.google.com; 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 be3-v6si3447440plb.75.2018.04.10.15.56.56; Tue, 10 Apr 2018 15:57:33 -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; 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 S1755870AbeDJWhy (ORCPT + 99 others); Tue, 10 Apr 2018 18:37:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43942 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755045AbeDJWhw (ORCPT ); Tue, 10 Apr 2018 18:37:52 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3C3AACC4; Tue, 10 Apr 2018 22:37:52 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Hemminger , Sasha Levin Subject: [PATCH 4.14 067/138] uio_hv_generic: check that host supports monitor page Date: Wed, 11 Apr 2018 00:24:17 +0200 Message-Id: <20180410212909.891477166@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/uio/uio_hv_generic.c | 7 +++++++ 1 file changed, 7 insertions(+) --- 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; + /* 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 = -ENOTSUPP; + goto fail_close; + } + dev->channel->inbound.ring_buffer->interrupt_mask = 1; set_channel_read_mode(dev->channel, HV_CALL_DIRECT);