1
0
Fork 0

- A few fixes for the userspace hyper-v tools from Adrian Vladu.

- A fix for the hyper-v MAINTAINERs entry from Lan Tianyu.
 - Fix for SPDX license identifier in the userspace tools from Nishad
 Kamdar.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAl1YXCEACgkQ3qZv95d3
 LNy/cxAAjyyxIPmu7bUi9jN9YHbEQjCRQJBMvm+/hfqoiiWZa/GglfWw5EY+zAJi
 pHzWyMiOTeubgiMpA17yE0QK6iigPcxN7mOmcrmuWuKIgJthLZFXPhaCrx8apEty
 Ovm9qNjFulpBks/U2r+Pfi8rj7gLqJ5a5qGydYvlrJOTfIRXDYU93HAAdJutraqF
 w34sWxpQjKaTxva+JK7Em2/UCXrCNQ8Tzz7E3cLf20Z+PDGgkHAIWF8p+SAlosOd
 GKzYrW8z7yr1pwcwyLW6yEMlKMENq66pRkk1s0oUbwgQuCmb8HllWazIRkXAAHiD
 1I6r4A2aH7VemBxGKoAH0ENXB5MX5hTmyjOXONM4wqa/24nQsm9mjpuDY/aIRngZ
 3qCsQ/4xpZpKJxccY7DzAcpT7VPSpMM9patAk2C+QXbYIg/HpWfY+42OsnwjnjcE
 D89azjnhIeyOWOFvKxD187hPXd/lfoReC+czCisJvHxR4OPOP1chIUx6VZ25e91d
 gzJqggippL5+QgSt2pYtf6INlsMThvW/2/LLXGxR/r+CEpVAfXFlLBoz7OfwElZ2
 m2vdbwo+0aIOVHL51594Wc78yZM2EQxlMNwt8l7mKTDxxwSlIcC4VHX8r46Df8AA
 GgFSG2pnMNID/a9Rhr7KWzXnaBlALKfGKypz9BPtLKasHal32X8=
 =iKcM
 -----END PGP SIGNATURE-----

Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux

Pull Hyper-V fixes from Sasha Levin:

 - A few fixes for the userspace hyper-v tools from Adrian Vladu.

 - A fix for the hyper-v MAINTAINERs entry from Lan Tianyu.

 - Fix for SPDX license identifier in the userspace tools from Nishad
   Kamdar.

* tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
  MAINTAINERS: Fix Hyperv vIOMMU driver file name
  tools: hv: Use the correct style for SPDX License Identifier
  tools: hv: fix typos in toolchain
  tools: hv: fix KVP and VSS daemons exit code
  tools: hv: fixed Python pep8/flake8 warnings for lsvmbus
alistair/sunxi64-5.4-dsi
Linus Torvalds 2019-08-17 19:31:30 -07:00
commit 85d8d3b172
7 changed files with 54 additions and 41 deletions

View File

@ -7460,7 +7460,7 @@ F: drivers/net/hyperv/
F: drivers/scsi/storvsc_drv.c
F: drivers/uio/uio_hv_generic.c
F: drivers/video/fbdev/hyperv_fb.c
F: drivers/iommu/hyperv_iommu.c
F: drivers/iommu/hyperv-iommu.c
F: net/vmw_vsock/hyperv_transport.c
F: include/clocksource/hyperv_timer.h
F: include/linux/hyperv.h

View File

@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM hyperv

View File

@ -13,7 +13,7 @@
# the script prints the string "Disabled" to stdout.
#
# Each Distro is expected to implement this script in a distro specific
# fashion. For instance on Distros that ship with Network Manager enabled,
# fashion. For instance, on Distros that ship with Network Manager enabled,
# this script can be based on the Network Manager APIs for retrieving DHCP
# information.

View File

