We were unable to reproduce it using the following configuration and steps:
HOST:
  PF Intel Corporation Ethernet Controller X710 for 10GbE SFP+ [8086:1572]
  OS: Ubuntu 22.04.4 LTS 6.11.0-061100rc4-generic
  FW firmware-version: 9.50 0x8000f177 1.3597.0
  PF version: 6.11.0-061100rc4-generic
VM:
  PF Intel Corporation Ethernet Virtual Function 700 Series [8086:154c]
  OS: Ubuntu 22.04.2 LTS 6.11.0-061100rc4-generic
  PF version: 6.11.0-061100rc4-generic

Steps:
1. Spawn 1 VF
2. Use script in order to get xml of the vf, it should spawn in 
/tmp/temp_vf_config/
#!/bin/bash
temp_dir="/tmp/temp_vf_config"

if [ -z "$temp_dir" ];
then
    echo "temp_dir variable is empty, aborting to avoid destroying filesystem"
    exit 1
else
    rm -rf $temp_dir/*
    mkdir -p $temp_dir >/dev/null 2>&1
fi
for VF in $(lspci | grep -i "virtual function" | cut -f 1 -d \ );
do
    busid=$(echo $VF | cut -f 1 -d \:);
    slotid=$(echo $VF | cut -f 2 -d \: | cut -f 1 -d \.);
    functionid=$(echo $VF | cut -f 2 -d \: | cut -f 2 -d \.);
    echo "BUS: $busid, SLOT: $slotid, FUNCTION: $functionid"

echo -e "<hostdev mode='subsystem' type='pci' 
managed='yes'>\n<source>\n<address domain='0x0000' bus='0x$busid' 
slot='0x$slotid' function='0x$functionid'/>\n</source>\n</hostdev>" > 
$temp_dir/$busid-$slotid-$functionid

done

3. Create VM
4. Attach VF to VM while VM is disabled, then enable VM
5. Hot detach VF
6. Hot attach VF

Expected result:
VF detaches and attaches successfully

Actual result:
VF does not detach/attach at all.
Possible to set down/up VF when it's detached.
No error in dmesg, actually nothing appear in dmesg.

We had to replace the XML file provided as it would not produce a working 
configuration. Can you advise us on any setup inconsistencies or changes that 
would be required to reproduce it?


Best regards, 
Jan

Reply via email to