On 8/25/22 17:37, DERUMIER, Alexandre wrote:
I don't known if it's a bug in the gui, or the api.

But, if you update an existing mapping,with currently,a simple function
pci with mdev=1, and you change it to a pci multifunction with mdev=0,

the mdev value is not updated.

(This occur in the other direction too)


original singly function with mdev=1
--------
{
    "pci": {
      "sharednvidia": {
        "pve2": {
          "path": "0000:02:00.0",
          "subsystem-vendor": "0x10de",
          "subsystem-device": "0x131b",
          "device": "0x1c31",
          "mdev": "1",
          "iommugroup": "47",
          "vendor": "0x10de"
        },
      }
    },
    "digest": "7e544172eb5487e753672f6511bae9602338de6f"
}


after update to multiple function, mdev should be 0 instead 1.

--------
{
    "pci": {
      "sharednvidia": {
        "pve2": {
          "path": "0000:02:00",
          "subsystem-vendor": "0x10de",
          "subsystem-device": "0x131b",
          "device": "0x1c31",
          "mdev": "1",
          "iommugroup": "47",
          "vendor": "0x10de"
        },
      }
    },
    "digest": "7e544172eb5487e753672f6511bae9602338de6f"
}


well the api/gui do both the 'right' thing here, but i see what you mean...
in your case the first function '02:00.0' has mediated device support,
so we extract that from there

but we actualy don't want that in the case of a multifunction device
(since later in the code we disallow/ignore it anyway)

thanks for catching :)

maybe we need better ux here too somehow, since currently when you want
to use mdevs, you cannot select the whole device (as a multifunction device)
but have to select the individual functions seperately
(i tried to make that clear with the 'pass through as one device' sentence)



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to