Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3030388imj; Mon, 11 Feb 2019 12:36:07 -0800 (PST) X-Google-Smtp-Source: AHgI3IaUq/KeVHZDrk8p/AdMq/iXHuLx6TM5Jylo9ytD3X8W0og4PWVRn9Jd1Q3WUTzNgJzgLxTX X-Received: by 2002:a17:902:27e6:: with SMTP id i35mr101048plg.222.1549917367779; Mon, 11 Feb 2019 12:36:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549917367; cv=none; d=google.com; s=arc-20160816; b=J08Q60Y0IDKGqwndt+AF2A9kWdPOSVuL4jRZNKf/OF5Mrd/iFxVkOBBa4TsDTcEFes GwUQkapGJDALK2o/hhaJdpeBwpAd11t/9xE83/4PeFjOo1QxHmOjPC4Y5zNoSQaoZ7/Y 2ztz6mZZ3IjokFG3JQD0BevuVrbQ8RjKChgMKKVgRpR+L1jmo30vTvMbq0v+aqDcMulj SmmTQrzyHflP+Ii8z/rdEb5XaDpTMreZTTSSgQOLMfAk3L0KKp6L3k9r+2q75wx2CXGu xJRoWQ2UZ6xEn15ufKliYCVeAqPJW3BcjT4RKCfR7tSi/+PtdCPi322BrU+N6ucRmCDs EPcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=f++MmBXaPJCob+y5zj7VHYIu0GW7VfXf1nfSBVldpsU=; b=v6CO5WfYkEl5TFire8zLbrukFymHL4xndleMCbvR+dDuqv5wEpJvVPVNuzBuUrCvd5 Se33h3Zo1DrB9I2Tc2XM+8fHBLZ/LWlVKSgVo71klyQh6KQp1In3K08A2gVw/MP4B9ah gsrgH5ZFdl9OUjo1+AOcedQIsUkBMIxtGHJybYadiUIkj2QoFgS3lE8cglhoy141BkjD aNZNb+Gwppq6dS8PQc7MV8Ms0TC03kxzcRRU4yfLRe94LtUOwfrxUGOZMXNMbHQODVPl IzJO2bJ1DplzysbD2NsC8bqPhFpn5az6MapHQP+rsxHc0Au9EAAz62qARJrguhqLDOU2 JHyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=nIVjxsPC; 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 e3si11238225pfe.203.2019.02.11.12.35.51; Mon, 11 Feb 2019 12:36:07 -0800 (PST) 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=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=nIVjxsPC; 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 S1730772AbfBKSC4 (ORCPT + 99 others); Mon, 11 Feb 2019 13:02:56 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46019 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727896AbfBKSC4 (ORCPT ); Mon, 11 Feb 2019 13:02:56 -0500 Received: by mail-pl1-f193.google.com with SMTP id r14so641039pls.12 for ; Mon, 11 Feb 2019 10:02:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f++MmBXaPJCob+y5zj7VHYIu0GW7VfXf1nfSBVldpsU=; b=nIVjxsPCJ1HC7kBOnBRBDPxWikLhLvBWsONghvQ7jrXNnwbCxZB0VLpPrd27kymCK/ xf8VRubhis7Zv3rEfy1gWIbKoj5D+qHq+DqYgKaymfJHeY13SUnepLUzeIaTvFsh9cnL S0KQRzWfrE7qenQ7YQYZfOfJDki/Ndt1yCWSmntO1rHEsbl8yGai4xaA8+SPnmdsB+tO rWhUzVMJDUIZuieM5HCWpZ8mdgOHQQhUSMjeHxL4lyZV91SaEF/jEnLLvafhrEx19Ea6 LSZkEttEipX3Yr+87brw9TInnKxFEswEUKxiZzbh9QAZfHk0QGJdFEhJGb8Mhs/Tk2Yc EMxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f++MmBXaPJCob+y5zj7VHYIu0GW7VfXf1nfSBVldpsU=; b=Mk9qd/jxprGdzBJqDv+ou20v8Bhf3Omqvipejo4uw47HX/7e0B3rSDeE0GKbUWbH9X 1mtZh0krwzgjjhSNQfBEu4laCO4cZVkXRSYM73iV43SWY0bSgjP0bXV6nM95tbdYCkmY d+Wz+h/7i+Qe2fOCqsF7MsIsWlrTIEFFRCfpcY52kZm4gFadRCV9ZeNgabRiyelCMZuQ /UbPan4odppQcuhxqhmrwwO2HQ87kwYlNbdJ7Qx8O8WzgrDwZE2iGhpQoG6uWs/sS4/y atLcsICAjQMXj6LzcR6gIPYRGFBK7Ph9rjx5Dp6xHVokyXmyefDjCXnQaFZmlCPPlMU4 zUIg== X-Gm-Message-State: AHQUAubPkGeuMrkbHMEKY3yhEw4OTpdhuxMATpXXEcp66n/0U2lkQf5Z HgDVW0Pqm3Wek8bNq6Z5ryTgDA== X-Received: by 2002:a17:902:8641:: with SMTP id y1mr38594173plt.159.1549908175051; Mon, 11 Feb 2019 10:02:55 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l8sm24138991pgf.60.2019.02.11.10.02.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 10:02:54 -0800 (PST) Date: Mon, 11 Feb 2019 10:02:47 -0800 From: Stephen Hemminger To: Kimberly Brown Cc: Michael Kelley , Long Li , Sasha Levin , Dexuan Cui , devel@linuxdriverproject.org, Haiyang Zhang , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set Message-ID: <20190211100247.12221570@hermes.lan> In-Reply-To: <20190211070118.GA2977@ubu-Virtual-Machine> References: <52d58fe5805f2ba2405c9091b4c86033d434d2b9.1549619051.git.kimbrownkd@gmail.com> <20190208143148.052c8d9c@hermes.lan> <20190211070118.GA2977@ubu-Virtual-Machine> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Feb 2019 02:01:18 -0500 Kimberly Brown wrote: > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > > On Fri, 8 Feb 2019 05:01:12 -0500 > > Kimberly Brown wrote: > > > > You are right, the current behavior is broken. > > It would be good to add a description of under what conditions > > monitor is not used. Is this some part of a project emulating > > Hyper-V? > > > > I'm not sure which conditions determine whether the monitor mechanism is > used. I've searched the Hypervisor TLFS, and I couldn't find any > information. If you have any suggestions for where I can find this > information, please let me know. The monitor page stuff pre-dates my involvement with Hyper-V. KY might know. But based on comments it looks like it was added to avoid hypercalls for each message. It probably showed up in Windows Server 2012 timeframe. To test you might want to dig up Windows Server 2008. > No, I'm not working on a project emulating Hyper-V. OK, I had heard that KVM project was doing something with QEMU. > > > > > + > > > + if (!hv_dev->channel->offermsg.monitor_allocated) > > > + return sprintf(buf, "\n"); > > > > If monitor is not used, why not return an error instead of empty > > data. Any program (or user) would have to handle that already. > > I think that returning an error instead is fine. I'll make this change > in the next version of the patch.