android_kernel_motorola_sm6225/Documentation/ABI/stable
Kimberly Brown b57705c0ec Drivers: hv: vmbus: Expose monitor data only when monitor pages are used
[ Upstream commit 46fc15487d02451448c11b83c4d086d87a6ad588 ]

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 <kimbrownkd@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-23 11:58:41 +01:00
..
firewire-cdev firewire: ABI documentation: libhinawa uses firewire-cdev 2016-03-12 10:55:46 +01:00
o2cb ocfs2: Move /sys/o2cb to /sys/fs/o2cb 2008-04-18 08:56:10 -07:00
syscalls
sysfs-acpi-pmprofile ACPI: Export FADT pm_profile integer value to userspace 2011-11-06 20:48:42 -05:00
sysfs-bus-firewire firewire: core: document is_local sysfs attribute 2012-06-30 10:49:06 +02:00
sysfs-bus-nvmem Documentation/ABI: document the nvmem sysfs files 2017-08-28 17:57:52 +02:00
sysfs-bus-usb docs-rst: fix usb cross-references 2017-04-11 14:41:29 -06:00
sysfs-bus-vmbus Drivers: hv: vmbus: Expose monitor data only when monitor pages are used 2022-02-23 11:58:41 +01:00
sysfs-bus-w1 w1: introduce an ability to specify microseconds bus scanning intervals 2015-05-24 12:08:59 -07:00
sysfs-bus-xen-backend xen: export device state to sysfs 2018-08-28 17:37:40 -04:00
sysfs-class-backlight backlight: add backlight type 2011-03-22 17:43:59 -07:00
sysfs-class-infiniband Documentation/ABI: update infiniband sysfs interfaces 2018-02-23 08:18:33 -07:00
sysfs-class-rfkill rfkill: Correctly document rkill subfolder range as >= 0 in sysfs-class-rfkill 2018-06-15 13:35:49 +02:00
sysfs-class-tpm Doc: ABI/stable: Fix typo in ABI/stable 2015-11-02 18:10:33 -07:00
sysfs-class-ubi UBI: Add ro-mode sysfs attribute 2016-05-24 15:15:26 +02:00
sysfs-class-udc Documentation: ABI: sysfs-class-udc: remove duplicated entry 2017-06-13 13:21:04 +03:00
sysfs-devices Documentation: fix admin-guide doc refs 2017-10-12 11:13:28 -06:00
sysfs-devices-node docs/admin-guide/mm: start moving here files from Documentation/vm 2018-04-27 17:02:48 -06:00
sysfs-devices-system-cpu powerpc: Document sysfs DSCR interface 2014-05-28 13:35:40 +10:00
sysfs-devices-system-xen_memory xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
sysfs-driver-aspeed-vuart drivers/serial: Add driver for Aspeed virtual UART 2017-05-18 16:19:16 +02:00
sysfs-driver-dma-ioatdma dmaengine: ioatdma: Add ABI document 2017-08-21 21:40:40 +05:30
sysfs-driver-ib_srp IB/srp: Add multichannel support 2014-11-12 12:05:24 +01:00
sysfs-driver-mlxreg-io Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces 2018-08-01 17:41:31 -07:00
sysfs-driver-qla2xxx [SCSI] qla2xxx: Add firmware-dump kobject uevent notification. 2009-12-04 12:00:10 -06:00
sysfs-driver-usb-usbtmc USB: update usbtmc api documentation 2012-04-12 08:26:22 -07:00
sysfs-driver-w1_ds28e04 w1: Add 1-wire slave device driver for DS28E04-100 2012-06-13 16:47:10 -07:00
sysfs-driver-w1_ds28ea00 w1: Add support for DS28EA00 sequence to w1-therm 2015-05-24 12:08:59 -07:00
sysfs-firmware-efi-vars efivars: Add Documentation 2011-03-14 08:40:51 -07:00
sysfs-firmware-opal-dump powerpc/powernv Platform dump interface 2014-03-07 16:19:10 +11:00
sysfs-firmware-opal-elog Doc: ABI/stable: Fix typo in ABI/stable 2015-11-02 18:10:33 -07:00
sysfs-fs-orangefs Orangefs: kernel client part 6 2015-10-03 11:39:59 -04:00
sysfs-hypervisor-xen doc,xen: document hypervisor sysfs nodes for xen 2017-06-15 08:50:15 +02:00
sysfs-module ABI: Clarify when /sys/module/MODULENAME is created 2013-07-02 15:38:20 +09:30
sysfs-transport-srp scsi_transport_srp: Add periodic reconnect support 2013-11-08 14:43:16 -08:00
thermal-notification thermal: Add event notification to thermal framework 2011-01-12 00:08:35 -05:00
vdso doc: ABI: vdso: update parse_vdso.c reference 2017-03-13 17:13:22 -06:00