Merge tag 'vfio-v5.0-rc4' of git://github.com/awilliam/linux-vfio
Pull VFIO fixes from Alex Williamson: - cleanup licenses in new files (Thomas Gleixner) - cleanup new compiler warnings (Alexey Kardashevskiy) * tag 'vfio-v5.0-rc4' of git://github.com/awilliam/linux-vfio: vfio-pci/nvlink2: Fix ancient gcc warnings vfio/pci: Cleanup license mess
This commit is contained in:
@@ -1,13 +1,9 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/*
|
/*
|
||||||
* VFIO PCI mmap/mmap_fault tracepoints
|
* VFIO PCI mmap/mmap_fault tracepoints
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 IBM Corp. All rights reserved.
|
* Copyright (C) 2018 IBM Corp. All rights reserved.
|
||||||
* Author: Alexey Kardashevskiy <aik@ozlabs.ru>
|
* Author: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef TRACE_SYSTEM
|
#undef TRACE_SYSTEM
|
||||||
|
@@ -1,14 +1,10 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0+
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* VFIO PCI NVIDIA Whitherspoon GPU support a.k.a. NVLink2.
|
* VFIO PCI NVIDIA Whitherspoon GPU support a.k.a. NVLink2.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 IBM Corp. All rights reserved.
|
* Copyright (C) 2018 IBM Corp. All rights reserved.
|
||||||
* Author: Alexey Kardashevskiy <aik@ozlabs.ru>
|
* Author: Alexey Kardashevskiy <aik@ozlabs.ru>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* Register an on-GPU RAM region for cacheable access.
|
* Register an on-GPU RAM region for cacheable access.
|
||||||
*
|
*
|
||||||
* Derived from original vfio_pci_igd.c:
|
* Derived from original vfio_pci_igd.c:
|
||||||
@@ -178,11 +174,11 @@ static int vfio_pci_nvgpu_add_capability(struct vfio_pci_device *vdev,
|
|||||||
struct vfio_pci_region *region, struct vfio_info_cap *caps)
|
struct vfio_pci_region *region, struct vfio_info_cap *caps)
|
||||||
{
|
{
|
||||||
struct vfio_pci_nvgpu_data *data = region->data;
|
struct vfio_pci_nvgpu_data *data = region->data;
|
||||||
struct vfio_region_info_cap_nvlink2_ssatgt cap = { 0 };
|
struct vfio_region_info_cap_nvlink2_ssatgt cap = {
|
||||||
|
.header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT,
|
||||||
cap.header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT;
|
.header.version = 1,
|
||||||
cap.header.version = 1;
|
.tgt = data->gpu_tgt
|
||||||
cap.tgt = data->gpu_tgt;
|
};
|
||||||
|
|
||||||
return vfio_info_add_capability(caps, &cap.header, sizeof(cap));
|
return vfio_info_add_capability(caps, &cap.header, sizeof(cap));
|
||||||
}
|
}
|
||||||
@@ -365,18 +361,18 @@ static int vfio_pci_npu2_add_capability(struct vfio_pci_device *vdev,
|
|||||||
struct vfio_pci_region *region, struct vfio_info_cap *caps)
|
struct vfio_pci_region *region, struct vfio_info_cap *caps)
|
||||||
{
|
{
|
||||||
struct vfio_pci_npu2_data *data = region->data;
|
struct vfio_pci_npu2_data *data = region->data;
|
||||||
struct vfio_region_info_cap_nvlink2_ssatgt captgt = { 0 };
|
struct vfio_region_info_cap_nvlink2_ssatgt captgt = {
|
||||||
struct vfio_region_info_cap_nvlink2_lnkspd capspd = { 0 };
|
.header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT,
|
||||||
|
.header.version = 1,
|
||||||
|
.tgt = data->gpu_tgt
|
||||||
|
};
|
||||||
|
struct vfio_region_info_cap_nvlink2_lnkspd capspd = {
|
||||||
|
.header.id = VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD,
|
||||||
|
.header.version = 1,
|
||||||
|
.link_speed = data->link_speed
|
||||||
|
};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
captgt.header.id = VFIO_REGION_INFO_CAP_NVLINK2_SSATGT;
|
|
||||||
captgt.header.version = 1;
|
|
||||||
captgt.tgt = data->gpu_tgt;
|
|
||||||
|
|
||||||
capspd.header.id = VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD;
|
|
||||||
capspd.header.version = 1;
|
|
||||||
capspd.link_speed = data->link_speed;
|
|
||||||
|
|
||||||
ret = vfio_info_add_capability(caps, &captgt.header, sizeof(captgt));
|
ret = vfio_info_add_capability(caps, &captgt.header, sizeof(captgt));
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user