@ -700,7 +700,7 @@ static void kvp_get_ipconfig_info(char *if_name,
/*
* Gather the DNS state.
* Gather the DNS state.
* Since there is no standard way to get this information
* across various distributions of interest; we just invoke
* an external script that needs to be ported across distros
@ -1051,7 +1051,7 @@ static int parse_ip_val_buffer(char *in_buf, int *offset,
char *start;
/*
* in_buf has sequence of characters that are seperated by
* in_buf has sequence of characters that are separated by
* the character ';'. The last sequence does not have the
* terminating ";" character.
*/
@ -1386,6 +1386,8 @@ int main(int argc, char *argv[])
daemonize = 0;
break;
case 'h':
print_usage(argv);
exit(0);
default:
print_usage(argv);
exit(EXIT_FAILURE);
@ -1490,7 +1492,7 @@ int main(int argc, char *argv[])
case KVP_OP_GET_IP_INFO:
kvp_ip_val = &hv_msg->body.kvp_ip_val;
error = kvp_mac_to_ip(kvp_ip_val);
error = kvp_mac_to_ip(kvp_ip_val);
if (error)
hv_msg->error = error;

View File

@ -12,7 +12,7 @@
# be used to configure the interface.
#
# Each Distro is expected to implement this script in a distro specific
# fashion. For instance on Distros that ship with Network Manager enabled,
# fashion. For instance, on Distros that ship with Network Manager enabled,
# this script can be based on the Network Manager APIs for configuring the
# interface.
#

View File

@ -42,7 +42,7 @@ static int vss_do_freeze(char *dir, unsigned int cmd)
* If a partition is mounted more than once, only the first
* FREEZE/THAW can succeed and the later ones will get
* EBUSY/EINVAL respectively: there could be 2 cases:
* 1) a user may mount the same partition to differnt directories
* 1) a user may mount the same partition to different directories
* by mistake or on purpose;
* 2) The subvolume of btrfs appears to have the same partition
* mounted more than once.
@ -218,6 +218,8 @@ int main(int argc, char *argv[])
daemonize = 0;
break;
case 'h':
print_usage(argv);
exit(0);
default:
print_usage(argv);
exit(EXIT_FAILURE);

View File

