Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1193938img; Tue, 19 Mar 2019 02:27:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwl0ykFSo3VfEppn/MgkRukUag9cf7GglhgdhglWR/Nz2h//kKDrOl9fa6U15zWPeVMfRiA X-Received: by 2002:a65:625a:: with SMTP id q26mr897179pgv.61.1552987665881; Tue, 19 Mar 2019 02:27:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552987665; cv=none; d=google.com; s=arc-20160816; b=ubxNk1FuoR85k86m8MT+Ak5K2OJwHrxZvRFHegTwlD0OZtr/2eT1Ua5mx9OyRFbvxU hNbMeEHaAukfzzxqUdA5k3nylD/CdnTWa2AmaPbFC5rhHn0RsA9yc/hSPqAAp8wNJfR4 hGGncbwPhpt2TXq/FXv9Dc3/N0N7ABcBFsLRTdSdzaOtxSJjJFawxnrwtnv8uCxb5KqE sJdSq3gbhtxKjcJgaPjLlEV5m/e9BK0PsUtqJP9b2TAI6anSRonjbLZRi9fwouw/lIIk tCPFkH7hwO6jBbQ6MbI9LVBdGg9Zao8HwC6m72SxsvfqlL6jKuO3kjzgRku7YEKVdIDP fgbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rEeDPKaXXx3Se73UPwzjvbJGBFIolhhfr892Iv2Ldy4=; b=WNuwRzq0VLpM0CXHT6URJ59ovktwQpfrMobTYy7wPBlQTjBVFTlL1903p4Oh45hfJI OlaP462sWCHyJmi7VXplNa8H19ccTmlq9vYA4DmHs/uvjUfy842A1CLVlxkYeUhZWvZV jo0Gw+WkIJozd8/3wWQmR6chu+2wS/XrFrD59ZRsRO/WpzzLZDOeCICidv8gON3Vnff+ ezWh7R5Qy/np8AsI18uHPrW5aNsyhBJguZ0GvTHfLNlsje2CBu2smmHf3ojHOK/FIpiM P+ks/f6N5Gzre8cqPZGui723yuGL2XBhF7OH0DZ/TKqLgYc37F++RISlCv9MqBgdsQej PXwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z5ErkNYv; 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 m18si6299833pgv.396.2019.03.19.02.27.30; Tue, 19 Mar 2019 02:27:45 -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=@kernel.org header.s=default header.b=z5ErkNYv; 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 S1727560AbfCSJ0N (ORCPT + 99 others); Tue, 19 Mar 2019 05:26:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:52138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfCSJ0M (ORCPT ); Tue, 19 Mar 2019 05:26:12 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F9C720857; Tue, 19 Mar 2019 09:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552987571; bh=H8sqJx4xl9UyuHvAo1Fy0cMfbNSjhDJc0Zd4wT9Zjgc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=z5ErkNYv70fk9stOATCBs2OsvnVgGVIwqdUwj52O7zrXo/hy6Fzuy5n9MoJlIlCfX 7f0kA61sq3YGLPDax/KVp7RKWwlau+MwxcWj4v0RATtbYVQDJD3OCUpQiD2HFYUcQj TLXjFZeKbc+xICL8rMtqeeUzZBbn0vB72Ni/L2vI= Date: Tue, 19 Mar 2019 10:26:09 +0100 From: Greg KH To: Kimberly Brown Cc: Michael Kelley , Long Li , Sasha Levin , Stephen Hemminger , Dexuan Cui , "K. Y. Srinivasan" , Haiyang Zhang , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6] Drivers: hv: vmbus: Expose monitor data only when monitor pages are used Message-ID: <20190319092609.GB21652@kroah.com> References: <20190308224611.GA3047@ubu-Virtual-Machine> <20190319040401.GA3050@ubu-Virtual-Machine> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190319040401.GA3050@ubu-Virtual-Machine> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 19, 2019 at 12:04:01AM -0400, Kimberly Brown wrote: > There are two methods for signaling the host: the monitor page mechanism > and hypercalls. The monitor page mechanism is used by performance > critical channels (storage, networking, etc.) because it provides > improved throughput. However, latency is increased. Monitor pages are > allocated to these channels. > > Monitor pages are not allocated to channels that do not use the monitor > page mechanism. Therefore, these channels do not have a valid monitor id > or valid monitor page data. In these cases, some of the "_show" > functions return incorrect data. They return an invalid monitor id and > data that is beyond the bounds of the hv_monitor_page array fields. > > The "channel->offermsg.monitor_allocated" value can be used to determine > whether monitor pages have been allocated to a channel. > > Add "is_visible()" callback functions for the device-level and > channel-level attribute groups. These functions will hide the monitor > sysfs files when the monitor mechanism is not used. > > Remove ".default_attributes" from "vmbus_chan_attrs" and create a > channel-level attribute group. These changes allow the new > "is_visible()" callback function to be applied to the channel-level > attributes. > > Call "sysfs_create_group()" in "vmbus_add_channel_kobj()" to create the > channel's sysfs files. Add a new function, > “vmbus_remove_channel_attr_group()”, and call it in "free_channel()" to > remove the channel's sysfs files when the channel is closed. > > Signed-off-by: Kimberly Brown Nice work, thanks for all of the changes you have made to this over time. Reviewed-by: Greg Kroah-Hartman