On 07/05/2025 08:47, Peter Krempa wrote:
On Tue, May 06, 2025 at 17:00:11 +0100, Tim Small via Devel wrote:
Add check for <forward type='hostdev'> networks which were previously
neglected (as opposed to explicit PCI hostdev devices), so that they can
be granted the necessary permissions for PCI device access. The network
type lookup in-turn requires the helper to read libvirt.conf

Hi Peter,

Thanks for the review. I'll send a revised patch series shortly. Together with the comment below, they should address the points raised in your review I think...


@@ -1306,6 +1312,11 @@ get_files(vahControl * ctl)
                  if (!virDomainNetIsVirtioModel(net))
                      continue;
              }
+            if (net &&
+                    net->type == VIR_DOMAIN_NET_TYPE_NETWORK &&
+                    virDomainNetResolveActualType(net) == 
VIR_DOMAIN_NET_TYPE_HOSTDEV) {

here too

+                continue;

IIUC this shouldn't be needed. By definition hostdev-based networks
can't be 'virito' so they should have been already skipped by the above
condition.

An earlier check for virDomainNetGetModelString(net) returns false for conditional NIC virtual functions shared HOSTDEV type networks, so the virDomainNetIsVirtioModel(net) test isn't reached, and the continue is skipped.

Updated formatting in the revised patch has resulted in the call to virDomainNetGetModelString(net) showing up in the context now.

Thanks,

Tim.

Reply via email to