v2 of: https://www.redhat.com/archives/libvir-list/2019-July/msg00675.html As usual, you can find my patches on my github: https://github.com/zippy2/libvirt/tree/nvme_v3 https://travis-ci.org/zippy2/libvirt/builds/590033775 (Yeah, my branch is really called _v3 because reasons) diff to v1: - A lot. Hopefully all Peter's comments are worked in Michal Prívozník (39): virhostdev: Fix const correctness of virHostdevIs{PCINet,SCSI,Mdev}Device() virhostdev: Introduce and use virHostdevIsVFIODevice conf: Introduce virDomainDefHasMdevHostdev qemu_hostdev: Introduce qemuHostdevNeedsVFIO() qemu: Introduce qemuDomainNeedsVFIO qemu_cgroup: Teardown Cgroup for more host device types qemu: Explicitly add/remove /dev/vfio/vfio to/from NS/CGroups qemu_domain: Drop few useless checks in qemuDomainGetHostdevPath qemuDomainGetHostdevPath: Drop @freeTmpPath qemuDomainGetHostdevPath: Use more VIR_AUTOFREE/VIR_AUTOPTR qemuDomainGetHostdevPath: Don't include /dev/vfio/vfio in returned paths qemu: Drop some 'cleanup' labels virpci: Introduce and use virPCIDeviceAddressGetIOMMUGroupDev virHostdevPreparePCIDevices: Separate out function body virHostdevReAttachPCIDevices: Separate out function body virpci: Introduce virPCIDeviceAddressCopy qemuMigrationSrcIsSafe: Rework slightly schemas: Introduce disk type NVMe conf: Format and parse NVMe type disk virstoragefile: Introduce virStorageSourceChainHasNVMe domain_conf: Introduce virDomainDefHasNVMeDisk util: Introduce virNVMeDevice module virhostdev: Include virNVMeDevice module virpcimock: Introduce NVMe driver and devices virhostdevtest: Test virNVMeDevice assignment qemu: prepare NVMe devices too qemu: Take NVMe disks into account when calculating memlock limit qemu: Create NVMe disk in domain namespace qemu: Mark NVMe disks as 'need VFIO' qemu: Allow NVMe disk in CGroups security_selinux: Simplify virSecuritySELinuxSetImageLabelInternal virSecuritySELinuxRestoreImageLabelInt: Don't skip non-local storage qemu_capabilities: Introduce QEMU_CAPS_DRIVE_NVME qemu: Generate command line of NVMe disks qemu_monitor_text: Catch IOMMU/VFIO related errors in qemuMonitorTextAddDrive qemu: Don't leak storage perms on failure in qemuDomainAttachDiskGeneric qemu: Allow forcing VFIO when computing memlock limit qemu_hotplug: Prepare NVMe disks on hotplug virsh: Introduce nvme disk to domblklist docs/formatdomain.html.in | 57 ++- docs/schemas/domaincommon.rng | 32 ++ src/conf/domain_conf.c | 129 ++++- src/conf/domain_conf.h | 6 + src/libvirt_private.syms | 30 ++ src/libxl/xen_xl.c | 1 + src/qemu/qemu_block.c | 25 + src/qemu/qemu_capabilities.c | 4 + src/qemu/qemu_capabilities.h | 3 + src/qemu/qemu_cgroup.c | 216 ++++++--- src/qemu/qemu_command.c | 6 +- src/qemu/qemu_domain.c | 409 +++++++++------- src/qemu/qemu_domain.h | 17 +- src/qemu/qemu_driver.c | 4 + src/qemu/qemu_hostdev.c | 80 ++- src/qemu/qemu_hostdev.h | 18 + src/qemu/qemu_hotplug.c | 39 +- src/qemu/qemu_migration.c | 30 +- src/qemu/qemu_monitor_text.c | 7 + src/qemu/qemu_process.c | 7 + src/security/security_apparmor.c | 33 +- src/security/security_dac.c | 30 ++ src/security/security_selinux.c | 82 ++-- src/util/Makefile.inc.am | 2 + src/util/virhostdev.c | 455 ++++++++++++++++-- src/util/virhostdev.h | 44 +- src/util/virnvme.c | 454 +++++++++++++++++ src/util/virnvme.h | 95 ++++ src/util/virpci.c | 29 ++ src/util/virpci.h | 5 + src/util/virstoragefile.c | 73 +++ src/util/virstoragefile.h | 19 + .../caps_2.12.0.aarch64.xml | 1 + .../caps_2.12.0.ppc64.xml | 1 + .../caps_2.12.0.s390x.xml | 1 + .../caps_2.12.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 + .../caps_3.0.0.riscv32.xml | 1 + .../caps_3.0.0.riscv64.xml | 1 + .../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 + .../caps_3.0.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 + .../caps_3.1.0.x86_64.xml | 1 + .../caps_4.0.0.aarch64.xml | 1 + .../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 + .../caps_4.0.0.riscv32.xml | 1 + .../caps_4.0.0.riscv64.xml | 1 + .../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 + .../caps_4.0.0.x86_64.xml | 1 + .../caps_4.1.0.x86_64.xml | 1 + tests/qemumemlocktest.c | 2 +- .../disk-nvme.x86_64-latest.args | 53 ++ tests/qemuxml2argvdata/disk-nvme.xml | 63 +++ tests/qemuxml2argvtest.c | 1 + tests/qemuxml2xmloutdata/disk-nvme.xml | 1 + tests/qemuxml2xmltest.c | 1 + tests/virhostdevtest.c | 97 ++++ tests/virpcimock.c | 3 + tests/virpcitestdata/0000-01-00.0.config | Bin 0 -> 4096 bytes tests/virpcitestdata/0000-02-00.0.config | Bin 0 -> 4096 bytes tools/virsh-domain-monitor.c | 31 +- 61 files changed, 2330 insertions(+), 381 deletions(-) create mode 100644 src/util/virnvme.c create mode 100644 src/util/virnvme.h create mode 100644 tests/qemuxml2argvdata/disk-nvme.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-nvme.xml create mode 120000 tests/qemuxml2xmloutdata/disk-nvme.xml create mode 100644 tests/virpcitestdata/0000-01-00.0.config create mode 100644 tests/virpcitestdata/0000-02-00.0.config -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list