diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c index 43493fc64a9b604b32822ea7668ff4e0a8a03c89..4672bd8785357787a8d037ce66ea3212b0bf846a 100644 --- a/src/hypervisor/virhostdev.c +++ b/src/hypervisor/virhostdev.c @@ -707,8 +707,6 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr, * shared across guests. Check if that's the case. */ if (usesVFIO) { data.usesVFIO = true; - if (flags & VIR_HOSTDEV_SP_SECURE) - virtccaVirPCIDeviceSetSecure(pci, true); if (virPCIDeviceAddressIOMMUGroupIterate(devAddr, virHostdevIsPCINodeDeviceUsed, &data) < 0) @@ -737,9 +735,6 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr, * actual device going forward */ VIR_DEBUG("Detaching managed PCI device %s", virPCIDeviceGetName(pci)); - if (virtccaVirPCIDeviceGetSecure(pci)) - virtccaVirPCIDeviceDetach(pci); - if (virPCIDeviceDetach(pci, mgr->activePCIHostdevs, mgr->inactivePCIHostdevs) < 0) diff --git a/src/hypervisor/virhostdev.h b/src/hypervisor/virhostdev.h index 6150d327aa2ec0d38ec46c74ea62774c121e1046..642d753ffb00d57856f2ba99f2498e42c24893bd 100644 --- a/src/hypervisor/virhostdev.h +++ b/src/hypervisor/virhostdev.h @@ -38,7 +38,6 @@ typedef enum { VIR_HOSTDEV_SP_PCI = (1 << 8), /* support pci passthrough */ VIR_HOSTDEV_SP_USB = (1 << 9), /* support usb passthrough */ VIR_HOSTDEV_SP_SCSI = (1 << 10), /* support scsi passthrough */ - VIR_HOSTDEV_SP_SECURE = (1 << 11), /* support secure dev passthrough */ } virHostdevFlag; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 89dfd23c8417d7b0e97f06034334297f3d7e080c..6a5b93ecff4bd1e22866a45f960712a284ed4870 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7518,9 +7518,6 @@ qemuProcessPrepareHost(virQEMUDriver *driver, hostdev_flags |= VIR_HOSTDEV_STRICT_ACS_CHECK; if (flags & VIR_QEMU_PROCESS_START_NEW) hostdev_flags |= VIR_HOSTDEV_COLD_BOOT; - if (vm->def->sec && vm->def->sec->sectype == VIR_DOMAIN_LAUNCH_SECURITY_CVM) { - hostdev_flags |= VIR_HOSTDEV_SP_SECURE; - } if (qemuHostdevPrepareDomainDevices(driver, vm->def, hostdev_flags) < 0) return -1; diff --git a/src/util/virpci.c b/src/util/virpci.c index c5ae10956fb88bce34c0fd9f6f25e506bd14ec12..baacde4c14f783e97a44e5eaba29a5d703a2e5b0 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -94,9 +94,6 @@ struct _virPCIDevice { bool unbind_from_stub; bool remove_slot; bool reprobe; - - /* used by virtcca CoDA feature*/ - bool secure; }; struct _virPCIDeviceList { @@ -1380,56 +1377,6 @@ virPCIDeviceDetach(virPCIDevice *dev, return 0; } -int -virtccaVirPCIDeviceDetach(virPCIDevice *_dev) -{ - int ret = 0; - virPCIDevice *dev = NULL; - size_t i, j; - - /* Given bus number, there are 32 devices and 8 functions */ - for (i = 0; i < 32; i++) { - for (j = 0; j < 8; j++) { - virPCIDeviceAddress devAddr = {.domain = _dev->address.domain, - .bus = _dev->address.bus, - .slot = i, .function = j}; - g_autofree char *name = virPCIDeviceAddressAsString(&devAddr); - g_autofree char *path = g_strdup_printf(PCI_SYSFS "devices/%s/config", name); - - if (!virFileExists(path)) - continue; - - if (!(dev = virPCIDeviceNew(&devAddr))) - continue; - - virPCIDeviceSetStubDriverType(dev, VIR_PCI_STUB_DRIVER_VFIO); - - if (virPCIDeviceBindToStub(dev) < 0) { - ret = -1; - goto cleanup; - } - virPCIDeviceFree(dev); - } - } - return ret; - -cleanup: - virPCIDeviceFree(dev); - return ret; -} - -bool -virtccaVirPCIDeviceGetSecure(virPCIDevice *dev) -{ - return dev->secure; -} - -void -virtccaVirPCIDeviceSetSecure(virPCIDevice *dev, bool secure) -{ - dev->secure = secure; -} - /* * Pre-condition: inactivePCIHostdevs & activePCIHostdevs * are locked diff --git a/src/util/virpci.h b/src/util/virpci.h index 7cc754f4af01f428a7d2b66a290e794f8cdb15df..faca6cf6f997476470c05c6c8f15dbcf52bfae5c 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -302,9 +302,6 @@ void virPCIEDeviceInfoFree(virPCIEDeviceInfo *dev); void virPCIDeviceAddressFree(virPCIDeviceAddress *address); -int virtccaVirPCIDeviceDetach(virPCIDevice *dev); -bool virtccaVirPCIDeviceGetSecure(virPCIDevice *dev); -void virtccaVirPCIDeviceSetSecure(virPCIDevice *dev, bool secure); G_DEFINE_AUTOPTR_CLEANUP_FUNC(virPCIDevice, virPCIDeviceFree); G_DEFINE_AUTOPTR_CLEANUP_FUNC(virPCIDeviceAddress, virPCIDeviceAddressFree); G_DEFINE_AUTOPTR_CLEANUP_FUNC(virPCIEDeviceInfo, virPCIEDeviceInfoFree);