-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path0007-libxl-plug-workaround-for-missing-pcidev-group-assig.patch
51 lines (42 loc) · 1.84 KB
/
0007-libxl-plug-workaround-for-missing-pcidev-group-assig.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From b106b295a60a73b987f8c58993e3e84ea1f9a42e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
Date: Sat, 28 Nov 2015 18:27:59 +0100
Subject: [PATCH] libxl: plug workaround for missing pcidev group assignment to
'nostrictreset' option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From commit in xen tree:
commit 11d942df114045860a27563418cf5dbd5bcd0402
Author: Tiejun Chen <[email protected]>
Date: Mon Sep 14 13:42:34 2015 +0200
vtd/iommu: permit group devices to passthrough in relaxed mode
Currently we don't allow passing through any group devices which are
sharing same RMRR entry since it would break security among VMs. And
indeed, we expect we can figure out a better way to handle this kind
of case completely.
But before the group assignment gets implemented, we might make this
permission dependent on our RMRR policy. So, now it would be allowed
in the relaxed mode.
nostrictreset isn't the best place to put such workaround, but it is
similar in consequences (weaken PCI passthrough).
Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
---
src/libxl/libxl_conf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 3221b8f0d9..edd8d15b64 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -2284,6 +2284,9 @@ libxlMakePCI(virDomainHostdevDef *hostdev, libxl_device_pci *pcidev)
pcidev->dev = pcisrc->addr.slot;
pcidev->func = pcisrc->addr.function;
pcidev->permissive = hostdev->writeFiltering == VIR_TRISTATE_BOOL_NO;
+ /* there is no LIBXL_HAVE_xxx for this field... */
+ if (hostdev->nostrictreset)
+ pcidev->rdm_policy = LIBXL_RDM_RESERVE_POLICY_RELAXED;
return 0;
}
--
2.45.2