Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'vfio-v5.13-rc1pt2' of git://github.com/awilliam/linux-vfio

Pull more VFIO updates from Alex Williamson:
"A second small set of commits for this merge window, primarily to
unbreak some deletions from our uAPI header.

- Additional mdev sample driver cleanup (Dan Carpenter)

- Doc fix (Alyssa Ross)

- Unbreak uAPI from NVLink2 support removal (Alex Williamson)"

* tag 'vfio-v5.13-rc1pt2' of git://github.com/awilliam/linux-vfio:
docs: vfio: fix typo
vfio/pci: Revert nvlink removal uAPI breakage
vfio/mdev: remove unnecessary NULL check in mbochs_create()

+44 -9
+1 -1
Documentation/driver-api/vfio.rst
··· 2 2 VFIO - "Virtual Function I/O" [1]_ 3 3 ================================== 4 4 5 - Many modern system now provide DMA and interrupt remapping facilities 5 + Many modern systems now provide DMA and interrupt remapping facilities 6 6 to help ensure I/O devices behave within the boundaries they've been 7 7 allotted. This includes x86 hardware with AMD-Vi and Intel VT-d, 8 8 POWER systems with Partitionable Endpoints (PEs) and embedded PowerPC
+42 -4
include/uapi/linux/vfio.h
··· 333 333 #define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3) 334 334 335 335 /* 10de vendor PCI sub-types */ 336 - /* subtype 1 was VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM, don't use */ 336 + /* 337 + * NVIDIA GPU NVlink2 RAM is coherent RAM mapped onto the host address space. 338 + * 339 + * Deprecated, region no longer provided 340 + */ 341 + #define VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM (1) 337 342 338 343 /* 1014 vendor PCI sub-types */ 339 - /* subtype 1 was VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD, don't use */ 344 + /* 345 + * IBM NPU NVlink2 ATSD (Address Translation Shootdown) register of NPU 346 + * to do TLB invalidation on a GPU. 347 + * 348 + * Deprecated, region no longer provided 349 + */ 350 + #define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1) 340 351 341 352 /* sub-types for VFIO_REGION_TYPE_GFX */ 342 353 #define VFIO_REGION_SUBTYPE_GFX_EDID (1) ··· 641 630 */ 642 631 #define VFIO_REGION_INFO_CAP_MSIX_MAPPABLE 3 643 632 644 - /* subtype 4 was VFIO_REGION_INFO_CAP_NVLINK2_SSATGT, don't use */ 633 + /* 634 + * Capability with compressed real address (aka SSA - small system address) 635 + * where GPU RAM is mapped on a system bus. Used by a GPU for DMA routing 636 + * and by the userspace to associate a NVLink bridge with a GPU. 637 + * 638 + * Deprecated, capability no longer provided 639 + */ 640 + #define VFIO_REGION_INFO_CAP_NVLINK2_SSATGT 4 645 641 646 - /* subtype 5 was VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD, don't use */ 642 + struct vfio_region_info_cap_nvlink2_ssatgt { 643 + struct vfio_info_cap_header header; 644 + __u64 tgt; 645 + }; 646 + 647 + /* 648 + * Capability with an NVLink link speed. The value is read by 649 + * the NVlink2 bridge driver from the bridge's "ibm,nvlink-speed" 650 + * property in the device tree. The value is fixed in the hardware 651 + * and failing to provide the correct value results in the link 652 + * not working with no indication from the driver why. 653 + * 654 + * Deprecated, capability no longer provided 655 + */ 656 + #define VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD 5 657 + 658 + struct vfio_region_info_cap_nvlink2_lnkspd { 659 + struct vfio_info_cap_header header; 660 + __u32 link_speed; 661 + __u32 __pad; 662 + }; 647 663 648 664 /** 649 665 * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9,
-2
samples/vfio-mdev/mbochs.c
··· 513 513 struct device *dev = mdev_dev(mdev); 514 514 struct mdev_state *mdev_state; 515 515 516 - if (!type) 517 - type = &mbochs_types[0]; 518 516 if (type->mbytes + mbochs_used_mbytes > max_mbytes) 519 517 return -ENOMEM; 520 518
+1 -2
samples/vfio-mdev/mdpy.c
··· 667 667 &mdpy_types[mtype_get_type_group_id(mtype)]; 668 668 669 669 return sprintf(buf, "virtual display, %dx%d framebuffer\n", 670 - type ? type->width : 0, 671 - type ? type->height : 0); 670 + type->width, type->height); 672 671 } 673 672 static MDEV_TYPE_ATTR_RO(description); 674 673