You have been subscribed to a public bug:

== Comment: #0 - Kowshik Jois B S <[email protected]> - 2025-03-07 
02:15:20 ==
---Problem Description---
A reboot is required for the interfaces attached through "virsh 
attach-interface" to be reflected on the guest. Same behavior is observed with 
or without the "--live" option.
 
---Debugger---
A debugger is not configured
 
---uname output---
Linux ubuntu2504 6.12.0-16-generic #16-Ubuntu SMP Fri Feb 14 16:16:28 UTC 2025 
ppc64le ppc64le ppc64le GNU/Linux
 
Machine Type = P10 Rainier 
 
Contact Information = [email protected] 
 
---Steps to Reproduce---
1. On a Ubuntu25.04 Host, create a Ubuntu25.04 guest
2. Take a note of available interfaces on the guest and guest's xml(virsh 
dumpxml)
3. Attach an interface by using "virsh attach-interface" command
    virsh attach-interface --live Ubuntu1 bridge --source virbr0
4. Check for the interfaces again on guest and guest's xml.
    Expected: Newly added interface should be reflected on both guest and 
guest's xml
    Actual: Newly added interface is reflecting on xml but not on the guest

5. reboot the guest and check for the interfaces again.
    (Now new interfaces can be seen on both guest and xml)


---Additional Information---

# qemu-system-ppc64 --version
QEMU emulator version 9.2.1 (Debian 1:9.2.1+ds-1ubuntu3)
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

# libvirtd --version
libvirtd (libvirt) 11.0.0

virt-install command used:
virt-install --name Ubuntu1 --ram 2048 --disk 
path=/var/lib/libvirt/images/data/Ubuntu1.qcow2,size=8 --vcpus 4 --os-type 
linux --os-variant generic --network bridge=virbr0 --graphics none --console 
pty,target_type=serial --cdrom 
/var/lib/libvirt/images/plucky-live-server-ppc64el.iso

== Comment: #12 - Tasmiya Nalatwad <[email protected]> - 2025-04-11 
04:18:52 ==
Hi Team, 

The virsh attach/detach-device is failing to attach/detach the PCI
Passthrough devices to guest on Fedora-42 kernel 6.14.1-300.fc42.ppc64le

--- Host Details ---
OS : Fedora 42
Kernel : 6.14.1-300.fc42.ppc64le
Qemu : QEMU emulator version 9.2.3 (qemu-9.2.3-1.fc42)
Libvirt : libvirtd (libvirt) 11.0.0

--- Guest Details ---
OS : Fedora 42
Kernel : 6.14.1-300.fc42.ppc64lee

--- Steps to recreate the issue ---
1. Detach a pci device from host using virsh nodedev-detach command
2. Attach the device to guest using virsh attach-device command.
3. The virsh attach-device command is successful on host, but the device is not 
seen on the guest. 
4. Perform a guest reboot and check the device on guest. The device is attached 
to  the guest after reboot.
5. Similarly virsh detach-device show successful on host, but the device is not 
detached from guest until guest is rebooted. After a reboot performed on the 
guest the device gets detached.


--- pci.xml ---
<hostdev mode='subsystem' type='pci' managed='yes'>
  <source>
    <address domain='0x0028' bus='0x01' slot='0x00' function='0x0'/>
  </source>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
</hostdev>

--- virsh attach/detach-device ----
root@localhost:~# virsh attach-device vm1 pci.xml
Device attached successfully

root@localhost:~# virsh detach-device vm1 pci.xml
Device attached successfully


Thank you,
Tasmiya

== Comment: #26 - Haren Myneni <[email protected]> - 2025-04-21 16:14:24 ==
Guest /proc/device-tree:

[root@fedora41-mem device-tree]# ls
'#address-cells'                      memory@0
 aliases                              mmu
 chosen                               model
 compatible                           name
 cpus                                 openprom
 device_type                          options
 event-sources                        packages
 hypervisor                           pci@800000020000000
 ibm,drc-indexes                      pci@800000020000001
 ibm,drc-names                        phandle
 ibm,drc-power-domains                rtas
 ibm,drc-types                       '#size-cells'
 ibm,partition-name                   slof,from-fdt
 ibm,persistent-memory                system-id
 ibm,plat-res-int-priorities          vdevice
 interrupt-controller@60302031b0000   vm,uuid

[root@fedora41-mem device-tree]# find . -name ibm,drc-info -print
[root@fedora41-mem device-tree]# 

The drmgr kernel interface look for drc-index (passed by the user space)
in the drc-info and then update the device tree for the new device.

>From the guest /proc/device-tree, ibm,drc-info is missing. Hence we see
the failure with the latest drmgr (add device).

I do not know who exports this device-tree to guests in KVM environment.

Also ibm,drc-indexes, ibm,drc-names and ibm,drc-types properties are
available on guest, but not on host. Some tools such as drmgr will be
looking for same interfaces similar to powerVM.

== Comment: #28 - Haren Myneni <[email protected]> - 2025-04-22 03:05:49 ==
Amit tested with this patch without any issues. Now need to decide whether we 
support DLPAR IO kernel interface for old FW. 

Tyrel, Any concerns?

== Comment: #30 - Haren Myneni <[email protected]> - 2025-05-04 14:03:55 ==
The actual issue is guest having old device-tree entries such as drc-indexes 
instead of drc-info. So the fix should be in virsh tool to expose same 
device-tree entries that host has. 

The next fix is in the kernel to support old FW and the patch is
submitted upstream. Waiting for acceptance

https://lore.kernel.org/linuxppc-
dev/[email protected]/

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
         Status: New


** Tags: architecture-ppc64le bugnameltc-211790 severity-high 
targetmilestone-inin2510
-- 
[Ubuntu25.04] "virsh attach-interface" requires a reboot to reflect the 
attached interfaces on the guest
https://bugs.launchpad.net/bugs/2110407
You received this bug notification because you are a member of Kernel Packages, 
which is subscribed to linux in Ubuntu.

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to