mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
e9b534905f
Due to a rather unfortunate misunderstanding, we were parsing the list of defined devices from mdevctl incorrectly. Since my primary development machine only has a single device capable of mdevs, I apparently neglected to test multiple parent devices and made some assumptions based on reading the mdevctl code. These assumptions turned out to be incorrect, so the parsing failed when devices from more than one parent device were returned. The details: mdevctl returns an array of objects representing the defined devices. But instead of an array of multiple objects (with each object representing a parent device), the array always contains only a single object. That object has a separate property for each parent device. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
58 lines
1.1 KiB
JSON
58 lines
1.1 KiB
JSON
[
|
|
{
|
|
"0000:00:02.0": [
|
|
{
|
|
"200f228a-c80a-4d50-bfb7-f5a0e4e34045": {
|
|
"mdev_type": "i915-GVTg_V5_4",
|
|
"start": "manual"
|
|
}
|
|
},
|
|
{
|
|
"de807ffc-1923-4d5f-b6c9-b20ecebc6d4b": {
|
|
"mdev_type": "i915-GVTg_V5_4",
|
|
"start": "auto"
|
|
}
|
|
},
|
|
{
|
|
"435722ea-5f43-468a-874f-da34f1217f13": {
|
|
"mdev_type": "i915-GVTg_V5_8",
|
|
"start": "manual",
|
|
"attrs": [
|
|
{
|
|
"testattr": "42"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"matrix": [
|
|
{ "783e6dbb-ea0e-411f-94e2-717eaad438bf": {
|
|
"mdev_type": "vfio_ap-passthrough",
|
|
"start": "manual",
|
|
"attrs": [
|
|
{
|
|
"assign_adapter": "5"
|
|
},
|
|
{
|
|
"assign_adapter": "6"
|
|
},
|
|
{
|
|
"assign_domain": "0xab"
|
|
},
|
|
{
|
|
"assign_control_domain": "0xab"
|
|
},
|
|
{
|
|
"assign_domain": "4"
|
|
},
|
|
{
|
|
"assign_control_domain": "4"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|