|
|
7a3408 |
From 5bbe76ba6427b8c4ab500b1404275c298dd1abb4 Mon Sep 17 00:00:00 2001
|
|
|
7a3408 |
Message-Id: <5bbe76ba6427b8c4ab500b1404275c298dd1abb4@dist-git>
|
|
|
7a3408 |
From: Laine Stump <laine@laine.org>
|
|
|
7a3408 |
Date: Wed, 2 Sep 2015 15:55:24 -0400
|
|
|
7a3408 |
Subject: [PATCH] hostdev: skip ACS check when using VFIO for device assignment
|
|
|
7a3408 |
|
|
|
7a3408 |
The ACS checks are meaningless when using the more modern VFIO driver
|
|
|
7a3408 |
for device assignment since VFIO has its own more complete and exact
|
|
|
7a3408 |
checks, but I didn't realize that when I added support for VFIO. This
|
|
|
7a3408 |
patch eliminates the ACS check when preparing PCI devices for
|
|
|
7a3408 |
assignment if VFIO is being used.
|
|
|
7a3408 |
|
|
|
7a3408 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1256486
|
|
|
7a3408 |
|
|
|
7a3408 |
(cherry picked from commit 108d591b1144bc6cb5d1199f6fc23ee972b76e86)
|
|
|
7a3408 |
|
|
|
7a3408 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
7a3408 |
---
|
|
|
7a3408 |
src/util/virhostdev.c | 5 ++---
|
|
|
7a3408 |
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
7a3408 |
|
|
|
7a3408 |
diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c
|
|
|
7a3408 |
index 529753c..0bc5120 100644
|
|
|
7a3408 |
--- a/src/util/virhostdev.c
|
|
|
7a3408 |
+++ b/src/util/virhostdev.c
|
|
|
7a3408 |
@@ -1,6 +1,6 @@
|
|
|
7a3408 |
/* virhostdev.c: hostdev management
|
|
|
7a3408 |
*
|
|
|
7a3408 |
- * Copyright (C) 2006-2007, 2009-2013 Red Hat, Inc.
|
|
|
7a3408 |
+ * Copyright (C) 2006-2007, 2009-2015 Red Hat, Inc.
|
|
|
7a3408 |
* Copyright (C) 2006 Daniel P. Berrange
|
|
|
7a3408 |
* Copyright (C) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
7a3408 |
*
|
|
|
7a3408 |
@@ -230,7 +230,6 @@ virHostdevGetPCIHostDeviceList(virDomainHostdevDefPtr *hostdevs, int nhostdevs)
|
|
|
7a3408 |
virObjectUnref(list);
|
|
|
7a3408 |
return NULL;
|
|
|
7a3408 |
}
|
|
|
7a3408 |
-
|
|
|
7a3408 |
if (virPCIDeviceListAdd(list, dev) < 0) {
|
|
|
7a3408 |
virPCIDeviceFree(dev);
|
|
|
7a3408 |
virObjectUnref(list);
|
|
|
7a3408 |
@@ -579,7 +578,7 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
|
|
|
7a3408 |
struct virHostdevIsPCINodeDeviceUsedData data = {hostdev_mgr, dom_name,
|
|
|
7a3408 |
usesVfio};
|
|
|
7a3408 |
|
|
|
7a3408 |
- if (!virPCIDeviceIsAssignable(dev, strict_acs_check)) {
|
|
|
7a3408 |
+ if (!usesVfio && !virPCIDeviceIsAssignable(dev, strict_acs_check)) {
|
|
|
7a3408 |
virReportError(VIR_ERR_OPERATION_INVALID,
|
|
|
7a3408 |
_("PCI device %s is not assignable"),
|
|
|
7a3408 |
virPCIDeviceGetName(dev));
|
|
|
7a3408 |
--
|
|
|
7a3408 |
2.5.1
|
|
|
7a3408 |
|