@ -4,10 +4,10 @@
import os
from optparse import OptionParser
help_msg = "print verbose messages. Try -vv, -vvv for more verbose messages"
parser = OptionParser()
parser.add_option("-v", "--verbose", dest="verbose",
help="print verbose messages. Try -vv, -vvv for \
more verbose messages", action="count")
parser.add_option(
"-v", "--verbose", dest="verbose", help=help_msg, action="count")
(options, args) = parser.parse_args()
@ -21,27 +21,28 @@ if not os.path.isdir(vmbus_sys_path):
exit(-1)
vmbus_dev_dict = {
'{0e0b6031-5213-4934-818b-38d90ced39db}' : '[Operating system shutdown]',
'{9527e630-d0ae-497b-adce-e80ab0175caf}' : '[Time Synchronization]',
'{57164f39-9115-4e78-ab55-382f3bd5422d}' : '[Heartbeat]',
'{a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}' : '[Data Exchange]',
'{35fa2e29-ea23-4236-96ae-3a6ebacba440}' : '[Backup (volume checkpoint)]',
'{34d14be3-dee4-41c8-9ae7-6b174977c192}' : '[Guest services]',
'{525074dc-8985-46e2-8057-a307dc18a502}' : '[Dynamic Memory]',
'{cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}' : 'Synthetic mouse',
'{f912ad6d-2b17-48ea-bd65-f927a61c7684}' : 'Synthetic keyboard',
'{da0a7802-e377-4aac-8e77-0558eb1073f8}' : 'Synthetic framebuffer adapter',
'{f8615163-df3e-46c5-913f-f2d2f965ed0e}' : 'Synthetic network adapter',
'{32412632-86cb-44a2-9b5c-50d1417354f5}' : 'Synthetic IDE Controller',
'{ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}' : 'Synthetic SCSI Controller',
'{2f9bcc4a-0069-4af3-b76b-6fd0be528cda}' : 'Synthetic fiber channel adapter',
'{8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}' : 'Synthetic RDMA adapter',
'{44c4f61d-4444-4400-9d52-802e27ede19f}' : 'PCI Express pass-through',
'{276aacf4-ac15-426c-98dd-7521ad3f01fe}' : '[Reserved system device]',
'{f8e65716-3cb3-4a06-9a60-1889c5cccab5}' : '[Reserved system device]',
'{3375baf4-9e15-4b30-b765-67acb10d607b}' : '[Reserved system device]',
'{0e0b6031-5213-4934-818b-38d90ced39db}': '[Operating system shutdown]',
'{9527e630-d0ae-497b-adce-e80ab0175caf}': '[Time Synchronization]',
'{57164f39-9115-4e78-ab55-382f3bd5422d}': '[Heartbeat]',
'{a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}': '[Data Exchange]',
'{35fa2e29-ea23-4236-96ae-3a6ebacba440}': '[Backup (volume checkpoint)]',
'{34d14be3-dee4-41c8-9ae7-6b174977c192}': '[Guest services]',
'{525074dc-8985-46e2-8057-a307dc18a502}': '[Dynamic Memory]',
'{cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}': 'Synthetic mouse',
'{f912ad6d-2b17-48ea-bd65-f927a61c7684}': 'Synthetic keyboard',
'{da0a7802-e377-4aac-8e77-0558eb1073f8}': 'Synthetic framebuffer adapter',
'{f8615163-df3e-46c5-913f-f2d2f965ed0e}': 'Synthetic network adapter',
'{32412632-86cb-44a2-9b5c-50d1417354f5}': 'Synthetic IDE Controller',
'{ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}': 'Synthetic SCSI Controller',
'{2f9bcc4a-0069-4af3-b76b-6fd0be528cda}': 'Synthetic fiber channel adapter',
'{8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}': 'Synthetic RDMA adapter',
'{44c4f61d-4444-4400-9d52-802e27ede19f}': 'PCI Express pass-through',
'{276aacf4-ac15-426c-98dd-7521ad3f01fe}': '[Reserved system device]',
'{f8e65716-3cb3-4a06-9a60-1889c5cccab5}': '[Reserved system device]',
'{3375baf4-9e15-4b30-b765-67acb10d607b}': '[Reserved system device]',
}
def get_vmbus_dev_attr(dev_name, attr):
try:
f = open('%s/%s/%s' % (vmbus_sys_path, dev_name, attr), 'r')
@ -52,6 +53,7 @@ def get_vmbus_dev_attr(dev_name, attr):
return lines
class VMBus_Dev:
pass
@ -66,12 +68,13 @@ for f in os.listdir(vmbus_sys_path):
chn_vp_mapping = get_vmbus_dev_attr(f, 'channel_vp_mapping')
chn_vp_mapping = [c.strip() for c in chn_vp_mapping]
chn_vp_mapping = sorted(chn_vp_mapping,
key = lambda c : int(c.split(':')[0]))
chn_vp_mapping = sorted(
chn_vp_mapping, key=lambda c: int(c.split(':')[0]))
chn_vp_mapping = ['\tRel_ID=%s, target_cpu=%s' %
(c.split(':')[0], c.split(':')[1])
for c in chn_vp_mapping]
chn_vp_mapping = [
'\tRel_ID=%s, target_cpu=%s' %
(c.split(':')[0], c.split(':')[1]) for c in chn_vp_mapping
]
d = VMBus_Dev()
d.sysfs_path = '%s/%s' % (vmbus_sys_path, f)
d.vmbus_id = vmbus_id
@ -85,7 +88,7 @@ for f in os.listdir(vmbus_sys_path):
vmbus_dev_list.append(d)
vmbus_dev_list = sorted(vmbus_dev_list, key = lambda d : int(d.vmbus_id))
vmbus_dev_list = sorted(vmbus_dev_list, key=lambda d: int(d.vmbus_id))
format0 = '%2s: %s'
format1 = '%2s: Class_ID = %s - %s\n%s'
@ -95,9 +98,15 @@ for d in vmbus_dev_list:
if verbose == 0:
print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc))
elif verbose == 1:
print (('VMBUS ID ' + format1) % \
(d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping))
print(
('VMBUS ID ' + format1) %
(d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)
)
else:
print (('VMBUS ID ' + format2) % \
(d.vmbus_id, d.class_id, d.dev_desc, \
d.device_id, d.sysfs_path, d.chn_vp_mapping))
print(
('VMBUS ID ' + format2) %
(
d.vmbus_id, d.class_id, d.dev_desc,
d.device_id, d.sysfs_path, d.chn_vp_mapping
)
)